sar command usage and details examples

sar command usage and details examples

sar command usage and details examples

System Activity Report – SAR used to report on various system loads, including CPU activity, memory/paging, device load, network. Linux distributions provide sar through the sysstat package.

Usage: sar [ options ] [ <interval> [ <count> ] ]Main options and reports:        -b      I/O and transfer rate statistics        -B      Paging statistics        -d      Block device statistics        -I { <int> | SUM | ALL | XALL }                Interrupts statistics        -m      Power management statistics        -n { <keyword> [,...] | ALL }                Network statistics                Keywords are:                DEV     Network interfaces                EDEV    Network interfaces (errors)                NFS     NFS client                NFSD    NFS server                SOCK    Sockets (v4)                IP      IP traffic      (v4)                EIP     IP traffic      (v4) (errors)                ICMP    ICMP traffic    (v4)                EICMP   ICMP traffic    (v4) (errors)                TCP     TCP traffic     (v4)                ETCP    TCP traffic     (v4) (errors)                UDP     UDP traffic     (v4)                SOCK6   Sockets (v6)                IP6     IP traffic      (v6)                EIP6    IP traffic      (v6) (errors)                ICMP6   ICMP traffic    (v6)                EICMP6  ICMP traffic    (v6) (errors)                UDP6    UDP traffic     (v6)        -q      Queue length and load average statistics        -r      Memory utilization statistics        -R      Memory statistics        -S      Swap space utilization statistics        -u [ ALL ]                CPU utilization statistics        -v      Kernel table statistics        -w      Task creation and system switching statistics        -W      Swapping statistics        -y      TTY device statistics

Example :

root@server:$ sar
       sar -u 2 5              Report CPU utilization for each 2  seconds.  5  lines  are  dis-              played.       sar -I 14 -o int14.file 2 10              Report  statistics  on  IRQ  14 for each 2 seconds. 10 lines are              displayed.  Data are stored in a file called int14.file.       sar -r -n DEV -f /var/log/sa/sa              Display memory, swap space and network statistics saved in daily              data file ’sa16’.       sar -A              Display all the statistics saved in current daily data file.

sar command, sar usage, sar details, sar examples

Comments

This site uses Akismet to reduce spam. Learn how your comment data is processed.