SysAdmin Commands
YbGLinux联盟YbGLinux联盟Debugging
YbGLinux联盟YbGLinux联盟truss executable
YbGLinux联盟/* Trace doing of given command ( useful debugging ) */
YbGLinux联盟YbGLinux联盟truss -f -p <pid of a shell>
YbGLinux联盟/* Using multiple windows, this can be used to trace setuid/setgid programs */
YbGLinux联盟YbGLinux联盟Arp, ethernet trouble shooting
YbGLinux联盟YbGLinux联盟arp -a .
YbGLinux联盟/* Shows the ethernet address arp table */
YbGLinux联盟YbGLinux联盟arp -d myhost
YbGLinux联盟/* Delete a stale ethernet entry for host myhost */
YbGLinux联盟YbGLinux联盟Disk Commands
YbGLinux联盟YbGLinux联盟du -k .
YbGLinux联盟/* Reports disk space used in Kilobytes */
YbGLinux联盟YbGLinux联盟du -sk .
YbGLinux联盟/* Reports only total disk space used in Kilobytes */
YbGLinux联盟YbGLinux联盟du -sk *|sort -k1,1n
YbGLinux联盟/* Reports total disk space used in Kilobytes in present directory */
YbGLinux联盟YbGLinux联盟du -ad /var | sort -nr
YbGLinux联盟/* Tells you how big the /var files are in reverse order */
YbGLinux联盟YbGLinux联盟fdformat -d -U
YbGLinux联盟/* Format diskette */
YbGLinux联盟YbGLinux联盟/usr/bin/iostat -E
YbGLinux联盟/* Command to display drives statistics */
YbGLinux联盟YbGLinux联盟/bin/mount -F hsfs -o ro /dev/sr0 /cdrom
YbGLinux联盟/* Mount an ISO 9660 CDROM */
YbGLinux联盟YbGLinux联盟newfs -Nv /dev/rdsk/c0t0d0s1
YbGLinux联盟/* To view the superfblocks available */
YbGLinux联盟YbGLinux联盟prtvtoc /dev/rdsk/c0t0d0s2
YbGLinux联盟/* Disk geometry and partitioning info */
YbGLinux联盟YbGLinux联盟quot -af
YbGLinux联盟/* How much space is used by users in kilobytes */
YbGLinux联盟YbGLinux联盟Driver Parameters
YbGLinux联盟YbGLinux联盟ndd /dev/ip \\?
YbGLinux联盟/* Shows IP variables in the kernel */
YbGLinux联盟YbGLinux联盟ndd /dev/ip ip_forwarding
YbGLinux联盟/* Tells you if forwarding is on (=1) */
YbGLinux联盟YbGLinux联盟ndd -set /dev/ip ip_forwarding 1
YbGLinux联盟/* Enables IP forwarding between interfaces */
YbGLinux联盟YbGLinux联盟File Manipulation
YbGLinux联盟YbGLinux联盟dos2unix | -ascii <filename>
YbGLinux联盟/* Converts DOS file formats to Unix */
YbGLinux联盟YbGLinux联盟split
YbGLinux联盟/* Split files into pieces */
YbGLinux联盟YbGLinux联盟[vi] : %s/existing/new/g
YbGLinux联盟/* Search and Replace text in vi */
YbGLinux联盟YbGLinux联盟[vi] :set nu
YbGLinux联盟/* Set line numbers in vi */
YbGLinux联盟YbGLinux联盟[vi] :set ts=[num]
YbGLinux联盟/* Set tab stops in vi */
YbGLinux联盟YbGLinux联盟File System
YbGLinux联盟YbGLinux联盟cat /dev/null > filename
YbGLinux联盟/* Zero\'s out the file without breaking pipe */
YbGLinux联盟YbGLinux联盟dd if=/dev/rdsk/... of=/dev/rdsk/... bs=4096
YbGLinux联盟/* Make a mirror image of your boot disk */
YbGLinux联盟YbGLinux联盟df -k | grep dg| awk \'{print $6}\' |xargs -n 1 umount
YbGLinux联盟/* Unmount all file systems in disk group dg */
YbGLinux联盟YbGLinux联盟fsck -F ufs /dev/rdsk/c0t0d0s0
YbGLinux联盟/* Check a UFS filesystem on c0t0d0s0 */
YbGLinux联盟YbGLinux联盟fsck -F ufs -y /dev/rdsk/c0t0d0s0
YbGLinux联盟/* Check answering yes to all questions */
YbGLinux联盟YbGLinux联盟fsck -F ufs -o b=97472 /dev/rdsk/c0t0d0s0
YbGLinux联盟/* Check using an alternate super block */
YbGLinux联盟YbGLinux联盟gzip -dc file1.tar.gz | tar xf -
YbGLinux联盟/* Unpack .tar.gz files in place */
YbGLinux联盟YbGLinux联盟gzip -d -c tarball.tgz | (cd /[dir];tar xf - ) &
YbGLinux联盟/* Unpacking tarballs to diff location */
YbGLinux联盟YbGLinux联盟ln [-fhns] <source file> <destination file>
YbGLinux联盟/* Creating hard links and soft links */
YbGLinux联盟YbGLinux联盟ls -la | awk \'{ print $5,\" \",$9 }\' | sort -rn
YbGLinux联盟/* File sizes of current directory */
YbGLinux联盟YbGLinux联盟mount -f pcfs /dev/dsk/c0d0p1 /export/dos
YbGLinux联盟/* Mount DOS fdisk partition from Solaris */
YbGLinux联盟YbGLinux联盟mount -F ufs -o rw,remount /
YbGLinux联盟/* Used to remount root to make it writeable */
YbGLinux联盟YbGLinux联盟mount -o remount,logging /spare
YbGLinux联盟/* Re-mount the ro file system rw and turn on ufs logging */
YbGLinux联盟YbGLinux联盟pax -rw . /newdir
YbGLinux联盟/* Efficient alternative for copying directories */
YbGLinux联盟YbGLinux联盟prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2
YbGLinux联盟/* Cloning Partitiontables */
YbGLinux联盟YbGLinux联盟tar cvf filename.tar
YbGLinux联盟/* Create a tape (tar) archive */
YbGLinux联盟YbGLinux联盟tar xvf filename.tar
YbGLinux联盟/* Extract a tape (tar) archive */
YbGLinux联盟YbGLinux联盟tar cf - . | (cd /newdir ; tar xf -)
YbGLinux联盟/* Recursively copy files and their permissions */
YbGLinux联盟YbGLinux联盟/sbin/uadmin x x
YbGLinux联盟/* Syncs File Systems and Reboots systems fast */
YbGLinux联盟YbGLinux联盟zcat [cpio file] | cpio -itmv
YbGLinux联盟/* Show the contents of a compressed cpio */
YbGLinux联盟YbGLinux联盟zcat <patch_file.tar.Z | tar xvf -
YbGLinux联盟/* Extract the patch_file that is a compressed tar file */
YbGLinux联盟YbGLinux联盟File Transfer
YbGLinux联盟YbGLinux联盟get filename.suffix |\"tar xf -\"
YbGLinux联盟/* Undocumented Feature of FTP */
YbGLinux联盟YbGLinux联盟put \"| tar cf - .\" filename.tar
YbGLinux联盟/* Undocumented Feature of FTP */
YbGLinux联盟YbGLinux联盟find . -depth | cpio -pdmv /path/tobe/copied/to
YbGLinux联盟/* Fast alternative to cp -pr */
YbGLinux联盟YbGLinux联盟sendport
YbGLinux联盟/* Transferring large numbers of files within the same ftp control session */
YbGLinux联盟YbGLinux联盟General
YbGLinux联盟YbGLinux联盟/usr/bin/catman -w
YbGLinux联盟/* Create windex databases for man page directories */
YbGLinux联盟YbGLinux联盟FQ_FILENAME=<fully_qualified_file_name>; echo ${FQ_FILENAME%/*}
YbGLinux联盟/* Extract directory from fully-qualified file name. */
YbGLinux联盟YbGLinux联盟mailx -H -u <username>
YbGLinux联盟/* List out mail headers for specified user */
YbGLinux联盟YbGLinux联盟set filec
YbGLinux联盟/* Set file-completion for csh */
YbGLinux联盟YbGLinux联盟uuencode [filename] [filename] | mailx -s \"Subject\" [user to mail]
YbGLinux联盟/* Send files as attachments */
YbGLinux联盟YbGLinux联盟Hardware
YbGLinux联盟YbGLinux联盟cfgadm
YbGLinux联盟/* Verify reconfigurable hardware resources */
YbGLinux联盟YbGLinux联盟m64config -prconf
YbGLinux联盟/* Print M64 hardware configuration */
YbGLinux联盟YbGLinux联盟m64config -depth 8|24
YbGLinux联盟/* Sets the screen depth of your M64 graphics accelerator */
YbGLinux联盟YbGLinux联盟m64config -res \'video_mode\'
YbGLinux联盟/* Change the resolution of your M64 graphics accelerator */
YbGLinux联盟YbGLinux联盟Kernel
YbGLinux联盟YbGLinux联盟/usr/sbin/modinfo
YbGLinux联盟/* Display kernel module information */
YbGLinux联盟YbGLinux联盟/usr/sbin/modload <module>
YbGLinux联盟/* Load a kernel module */
YbGLinux联盟YbGLinux联盟/usr/sbin/modunload -i <module id>
YbGLinux联盟/* Unload a kernel module */
YbGLinux联盟YbGLinux联盟nm -x /dev/ksyms | grep OBJ | more
YbGLinux联盟/* Tuneable kernel parameters */
YbGLinux联盟YbGLinux联盟/usr/sbin/sysdef
YbGLinux联盟/* Show system kernal tunable details */
YbGLinux联盟YbGLinux联盟Memory
YbGLinux联盟YbGLinux联盟prtconf | grep Mem
YbGLinux联盟/* Display Memory Size */
YbGLinux联盟YbGLinux联盟Network Information
YbGLinux联盟YbGLinux联盟ndd /dev/arp arp_cache_report
YbGLinux联盟/* Prints ARP table in cache with IP and MAC address */
YbGLinux联盟YbGLinux联盟netstat -a | grep EST | wc -l
YbGLinux联盟/* Displays number active established connections to the localhost */
YbGLinux联盟YbGLinux联盟netstat -k hme0
YbGLinux联盟/* Undocumented netstat command */
YbGLinux联盟YbGLinux联盟netstat -i
YbGLinux联盟/* Show the TCP/IP network interfaces */
YbGLinux联盟YbGLinux联盟netstat -np
YbGLinux联盟/* Similar to arp -a without name resolution */
YbGLinux联盟YbGLinux联盟netstat -r
YbGLinux联盟/* Show network route table */
YbGLinux联盟YbGLinux联盟netstat -rn
YbGLinux联盟/* Displays routing information but bypasses hostname lookup. */
YbGLinux联盟YbGLinux联盟netstat -a | more
YbGLinux联盟/* Show the state of all sockets */
YbGLinux联盟YbGLinux联盟traceroute <ipaddress>
YbGLinux联盟/* Follow the route to the ipaddress */
YbGLinux联盟YbGLinux联盟Network/Tuning
YbGLinux联盟YbGLinux联盟ifconfig eth0 mtu 1500
YbGLinux联盟/* Change MTU of interface */
YbGLinux联盟YbGLinux联盟ifconfig eth0 10.1.1.1 netmask 255.255.255.255
YbGLinux联盟/* Add an Interface */
YbGLinux联盟YbGLinux联盟/sbin/ifconfig hme0:1 inet 10.210.xx.xxx netmask 255.255.0.0 broadcast 10.210.xxx.xxx
YbGLinux联盟/* Virtual Interfaces */
YbGLinux联盟YbGLinux联盟/sbin/ifconfig hme0:1 up
YbGLinux联盟/* Bring virtual interface up */
YbGLinux联盟YbGLinux联盟/usr/sbin/ndd -set /dev/hme adv_100fdx_cap 1
YbGLinux联盟/* Nailling to 100Mbps */
YbGLinux联盟YbGLinux联盟ndd -set /dev/ip ip_addrs_per_if 1-8192
YbGLinux联盟/* To set more than 256 virtual ip addresses. */
YbGLinux联盟YbGLinux联盟ndd -set /dev/tcp tcp_xmit_hiwat 65535
YbGLinux联盟/* Increase TCP-transmitbuffers */
YbGLinux联盟YbGLinux联盟ndd -set /dev/tcp tcp_recv_hiwat 65535
YbGLinux联盟/* Increase TCP-receivebuffers */
YbGLinux联盟YbGLinux联盟Processes
YbGLinux联盟YbGLinux联盟fuser -uc /var
YbGLinux联盟/* Processes that are running from /var */
YbGLinux联盟YbGLinux联盟kill -HUP `ps -ef | grep
roccess | awk \'{print $2}\'` YbGLinux联盟
/* HUP any related process in one step */ YbGLinux联盟
YbGLinux联盟
lsof -i TCP:25 YbGLinux联盟
/* Mapping port with process */ YbGLinux联盟
YbGLinux联盟
pfiles <pid> YbGLinux联盟
/* Shows processes\' current open files */ YbGLinux联盟
YbGLinux联盟
pkill -n <name> YbGLinux联盟
/* Kill a process by name */ YbGLinux联盟
YbGLinux联盟
kill `ps -ef | grep program_name | grep -v grep | cut -f8 -d \' \'` YbGLinux联盟
/* pkill for solaris 2.6 */ YbGLinux联盟
YbGLinux联盟
prstat -a YbGLinux联盟
/* An alternative for top command */ YbGLinux联盟
YbGLinux联盟
/usr/ucb/ps -aux | more YbGLinux联盟
/* Displays CPU % usage for each process in ascending order */ YbGLinux联盟
YbGLinux联盟
/usr/ucb/ps -auxww | grep <process name> YbGLinux联盟
/* Gives the full listing of the process (long listing) */ YbGLinux联盟
YbGLinux联盟
ps -ef | grep -i <string> | awk \'{ print $2 }\' YbGLinux联盟
/* Creates list of running PID by */ YbGLinux联盟
YbGLinux联盟
ps -ef | grep -v \"0:00\" | more YbGLinux联盟
/* Gives you a list of any process with CPU time more than 0:00 */ YbGLinux联盟
YbGLinux联盟
ps -ef | more YbGLinux联盟
/* Show all processes running */ YbGLinux联盟
YbGLinux联盟
ps -eo pid,args YbGLinux联盟
/* List processes in simplified format */ YbGLinux联盟
YbGLinux联盟
ps -fu oracle|grep pmon YbGLinux联盟
/* See which instances of Oracle are running */ YbGLinux联盟
YbGLinux联盟
/usr/proc/bin/ptree <pid> YbGLinux联盟
/* Print the parent/child process \'tree\' of a process */ YbGLinux联盟
YbGLinux联盟
/usr/proc/bin/pwdx <pid> YbGLinux联盟
/* Print the working directory of a process */ YbGLinux联盟
YbGLinux联盟
top -b 1 YbGLinux联盟
/* Returns the process utilizing the most cpu and quits */ YbGLinux联盟
YbGLinux联盟
Resource Management YbGLinux联盟
YbGLinux联盟
/usr/bin/ldd [filename] YbGLinux联盟
/* List the dynamic dependencies of executable files */ YbGLinux联盟
YbGLinux联盟
/usr/proc/bin/pmap pid YbGLinux联盟
/* Report address space map a process occupies */ YbGLinux联盟
YbGLinux联盟
Route Configuration YbGLinux联盟
YbGLinux联盟
route add net 128.50.0.0 128.50.1.6 1 YbGLinux联盟
/* Adds route to 128.50 network via 128.50.1.6 */ YbGLinux联盟
YbGLinux联盟
route change 128.50.0.0 128.50.1.5 YbGLinux联盟
/* Changes the destination address for a route */ YbGLinux联盟
YbGLinux联盟
route delete net 128.50.0.0 128.50.1.6 YbGLinux联盟
/* Deletes route to 128.50 network */ YbGLinux联盟
YbGLinux联盟
route get [hostname] YbGLinux联盟
/* Which interface will be used to contact hostname */ YbGLinux联盟
YbGLinux联盟
route monitor YbGLinux联盟
/* Monitors traffic to the routes */ YbGLinux联盟
YbGLinux联盟
route flush YbGLinux联盟
/* Removes all entries in the route table */ YbGLinux联盟
YbGLinux联盟
Searching Items YbGLinux联盟
YbGLinux联盟
egrep \"patterna|patternb\" <filename> YbGLinux联盟
/* Search for multiple patterns within the same file */ YbGLinux联盟
YbGLinux联盟
find . -exec egrep -li \"str\" {} \\; YbGLinux联盟
/* Find a string in files starting cwd */ YbGLinux联盟
YbGLinux联盟
find / -fstype nfs -prune -o fstype autofs -prune -o -name filename -print YbGLinux联盟
/* Find without traversing NFS mounted file systems */ YbGLinux联盟
YbGLinux联盟
find . -mtime -1 -type f YbGLinux联盟
/* Find recently modified files */ YbGLinux联盟
YbGLinux联盟
find / -mtime <# of days> YbGLinux联盟
/* Find files modified during the past # of days */ YbGLinux联盟
YbGLinux联盟
find . ! -mtime -<days> | /usr/bin/xargs rm -rf YbGLinux联盟
/* Finds and removes files older than <days> specified */ YbGLinux联盟
YbGLinux联盟
find . -type f -exec grep \"<sub-string>\" {} \\; -print YbGLinux联盟
/* Find files (and content) containing <sub-string> within directory tree */ YbGLinux联盟
YbGLinux联盟
find . -type f -exec grep -l \"<sub-string>\" {} \\; YbGLinux联盟
/* Find filenames containing <sub-string> within directory tree */ YbGLinux联盟
YbGLinux联盟
find . -type f -print | xargs grep -i [PATTERN] YbGLinux联盟
/* Recursive grep on files */ YbGLinux联盟
YbGLinux联盟
find / -user <username> YbGLinux联盟
/* Find all files owned by <username> */ YbGLinux联盟
YbGLinux联盟
find / | grep [file mask] YbGLinux联盟
/* Fast way to search for files */ YbGLinux联盟
YbGLinux联盟
find <start_path> -name \"<file_name>\" -exec rm -rf {} \\; YbGLinux联盟
/* Recursively finds files by name and automatically removes them */ YbGLinux联盟
YbGLinux联盟
find /proc/*/fd -links 0 -type f -size +2000 -ls YbGLinux联盟
/* Find large files held open by a process */ YbGLinux联盟
YbGLinux联盟
ls -lR | grep <sub_string> YbGLinux联盟
/* Fast alternative to find */ YbGLinux联盟
YbGLinux联盟
Security YbGLinux联盟
YbGLinux联盟
echo \'Please go away\' > /etc/nologin YbGLinux联盟
/* Stops users logging in */ YbGLinux联盟
YbGLinux联盟
find / -perm -0777 -type d -ls YbGLinux联盟
/* Find all your writable directories */ YbGLinux联盟
YbGLinux联盟
find / -type f -perm -2000 -print YbGLinux联盟
/* Find all SGID files */ YbGLinux联盟
YbGLinux联盟
find / -type f -perm -4000 -print YbGLinux联盟
/* find all SUID files */ YbGLinux联盟
YbGLinux联盟
Set Terminal Options YbGLinux联盟
YbGLinux联盟
stty erase ^H YbGLinux联盟
/* Sets the Backspace Key to erase */ YbGLinux联盟
YbGLinux联盟
stty erase ^? YbGLinux联盟
/* Sets the Delete Key to erase */ YbGLinux联盟
YbGLinux联盟
stty sane YbGLinux联盟
/* Rreset terminal after viewing a binary file. */ YbGLinux联盟
YbGLinux联盟
tput rmacs YbGLinux联盟
/* Reset to standard char set */ YbGLinux联盟
YbGLinux联盟
Snoop Your Network YbGLinux联盟
YbGLinux联盟
snoop -d pcelx0 YbGLinux联盟
/* Watch all network packets on device pcelx0 */ YbGLinux联盟
YbGLinux联盟
snoop -o /tmp/mylog pcelx0 YbGLinux联盟
/* Saves packets from device pcelx0 to a file */ YbGLinux联盟
YbGLinux联盟
snoop -i /tmp/mylog host1 host2 YbGLinux联盟
/* View packets from logfile between host1 & host2 */ YbGLinux联盟
YbGLinux联盟
snoop -i /tmp/mylog -v -p101 YbGLinux联盟
/* Show all info on packet number 101 from a logfile */ YbGLinux联盟
YbGLinux联盟
snoop -i /tmp/mylog -o /tmp/newlog host1 YbGLinux联盟
/* Write a new logfile with all host1 packets */ YbGLinux联盟
YbGLinux联盟
snoop -s 120 YbGLinux联盟
/* Return the first 120 bytes in the packet header */ YbGLinux联盟
YbGLinux联盟
snoop -v arp YbGLinux联盟
/* Capture arp broadcasts on your network */ YbGLinux联盟
YbGLinux联盟
Swap File YbGLinux联盟
YbGLinux联盟
mkfile -v 10m /export/disk1/myswap YbGLinux联盟
/* Makes a 10 Megabyte swapfile in /export/disk */ YbGLinux联盟
YbGLinux联盟
mkfile -nv 10m /export/disk1/myswap YbGLinux联盟
/* Makes an empty 10 Megabyte swapfile */ YbGLinux联盟
YbGLinux联盟
Swap Space YbGLinux联盟
YbGLinux联盟
swap -s YbGLinux联盟
/* List the amount of swap space available, also see mkfile */ YbGLinux联盟
YbGLinux联盟
swap -a /export/disk1/swapfile YbGLinux联盟
/* Add a swapfile */ YbGLinux联盟
YbGLinux联盟
swap -d /dev/dsk/c0t0d0s4 YbGLinux联盟
/* Deletes a swap device */ YbGLinux联盟
YbGLinux联盟
swap -l YbGLinux联盟
/* List the current swap devices */ YbGLinux联盟
YbGLinux联盟
System Configuration YbGLinux联盟
YbGLinux联盟
drvconfig ; disks YbGLinux联盟
/* Adding hot-plug disks to system */ YbGLinux联盟
YbGLinux联盟
/usr/sbin/eeprom auto-boot? false YbGLinux联盟
/* Changes eeprom autoboot? setting without going to Ok prompt */ YbGLinux联盟
YbGLinux联盟
/usr/sbin/eeprom diag-switch? true YbGLinux联盟
/* Set the system to perform diagnostics on the next reboot. */ YbGLinux联盟
YbGLinux联盟
/usr/sbin/eeprom local-mac-address?=true YbGLinux联盟
/* Multiple Port Network Card Setting */ YbGLinux联盟
YbGLinux联盟
/usr/sbin/grpck YbGLinux联盟
/* Check /etc/group file syntax */ YbGLinux联盟
YbGLinux联盟
/usr/sbin/pwck YbGLinux联盟
/* Check /etc/passwd file syntax */ YbGLinux联盟
YbGLinux联盟
/usr/sbin/sys-unconfig YbGLinux联盟
/* Clear host specific network configuration information */ YbGLinux联盟
YbGLinux联盟
System Information and Monitoring YbGLinux联盟
YbGLinux联盟
coreadm -e log YbGLinux联盟
/* Report global core */ YbGLinux联盟
YbGLinux联盟
/bin/echo \"0t${stamp}>Y\\n<Y=Y\" | adb YbGLinux联盟
/* Convert UNIX timestamp to something human-readable */ YbGLinux联盟
YbGLinux联盟
/usr/sbin/eeprom YbGLinux联盟
/* Show eeprom parameters */ YbGLinux联盟
YbGLinux联盟
grep \"\\-root\" /var/adm/sulog | grep -v \\+ | tail -25 YbGLinux联盟
/* List most recent attempts to switch to superuser account. */ YbGLinux联盟
YbGLinux联盟
isainfo -bv YbGLinux联盟
/* Quickly checkout if machine is in 32 or 64 bit mode */ YbGLinux联盟
YbGLinux联盟
last YbGLinux联盟
/* Tells who was or still is on the system */ YbGLinux联盟
YbGLinux联盟
logger -i YbGLinux联盟
/* Log the process ID */ YbGLinux联盟
YbGLinux联盟
psradm -f [processor id] YbGLinux联盟
/* Take processor offline */ YbGLinux联盟
YbGLinux联盟
/usr/sbin/prtconf -vp YbGLinux联盟
/* Show system configuration details */ YbGLinux联盟
YbGLinux联盟
/usr/platform/`/bin/uname -i`/sbin/prtdiag -v YbGLinux联盟
/* System Diagnostics */ YbGLinux联盟
YbGLinux联盟
prtconf -pv | grep banner-name |awk -F\\\' \' { print $2 } \' | head -1 YbGLinux联盟
/* Show actual model name of machine */ YbGLinux联盟
YbGLinux联盟
psrinfo | wc -l YbGLinux联盟
/* Display number of processors */ YbGLinux联盟
YbGLinux联盟
sar -A <time in sec> YbGLinux联盟
/* Provides cumulative system report. */ YbGLinux联盟
YbGLinux联盟
sar -a <time in sec> YbGLinux联盟
/* Report use of file access system routines. */ YbGLinux联盟
YbGLinux联盟
sar -u YbGLinux联盟
/* Report CPU Utilization */ YbGLinux联盟
YbGLinux联盟
telnet <remote machine> 13 | grep \':\' YbGLinux联盟
/* Get the time on remote Unix machine */ YbGLinux联盟
YbGLinux联盟
uname -a YbGLinux联盟
/* Displays system information */ YbGLinux联盟
YbGLinux联盟
vmstat 10 YbGLinux联盟
/* Displays summary of what the system is doing every 10 seconds */ YbGLinux联盟
YbGLinux联盟
who -b YbGLinux联盟
/* Displays the date of the last system reboot. */ YbGLinux联盟
YbGLinux联盟
ypcat hosts | sort -n -t. +0 -1 +1 -2 +2 -3 +3 -4 YbGLinux联盟
/* Take the input of \"ypcat hosts\" or \"cat /etc/inet/hosts\" and sort by IP. */