📄 sar.1
字号:
Number of 'getattr' RPC calls received per second..REWith the.B SOCKkeyword, statistics on sockets in use are reported.The following values are displayed:.B totsck.RSTotal number of used sockets..RE.B tcpsck.RSNumber of TCP sockets currently in use..RE.B udpsck.RSNumber of UDP sockets currently in use..RE.B rawsck.RSNumber of RAW sockets currently in use..RE.B ip-frag.RSNumber of IP fragments currently in use..REThe.B ALLkeyword is equivalent to specifying all the keywords above and therefore all the networkactivities are reported..RE.RE.IP "-o [ filename ]"Save the readings in the file in binary form. Each readingis in a separate record. The default value of the.B filenameparameter is the current daily data file, the.IR /var/log/sa/sa ddfile. The -o option is exclusive of the -f option..IP "-P { cpu | ALL }"Report per-processor statistics for the specified processor or processors.Specifying the.B ALLkeyword reports statistics for each individual processor, and globally forall processors.Of the flags which specify the statistics to be reported, only the.B -uand.B -I SUMflags are meaningful with the.B -Pflag. Note that processor 0 is the first processor..IP -pPretty-print device names. Use this option in conjunction with option -d.By default names are printed as.B dev m-nwhere m and n are the major and minor numbers for the device.Use of this option displays the names of the devices as they (should) appearin /dev. Name mappings are controlled by.B /etc/sysconfig/sysstat.ioconf..IP -qReport queue length and load averages. The following values are displayed:.B runq-sz.RS.RSRun queue length (number of processes waiting for run time). .RE.B plist-sz.RSNumber of processes and threads in the process list..RE.B ldavg-1.RSSystem load average for the last minute..RE.B ldavg-5.RSSystem load average for the past 5 minutes..RE.B ldavg-15.RSSystem load average for the past 15 minutes..RE.RE.IP -rReport memory and swap space utilization statistics.The following values are displayed:.B kbmemfree.RS.RSAmount of free memory available in kilobytes..RE.B kbmemused.RSAmount of used memory in kilobytes. This does not take into account memoryused by the kernel itself..RE.B %memused.RSPercentage of used memory..RE.B kbbuffers.RSAmount of memory used as buffers by the kernel in kilobytes..RE.B kbcached.RSAmount of memory used to cache data by the kernel in kilobytes..RE.B kbswpfree.RSAmount of free swap space in kilobytes..RE.B kbswpused.RSAmount of used swap space in kilobytes..RE.B %swpused.RSPercentage of used swap space..RE.B kbswpcad.RSAmount of cached swap memory in kilobytes.This is memory that once was swapped out, is swapped back inbut still also is in the swap area (if memory is needed it doesn't needto be swapped out again because it is already in the swap area. Thissaves I/O)..RE.RE.IP -RReport memory statistics. The following values are displayed:.B frmpg/s.RS.RSNumber of memory pages freed by the system per second.A negative value represents a number of pages allocated by the system.Note that a page has a size of 4 kB or 8 kB according to the machine architecture..RE.B bufpg/s.RSNumber of additional memory pages used as buffers by the system per second.A negative value means fewer pages used as buffers by the system..RE.B campg/s.RSNumber of additional memory pages cached by the system per second.A negative value means fewer pages in the cache..RE.RE.IP "-s [ hh:mm:ss ]"Set the starting time of the data, causing the.B sarcommand to extract records time-tagged at, or following, the timespecified. The default starting time is 08:00.Hours must be given in 24-hour format. This option can beused only when data are read from a file (option.B -f)..IP -tWhen reading data from a daily data file, indicate that.B sarshould display the timestamps in the original locale time ofthe data file creator. Without this option, the.B sarcommand displays the timestamps in the user's locale time..IP -uReport CPU utilization. The following values are displayed:.B %user.RS.RSPercentage of CPU utilization that occurred while executing at the userlevel (application)..RE.B %nice.RSPercentage of CPU utilization that occurred while executing at the userlevel with nice priority..RE.B %system.RSPercentage of CPU utilization that occurred while executing at the systemlevel (kernel)..RE.B %iowait.RSPercentage of time that the CPU or CPUs were idle during whichthe system had an outstanding disk I/O request..RE.B %steal.RSShow the percentage of time spent in involuntary wait by the virtual CPUor CPUs while the hypervisor was servicing another virtual processor..RE.B %idle.RSPercentage of time that the CPU or CPUs were idle and the systemdid not have an outstanding disk I/O request. Note: In virtualized hardwareenvironment, this also includes the time spent in involuntary wait by the virtual CPUor CPUs while the hypervisor was servicing another virtual processor..RE.RE.IP -vReport status of inode, file and other kernel tables.The following values are displayed:.B dentunusd.RS.RSNumber of unused cache entries in the directory cache..RE.B file-sz.RSNumber of used file handles..RE.B inode-sz.RSNumber of used inode handlers..RE.B super-sz.RSNumber of super block handlers allocated by the kernel..RE.B %super-sz.RSPercentage of allocated super block handlers with regard to the maximum numberof super block handlers that Linux can allocate..RE.B dquot-sz.RSNumber of allocated disk quota entries..RE.B %dquot-sz.RSPercentage of allocated disk quota entries with regard to the maximum numberof cached disk quota entries that can be allocated..RE.B rtsig-sz.RSNumber of queued RT signals..RE.B %rtsig-sz.RSPercentage of queued RT signals with regard to the maximum numberof RT signals that can be queued..RE.RE.IP -VPrint version number then exit..IP -wReport system switching activity..B cswch/s.RS.RSTotal number of context switches per second..RE.RE.IP -WReport swapping statistics. The following values are displayed:.B pswpin/s.RS.RSTotal number of swap pages the system brought in per second..RE.B pswpout/s.RSTotal number of swap pages the system brought out per second..RE.RE.IP "-x { pid | SELF | ALL }"Report statistics for a given process..B pidis the process identification number. The.B SELFkeyword indicates that statistics are to be reported for the.B sarprocess itself, whereas the.B ALLkeyword indicates that statistics are to be reported for all the system processes.All these statistics cannot be saved to a file.So this option will be ignored whenever -o option is used.Specifying multiple.B -x pidparameters on the command line will look at multiple independent processes.At the present time, no more than 256 processes can be monitoredsimultaneously.The following values are displayed:.B minflt/s.RS.RSTotal number of minor faults the process has made per second, thosewhich have not required loading a memory page from disk..RE.B majflt/s.RSTotal number of major faults the process has made per second, thosewhich have required loading a memory page from disk..RE.B %user.RSPercentage of CPU used by the process while executing at the user level(application), with or without nice priority..RE.B %system.RSPercentage of CPU used by the process while executing at the system level(kernel)..RE.B nswap/s.RSNumber of pages from the process address space the system has swapped out per second.This value is always zero with post 2.5 kernels..RE.B CPU.RSProcessor number to which the process is attached..RE.RE.IP "-X { pid | SELF | ALL }"Report statistics for the child processes of the process whose PID is.B pid .The.B SELFkeyword indicates that statistics are to be reported for the child processes of the.B sarprocess itself, whereas the.B ALLkeyword indicates that statistics are to be reported for all the child processes of all the system processes.All these statistics cannot be saved to a file.So this option will be ignored whenever -o option is used.Specifying multiple.B -X pidparameters on the command line will look at multiple independent processes.At the present time, no more than 256 processes can be monitoredsimultaneously.The following values are displayed:.B cminflt/s.RS.RSTotal number of minor faults the child processes have made per second, thosewhich have not required loading a memory page from disk..RE.B cmajflt/s.RSTotal number of major faults the child processes have made per second, thosewhich have required loading a memory page from disk..RE.B %cuser.RSPercentage of CPU used by the child processes while executing at the user level(application), with or without nice priority..RE.B %csystem.RSPercentage of CPU used by the child processes while executing at the system level(kernel)..RE.B cnswap/s.RSNumber of pages from the child processes address spaces the system has swapped out per second.This value is always zero with post 2.5 kernels..RE.RE.IP -yReport TTY device activity. The following values are displayed:.B rcvin/s.RS.RSNumber of receive interrupts per second for current serial line. Serial line numberis given in the TTY column..RE.B xmtin/s.RSNumber of transmit interrupts per second for current serial line..RE.B framerr/s.RSNumber of frame errors per second for current serial line..RE.B prtyerr/s.RSNumber of parity errors per second for current serial line..RE.B brk/s.RSNumber of breaks per second for current serial line..RE.B ovrun/s.RSNumber of overrun errors per second for current serial line..RENote that with recent 2.6 kernels, these statistics can be retrieved only byroot..RE.SH ENVIRONMENTThe.B sarcommand takes into account the following environment variable:.IP S_TIME_FORMATIf this variable exists and its value is.BR ISOthen the current locale will be ignored when printing the date in the report header.The.B sarcommand will use the ISO 8601 format (YYYY-MM-DD) instead..SH EXAMPLES.B sar -u 2 5.RSReport CPU utilization for each 2 seconds. 5 lines are displayed..RE.B sar -I 14 -o int14.file 2 10.RSReport statistics on IRQ 14 for each 2 seconds. 10 lines are displayed.Data are stored in a file called.IR int14.file ..RE.B sar -r -n DEV -f /var/log/sa/sa16.RSDisplay memory, swap space and network statistics saved in daily data file 'sa16'..RE.B sar -A.RSDisplay all the statistics saved in current daily data file..SH BUGS.I /procfilesystem must be mounted for the.B sarcommand to work.All the statistics are not necessarily available, depending on the kernel version used..SH FILES.IR /var/log/sa/sa dd.RSIndicate the daily data file, where the.B ddparameter is a number representing the day of the month..RE.IR /proccontains various files with system statistics..SH AUTHORSebastien Godard (sysstat <at> wanadoo.fr).SH SEE ALSO.BR sadc (8),.BR sa1 (8),.BR sa2 (8),.BR sadf (1),.BR isag (1),.BR mpstat (1),.BR iostat (1),.BR vmstat (8).I http://perso.wanadoo.fr/sebastien.godard/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -