title: linux历史问题排查神器-sar命令 #标题tags: #标签
date: 2022-01-28
categories: linux大杂烩 # 分类

工作中总会碰到几次要分析机器历史问题的需求,之前没有系统化的整理过,也没有深入的去理解那些排查系统性能工具的指标输出,导致在遇上这种需求的时候,总是心虚,能搪塞过去就搪塞过去,不过随着工作年限的增加,遇到这种需求,再说不出个123来,就配不上工牌上那“高级运维工程师”几个字了。这篇文章,就来拆解下这个linux历史问题排查神器-sar命令

参考资料:

如果你的系统没有安装sysstat这个包,那么是没有sar命令的,也不会有可分析的文件,需要执行命令yum -y install sysstat去安装,安装完成后,就有sar命令了。同时也会自动生成相关目录及计划任务/etc/cron.d/sysstat

sar常用命令

假设你要全面的分析系统指标,又没有足够的耐心将这篇文章看完,想着现学现卖,那么直接执行下面的命令,然后去看系统输出的各项指标吧,看不懂的,就来这个页面搜索下指标名称,就可以找到对应的解释,如果文章中没有解释,那就需要去文章开头附的参考资料中寻找答案了。

万能的sar命令如下:

  1. # 输出26日的20:00:01到23:00:01之间的所有报告
  2. $ sar -f sa26 -A -s 20:00:01 -e 23:00:01 | less
  3. # 每隔3s打印下当前系统的所有性能指标并输出到/tmp/sar_3.log文件中
  4. $ sar -A 3 >> /tmp/sar_3.log

各选项如下:

  • -f:指定要分析的文件sa文件,默认保留近三十天的,文件名格式:sa[日期],如1号的就是sa1,15号的就是sa15,不过建议使用stat命令查一下文件最近改动时间,比如sa15,查出来的可能是上个月15号的日志,等到这个月16号,再看sa15这个文件,那么文件最近改动时间,就是当月的15号了,上月的已经被删除了。在分析之前,一定要先确认自己分析的文件没错哦,别分析了半天,看的不是你想看的那天的,那就尴尬了。
  • -A:输出全部的性能指标,包括磁盘、系统平均负载、内存、网卡流量等等,如果想单独输出某方面的指标,需要加其他选项,这个后面细说。
  • -s:指定要输出的报告起始时间,上面的命令是输出20:00:01之后的。
  • -e:指定要输出的报告截止时间,上面的命令是输出23:00:01之前的。
  • -u:输出CPU使用情况的统计信息
  • -v:输出inode、文件和其他内核表的统计信息
  • -d:输出每一个块设备的活动信息
  • -r:输出内存和交换空间的统计信息
  • -b:显示I/O和传送速率的统计信息
  • -a:文件读写情况
  • -c:输出进程统计信息,每秒创建的进程数
  • -R:输出内存页面的统计信息
  • -y:终端设备活动情况
  • -w:输出系统交换活动信息

CPU相关指标

  1. # 输出26号,20:00:00到22:00:00,CPU相关的指标(-P ALL:输出每个核心的详细指标信息)
  2. $ sar -f sa26 -u -P ALL -u ALL -s 20:00:00 -e 22:00:00

输出的各项指标含义如下:

  • CPU:表示当前是哪个CPU,all表示所有cpu的指标平均值。
  • %usr:CPU在用户模式下,执行进程的时间百分比 。
  • %nice:CPU处在带NICE值的用户模式下的时间百分比。
  • %system: CPU处在系统模式(内核态)下,执行进程的时间百分比。
  • %iowait:CPU用于等待I/O操作完成(等待输入输出完成),占用CPU总时间的百分比,如果此值过高,表示硬盘存在I/O瓶颈 。
  • %steal:管理程序为另一个虚拟进程提供服务而等待虚拟CPU的百分比。
  • %irq:CPU服务硬件中断(简称硬中断)所花费的时间百分比。
  • %soft:CPU服务软件中断(简称软中断)所花费的时间百分比。
  • %guest:CPU运行虚拟处理器所花费的时间百分比。
  • %gnice:Percentage of time spent by the CPU or CPUs to run a niced guest.
  • %idle:CPU空闲时间百分比,如果此值过高,表示CPU较空闲。如果此值高但系统响应慢时,有可能是 CPU 等待分配内存,此时应查看内存使用,必要时需要加大内存容量 ,如果此值持续低于10,则系统的 CPU 处理能力相对较低,表明系统中最需要解决的资源是 CPU。

任务创建和系统切换活动相关

  1. # 输出26号,20:00:00到22:00:00,任务创建和系统切换活动相关指标
  2. $ sar -f sa26 -w -s 20:00:00 -e 22:00:00

各项指标解释如下:

  • proc/s:每秒创建的总任务数
  • cswch/s:每秒上下文切换的总数。

系统负载相关

  1. # 输出26号,20:00:00到22:00:00,进程队列长度和平均负载状态的指标
  2. $ sar -f sa26 -q -s 20:00:00 -e 22:00:00

输出的各项指标含义如下:

  • runq-sz :运行队列的长度,等待运行的进程数量
  • plist-sz:进程列表中进程和线程的数量
  • ldavg-1 :最后1分钟的系统平均负载
  • ldavg-5 :过去5分钟的系统平均负载
  • ldavg-15:过去15分钟的系统平均负载
  • blocked:当前阻塞的等待I/O完成的任务数。

内存统计信息相关

  1. # 输出26号,20:00:00到22:00:00,内存统计信息相关的指标
  2. $ sar -f sa26 -R -s 20:00:00 -e 22:00:00

输出的各项指标含义如下:

  • frmpg/s:系统每秒释放的内存页数。负数表示系统分配的页面数。注意,根据机器的体系结构,页面的大小为4 kB或8 kB。
  • bufpg/s:每秒系统用作缓冲区的额外内存页数。负值意味着系统使用更少的页作为缓冲区。
  • campg/s:系统每秒缓存的额外内存页数。负值意味着缓存中的页面更少。

内存和交换空间相关

  1. # 输出26号,20:00:00到22:00:00,内存和交换空间相关的指标
  2. $ sar -f sa26 -r -u ALL -s 20:00:00 -e 22:00:00

输出的各项指标含义如下:

  • kbmemfree:空闲的内存数量(单位为KB),这个值和free命令中的free值基本一致,不包括buffer和cache的空间。
  • kbmemused:已使用的内存数量,不包含内核使用的内存(单位为KB)。这个值和free命令中的used值基本一致,所以它包括buffer和cache的空间。
  • %memused:已使用内存的百分数。物理内存使用率,这个值是kbmemused和内存总量(不包括swap)的一个百分比。
  • kbbuffers:内核缓冲区buffer,使用的内存数量(单位为KB)。这个值就是free命令中的buffer。
  • kbcached:内核高速缓存cache数据使用的内存数量(单位为KB)。这个值就是free命令中的cache。
  • kbcommit:保证当前系统所需要的内存,即为了确保不溢出而需要的内存(RAM+swap)。
  • %commit:这个值是kbcommit与内存总量(包括swap)的一个百分比。
  • kbactive:以KB为单位的活动内存数量(最近使用的内存,除非绝对必要,通常不会回收)。
  • kbinact:非活动内存的数量(以KB为单位)(最近使用较少的内存)。
  • kbdirty:等待“写回磁盘”的以KB为单位的内存量。

系统交换活动相关信息

  1. # 输出26号,20:00:00到22:00:00,系统交换活动相关的指标
  2. $ sar -f sa26 -W -s 20:00:00 -e 22:00:00

输出的各项指标含义如下:

  • pswpin/s:每秒系统换入的交换页面(swap page)数量
  • pswpout/s:每秒系统换出的交换页面(swap page)数量

内存分页相关

  1. # 输出26号,20:00:00到22:00:00,内存和交换空间相关的指标
  2. $ sar -f sa26 -B -s 20:00:00 -e 22:00:00

输出的各项指标含义如下:

  • pgpgin/s:每秒从磁盘空间或交换空间置换到内存的字节数(单位为KB)。
  • pgpgout/s:每秒从内存置换到磁盘空间或交换空间的字节数(单位为KB)。
  • fault/s:每秒钟系统产生的缺页数(主缺页加次缺页)。
  • majflt/s:每秒钟产生的主缺页数。
  • pgfree/s:每秒被放入空闲队列中的页个数。
  • pgscank/s:每秒被kswapd扫描的页个数。
  • pgscand/s:每秒直接被扫描的页个数。
  • pgsteal/s:每秒钟从cache中被清除来满足内存需要的页个数。
  • %vmeff:每秒清除的页占总扫描页的百分比。

网络设备统计相关

  1. # 输出26号,20:00:00到22:00:00,eth0这块网卡的网络设备统计相关的指标
  2. # 省略egrep的话,输出所有网卡,也可以egrep中填入多块网卡名称,| 分隔即可
  3. $ sar -f sa26 -n DEV -s 20:00:00 -e 22:00:00 | egrep 'eth0|IFACE'

输出的各项指标含义如下:

  • IFACE:网络设备名。
  • rxpck/s:每秒接收的包数量。
  • txpck/s:每秒传输的包数量。
  • rxbyt/s:每秒接收的字节数(单位为byte)。
  • txbyt/s:每秒传输的字节数(单位为byte)。
  • rxkB/s:每秒收的数据量(单位为kB)。
  • txkB/s:每秒发的数据量(单位为kB)。
  • rxcmp/s:每秒接收压缩包的数量。
  • txcmp/s:每秒传输压缩包的数量。
  • rxmcst/s:每秒接收的多播(multicast)包的总数排查网络设备故障。

网络设备故障相关

  1. # 输出26号,20:00:00到22:00:00,eth0这块网卡的故障相关的指标(省略egrep的话,输出所有网卡,也可以egrep中填入多块网卡名称,| 分隔即可)
  2. $ sar -f sa26 -n EDEV -s 20:00:00 -e 22:00:00 | egrep 'eth0|IFACE'

输出的各项指标含义如下:

  • IFACE:网络设备名。
  • rxerr/s:每秒接收的坏包数量。
  • txerr/s:传输包时每秒发生错误的数量。
  • coll/s:传输包时每秒发生冲突的数量。
  • rxdrop/s:接收包时,每秒丢弃的包的数量(缺乏缓存导致)。
  • txdrop/s:传输包时,每秒丢弃的包的数量(缺乏缓存导致)。
  • txcarr/s:传输包时,每秒发生的传输错误的数量。
  • rxfram/s:接收包时,每秒发生帧校验错误的数量。
  • rxfifo/s:接收包时,每秒钟缓冲区溢出错误的数量。
  • txfifo/s:传输包时,每秒钟缓冲区溢出错误的数量。

I/O和传送速率

  1. # 输出26号,20:00:00到22:00:00,机器上所有I/O和传送速率相关指标
  2. $ sar -f sa26 -b -s 20:00:00 -e 22:00:00

输出的各项指标含义如下:

  • tps:每每秒向磁盘设备请求数据的次数,包括读、写请求,其为rtps与wtps的和。每一次IO下发后会先将多个请求合并为一个I/O磁盘请求,这里tps指请求合并后的请求计数
  • rtps:每秒向磁盘设备的读请求次数
  • wtps:每秒向磁盘设备的写请求次数
  • bread/s:每秒钟从物理设备读入的数据量,单位为 块/s
  • bwrtn/s:每秒钟向物理设备写入的数据量,单位为 块/s

磁盘相关

  1. # 输出26号,20:00:00到22:00:00,机器上所有磁盘的使用相关指标
  2. $ sar -f sa26 -d -p -s 20:00:00 -e 22:00:00
  3. # -p:打印设备的名字。此选项与选项-d一起使用。默认不加-p的话情况下,名称打印为dev m-n,
  4. # 其中m和n为设备的主号码和副号码。使用-p选项将显示设备名,易读性更高。
  5. # 设备的主号码和副号码可以通过lsblk命令(输出的MAJ:MIN列,就是主号码和副号码)查看。

输出的各项指标含义如下:

  • DEV:磁盘设备,加上用参数-p可以打印出sda等磁盘设备名称;如不加参数-p,设备则显示为dev253-0等。
  • tps:每秒向磁盘设备请求数据的次数,包括读、写请求,其为rtps与wtps的和。每一次IO下发后会先将多个请求合并为一个I/O磁盘请求,这里tps指请求合并后的请求计数。
  • rd_sec/s:每秒读扇区的次数。
  • wr_sec/s:每秒写扇区的次数。
  • avgrq-sz:平均每次设备I/O操作的数据大小(扇区)。
  • avgqu-sz:磁盘请求队列的平均长度。
  • await:从请求磁盘到系统处理完,每次请求的平均消耗时间,包括请求队列等待时间(单位是毫秒)。
  • svctm:系统处理每次请求的平均时间,不包括在请求队列中消耗的时间。man手册中提示该字段将在将来的sysstat版本中删除。不要相信这个指标了。
  • %util:I/O请求占CPU的百分比。man手册解释:Percentage of elapsed time during which I/O requests were issued to the device (bandwidth utilization for the device). Device saturation occurs when this value is close to 100%.

交换空间swap利用率相关

  1. # 输出26号,20:00:00到22:00:00,机器上交换空间swap利用率相关指标
  2. $ sar -f sa26 -b -s 20:00:00 -e 22:00:00

输出的各项指标含义如下:

  • kbswpfree:可用的空闲交换空间大小。
  • kbswpused:已使用的交换空间大小。
  • %swpused:已使用交换空间的百分数。
  • kbswpcad:交换空间的高速缓存使用的内存大小。man手册解释:Amount of cached swap memory in kilobytes. This is memory that once was swapped out, is swapped back in but still also is in the swap area (if memory is needed it doesn’t need to be swapped out again because it is already in the swap area. This saves I/O)。
  • %swpcad:缓存的交换内存与已用交换空间的比例。

大量页面的利用率统计数据

  1. # 输出26号,20:00:00到22:00:00, 大量页面的利用率统计数据相关指标
  2. $ sar -f sa26 -H -s 20:00:00 -e 22:00:00

输出的各项指标含义如下:

  • kbhugfree:未分配的大页面内存数量(以KB为单位)。
  • kbhugused:已分配的大页面内存数量(以KB为单位)。
  • %hugused:已分配的大页内存占总内存的百分比。

inode、file和其他内核相关

  1. # 输出26号,20:00:00到22:00:00,inode、file和其他内核相关指标
  2. $ sar -f sa26 -v -s 20:00:00 -e 22:00:00

输出的各项指标含义如下:

  • dentunusd:目录缓存中未使用的缓存条目数。
  • file-nr:系统使用的块句柄数。
  • inode-nr:系统使用的inode句柄数
  • pty-nr:系统使用的伪终端数目,如果此时没人登录着系统,则此值应该为0。

TTY设备活动相关

  1. # 输出26号,20:00:00到22:00:00,TTY设备活动相关指标
  2. $ sar -f sa26 -y -s 20:00:00 -e 22:00:00

输出的各项指标含义如下:

  • TTY:当前终端
  • rcvin/s:当前串行线每秒接收中断数。序列号在TTY列中给出。
  • xmtin/s:当前串行线每秒传输中断数。
  • framerr/s:当前串行线每秒的帧错误数。
  • prtyerr/s:当前串行线每秒的奇偶校验错误数。
  • brk/s:当前串行线每秒的断行数。
  • ovrun/s:当前串行线每秒溢出错误数。

NFS客户端相关

  1. # 输出26号,20:00:00到22:00:00,关于NFS客户端活动的统计信息。
  2. $ sar -f sa26 -n NFS -s 20:00:00 -e 22:00:00

输出的各项指标含义如下:

  • call/s:每秒发出的RPC请求数。
  • retrans/s:每秒RPC请求的数量,需要重传的请求(例如由于服务器超时)。
  • read/s:每秒的“读”RPC调用数。
  • write/s:每秒的“写”RPC调用数。
  • access/s:每秒进行的“访问”RPC调用数
  • getatt/s:每秒RPC调用’ getattr’的次数。

NFSD 客户端相关

  1. # 输出26号,20:00:00到22:00:00,关于NFS服务器活动的统计信息
  2. $ sar -f sa26 -n NFSD -s 20:00:00 -e 22:00:00

输出的各项指标含义如下:

  • scall/s:每秒收到的RPC请求数。
  • badcall/s:每秒收到的不良RPC请求数,这些请求的处理产生了错误。
  • packet/s:每秒接收的网络数据包数。
  • udp/s:每秒接收到的UDP报文数。
  • tcp/s:每秒接收到的TCP报文数
  • hit/s:每秒命中应答缓存的次数
  • miss/s:每秒回复缓存未命中的次数。
  • sread/s:每秒接收到的“读”RPC调用数
  • swrite/s:每秒收到写RPC请求的次数。
  • saccess/s:每秒接收到的“访问”RPC调用数。
  • sgetatt/s:每秒接收到的’ getattr’ RPC调用数。

套接字的使用(IPv4)相关

  1. # 输出26号,20:00:00到22:00:00,关于套接字的使用(IPv4)相关的统计信息
  2. $ sar -f sa26 -n SOCK -s 20:00:00 -e 22:00:00

输出的各项指标含义如下:

  • totsck:系统使用的socket总数。
  • tcpsck:当前正在使用的TCP套接字数量。
  • udpsck:当前使用的UDP套接字的数量。
  • rawsck:当前正在使用的RAW套接字数量。
  • ip-frag:当前排队的IP分片数
  • tcp-tw:处于TIME_WAIT状态的TCP socket数量。

-n指定其他指标信息

在上面,我们使用-n查过nfs和套接字相关的信息,其实还有其他关键字可以指定。如DEV, EDEV, FC, ICMP, EICMP, ICMP6,EICMP6, IP, EIP, IP6, EIP6, NFS, NFSD, SOCK, SOCK6, SOFT,TCP, ETCP, UDP and UDP6.

这里只将官方提供的英文贴到这,有需要的话,自行翻译即可。

  1. -n { keyword[,...] | ALL }
  2. Report network statistics.
  3. Possible keywords are DEV, EDEV, FC, ICMP, EICMP, ICMP6,
  4. EICMP6, IP, EIP, IP6, EIP6, NFS, NFSD, SOCK, SOCK6, SOFT,
  5. TCP, ETCP, UDP and UDP6.
  6. With the DEV keyword, statistics from the network devices
  7. are reported. Statistics for all network interfaces are
  8. displayed unless a restricted list is specified using
  9. option --iface= (see corresponding option entry). The
  10. following values are displayed:
  11. IFACE Name of the network interface for which statistics
  12. are reported.
  13. rxpck/s
  14. Total number of packets received per second.
  15. txpck/s
  16. Total number of packets transmitted per second.
  17. rxkB/s Total number of kilobytes received per second.
  18. txkB/s Total number of kilobytes transmitted per second.
  19. rxcmp/s
  20. Number of compressed packets received per second
  21. (for cslip etc.).
  22. txcmp/s
  23. Number of compressed packets transmitted per
  24. second.
  25. rxmcst/s
  26. Number of multicast packets received per second.
  27. %ifutil
  28. Utilization percentage of the network interface.
  29. For half-duplex interfaces, utilization is
  30. calculated using the sum of rxkB/s and txkB/s as a
  31. percentage of the interface speed. For full-duplex,
  32. this is the greater of rxkB/S or txkB/s.
  33. With the EDEV keyword, statistics on failures (errors)
  34. from the network devices are reported. Statistics for all
  35. network interfaces are displayed unless a restricted list
  36. is specified using option --iface= (see corresponding
  37. option entry). The following values are displayed:
  38. IFACE Name of the network interface for which statistics
  39. are reported.
  40. rxerr/s
  41. Total number of bad packets received per second.
  42. txerr/s
  43. Total number of errors that happened per second
  44. while transmitting packets.
  45. coll/s Number of collisions that happened per second while
  46. transmitting packets.
  47. rxdrop/s
  48. Number of received packets dropped per second
  49. because of a lack of space in linux buffers.
  50. txdrop/s
  51. Number of transmitted packets dropped per second
  52. because of a lack of space in linux buffers.
  53. txcarr/s
  54. Number of carrier-errors that happened per second
  55. while transmitting packets.
  56. rxfram/s
  57. Number of frame alignment errors that happened per
  58. second on received packets.
  59. rxfifo/s
  60. Number of FIFO overrun errors that happened per
  61. second on received packets.
  62. txfifo/s
  63. Number of FIFO overrun errors that happened per
  64. second on transmitted packets.
  65. With the FC keyword, statistics about fibre channel
  66. traffic are reported. Note that fibre channel statistics
  67. depend on sadc's option -S DISK to be collected. The
  68. following values are displayed:
  69. FCHOST Name of the fibre channel host bus adapter (HBA)
  70. interface for which statistics are reported.
  71. fch_rxf/s
  72. The total number of frames received per second.
  73. fch_txf/s
  74. The total number of frames transmitted per second.
  75. fch_rxw/s
  76. The total number of transmission words received per
  77. second.
  78. fch_txw/s
  79. The total number of transmission words transmitted
  80. per second.
  81. With the ICMP keyword, statistics about ICMPv4 network
  82. traffic are reported. Note that ICMPv4 statistics depend
  83. on sadc's option -S SNMP to be collected. The following
  84. values are displayed (formal SNMP names between square
  85. brackets):
  86. imsg/s The total number of ICMP messages which the entity
  87. received per second [icmpInMsgs]. Note that this
  88. counter includes all those counted by ierr/s.
  89. omsg/s The total number of ICMP messages which this entity
  90. attempted to send per second [icmpOutMsgs]. Note
  91. that this counter includes all those counted by
  92. oerr/s.
  93. iech/s The number of ICMP Echo (request) messages received
  94. per second [icmpInEchos].
  95. iechr/s
  96. The number of ICMP Echo Reply messages received per
  97. second [icmpInEchoReps].
  98. oech/s The number of ICMP Echo (request) messages sent per
  99. second [icmpOutEchos].
  100. oechr/s
  101. The number of ICMP Echo Reply messages sent per
  102. second [icmpOutEchoReps].
  103. itm/s The number of ICMP Timestamp (request) messages
  104. received per second [icmpInTimestamps].
  105. itmr/s The number of ICMP Timestamp Reply messages
  106. received per second [icmpInTimestampReps].
  107. otm/s The number of ICMP Timestamp (request) messages
  108. sent per second [icmpOutTimestamps].
  109. otmr/s The number of ICMP Timestamp Reply messages sent
  110. per second [icmpOutTimestampReps].
  111. iadrmk/s
  112. The number of ICMP Address Mask Request messages
  113. received per second [icmpInAddrMasks].
  114. iadrmkr/s
  115. The number of ICMP Address Mask Reply messages
  116. received per second [icmpInAddrMaskReps].
  117. oadrmk/s
  118. The number of ICMP Address Mask Request messages
  119. sent per second [icmpOutAddrMasks].
  120. oadrmkr/s
  121. The number of ICMP Address Mask Reply messages sent
  122. per second [icmpOutAddrMaskReps].
  123. With the EICMP keyword, statistics about ICMPv4 error
  124. messages are reported. Note that ICMPv4 statistics depend
  125. on sadc's option -S SNMP to be collected. The following
  126. values are displayed (formal SNMP names between square
  127. brackets):
  128. ierr/s The number of ICMP messages per second which the
  129. entity received but determined as having ICMP-
  130. specific errors (bad ICMP checksums, bad length,
  131. etc.) [icmpInErrors].
  132. oerr/s The number of ICMP messages per second which this
  133. entity did not send due to problems discovered
  134. within ICMP such as a lack of buffers
  135. [icmpOutErrors].
  136. idstunr/s
  137. The number of ICMP Destination Unreachable messages
  138. received per second [icmpInDestUnreachs].
  139. odstunr/s
  140. The number of ICMP Destination Unreachable messages
  141. sent per second [icmpOutDestUnreachs].
  142. itmex/s
  143. The number of ICMP Time Exceeded messages received
  144. per second [icmpInTimeExcds].
  145. otmex/s
  146. The number of ICMP Time Exceeded messages sent per
  147. second [icmpOutTimeExcds].
  148. iparmpb/s
  149. The number of ICMP Parameter Problem messages
  150. received per second [icmpInParmProbs].
  151. oparmpb/s
  152. The number of ICMP Parameter Problem messages sent
  153. per second [icmpOutParmProbs].
  154. isrcq/s
  155. The number of ICMP Source Quench messages received
  156. per second [icmpInSrcQuenchs].
  157. osrcq/s
  158. The number of ICMP Source Quench messages sent per
  159. second [icmpOutSrcQuenchs].
  160. iredir/s
  161. The number of ICMP Redirect messages received per
  162. second [icmpInRedirects].
  163. oredir/s
  164. The number of ICMP Redirect messages sent per
  165. second [icmpOutRedirects].
  166. With the ICMP6 keyword, statistics about ICMPv6 network
  167. traffic are reported. Note that ICMPv6 statistics depend
  168. on sadc's option -S IPV6 to be collected. The following
  169. values are displayed (formal SNMP names between square
  170. brackets):
  171. imsg6/s
  172. The total number of ICMP messages received by the
  173. interface per second which includes all those
  174. counted by ierr6/s [ipv6IfIcmpInMsgs].
  175. omsg6/s
  176. The total number of ICMP messages which this
  177. interface attempted to send per second
  178. [ipv6IfIcmpOutMsgs].
  179. iech6/s
  180. The number of ICMP Echo (request) messages received
  181. by the interface per second [ipv6IfIcmpInEchos].
  182. iechr6/s
  183. The number of ICMP Echo Reply messages received by
  184. the interface per second [ipv6IfIcmpInEchoReplies].
  185. oechr6/s
  186. The number of ICMP Echo Reply messages sent by the
  187. interface per second [ipv6IfIcmpOutEchoReplies].
  188. igmbq6/s
  189. The number of ICMPv6 Group Membership Query
  190. messages received by the interface per second
  191. [ipv6IfIcmpInGroupMembQueries].
  192. igmbr6/s
  193. The number of ICMPv6 Group Membership Response
  194. messages received by the interface per second
  195. [ipv6IfIcmpInGroupMembResponses].
  196. ogmbr6/s
  197. The number of ICMPv6 Group Membership Response
  198. messages sent per second
  199. [ipv6IfIcmpOutGroupMembResponses].
  200. igmbrd6/s
  201. The number of ICMPv6 Group Membership Reduction
  202. messages received by the interface per second
  203. [ipv6IfIcmpInGroupMembReductions].
  204. ogmbrd6/s
  205. The number of ICMPv6 Group Membership Reduction
  206. messages sent per second
  207. [ipv6IfIcmpOutGroupMembReductions].
  208. irtsol6/s
  209. The number of ICMP Router Solicit messages received
  210. by the interface per second
  211. [ipv6IfIcmpInRouterSolicits].
  212. ortsol6/s
  213. The number of ICMP Router Solicitation messages
  214. sent by the interface per second
  215. [ipv6IfIcmpOutRouterSolicits].
  216. irtad6/s
  217. The number of ICMP Router Advertisement messages
  218. received by the interface per second
  219. [ipv6IfIcmpInRouterAdvertisements].
  220. inbsol6/s
  221. The number of ICMP Neighbor Solicit messages
  222. received by the interface per second
  223. [ipv6IfIcmpInNeighborSolicits].
  224. onbsol6/s
  225. The number of ICMP Neighbor Solicitation messages
  226. sent by the interface per second
  227. [ipv6IfIcmpOutNeighborSolicits].
  228. inbad6/s
  229. The number of ICMP Neighbor Advertisement messages
  230. received by the interface per second
  231. [ipv6IfIcmpInNeighborAdvertisements].
  232. onbad6/s
  233. The number of ICMP Neighbor Advertisement messages
  234. sent by the interface per second
  235. [ipv6IfIcmpOutNeighborAdvertisements].
  236. With the EICMP6 keyword, statistics about ICMPv6 error
  237. messages are reported. Note that ICMPv6 statistics depend
  238. on sadc's option -S IPV6 to be collected. The following
  239. values are displayed (formal SNMP names between square
  240. brackets):
  241. ierr6/s
  242. The number of ICMP messages per second which the
  243. interface received but determined as having ICMP-
  244. specific errors (bad ICMP checksums, bad length,
  245. etc.) [ipv6IfIcmpInErrors]
  246. idtunr6/s
  247. The number of ICMP Destination Unreachable messages
  248. received by the interface per second
  249. [ipv6IfIcmpInDestUnreachs].
  250. odtunr6/s
  251. The number of ICMP Destination Unreachable messages
  252. sent by the interface per second
  253. [ipv6IfIcmpOutDestUnreachs].
  254. itmex6/s
  255. The number of ICMP Time Exceeded messages received
  256. by the interface per second
  257. [ipv6IfIcmpInTimeExcds].
  258. otmex6/s
  259. The number of ICMP Time Exceeded messages sent by
  260. the interface per second [ipv6IfIcmpOutTimeExcds].
  261. iprmpb6/s
  262. The number of ICMP Parameter Problem messages
  263. received by the interface per second
  264. [ipv6IfIcmpInParmProblems].
  265. oprmpb6/s
  266. The number of ICMP Parameter Problem messages sent
  267. by the interface per second
  268. [ipv6IfIcmpOutParmProblems].
  269. iredir6/s
  270. The number of Redirect messages received by the
  271. interface per second [ipv6IfIcmpInRedirects].
  272. oredir6/s
  273. The number of Redirect messages sent by the
  274. interface by second [ipv6IfIcmpOutRedirects].
  275. ipck2b6/s
  276. The number of ICMP Packet Too Big messages received
  277. by the interface per second
  278. [ipv6IfIcmpInPktTooBigs].
  279. opck2b6/s
  280. The number of ICMP Packet Too Big messages sent by
  281. the interface per second [ipv6IfIcmpOutPktTooBigs].
  282. With the IP keyword, statistics about IPv4 network traffic
  283. are reported. Note that IPv4 statistics depend on sadc's
  284. option -S SNMP to be collected. The following values are
  285. displayed (formal SNMP names between square brackets):
  286. irec/s The total number of input datagrams received from
  287. interfaces per second, including those received in
  288. error [ipInReceives].
  289. fwddgm/s
  290. The number of input datagrams per second, for which
  291. this entity was not their final IP destination, as
  292. a result of which an attempt was made to find a
  293. route to forward them to that final destination
  294. [ipForwDatagrams].
  295. idel/s The total number of input datagrams successfully
  296. delivered per second to IP user-protocols
  297. (including ICMP) [ipInDelivers].
  298. orq/s The total number of IP datagrams which local IP
  299. user-protocols (including ICMP) supplied per second
  300. to IP in requests for transmission [ipOutRequests].
  301. Note that this counter does not include any
  302. datagrams counted in fwddgm/s.
  303. asmrq/s
  304. The number of IP fragments received per second
  305. which needed to be reassembled at this entity
  306. [ipReasmReqds].
  307. asmok/s
  308. The number of IP datagrams successfully re-
  309. assembled per second [ipReasmOKs].
  310. fragok/s
  311. The number of IP datagrams that have been
  312. successfully fragmented at this entity per second
  313. [ipFragOKs].
  314. fragcrt/s
  315. The number of IP datagram fragments that have been
  316. generated per second as a result of fragmentation
  317. at this entity [ipFragCreates].
  318. With the EIP keyword, statistics about IPv4 network errors
  319. are reported. Note that IPv4 statistics depend on sadc's
  320. option -S SNMP to be collected. The following values are
  321. displayed (formal SNMP names between square brackets):
  322. ihdrerr/s
  323. The number of input datagrams discarded per second
  324. due to errors in their IP headers, including bad
  325. checksums, version number mismatch, other format
  326. errors, time-to-live exceeded, errors discovered in
  327. processing their IP options, etc. [ipInHdrErrors]
  328. iadrerr/s
  329. The number of input datagrams discarded per second
  330. because the IP address in their IP header's
  331. destination field was not a valid address to be
  332. received at this entity. This count includes
  333. invalid addresses (e.g., 0.0.0.0) and addresses of
  334. unsupported Classes (e.g., Class E). For entities
  335. which are not IP routers and therefore do not
  336. forward datagrams, this counter includes datagrams
  337. discarded because the destination address was not a
  338. local address [ipInAddrErrors].
  339. iukwnpr/s
  340. The number of locally-addressed datagrams received
  341. successfully but discarded per second because of an
  342. unknown or unsupported protocol
  343. [ipInUnknownProtos].
  344. idisc/s
  345. The number of input IP datagrams per second for
  346. which no problems were encountered to prevent their
  347. continued processing, but which were discarded
  348. (e.g., for lack of buffer space) [ipInDiscards].
  349. Note that this counter does not include any
  350. datagrams discarded while awaiting re-assembly.
  351. odisc/s
  352. The number of output IP datagrams per second for
  353. which no problem was encountered to prevent their
  354. transmission to their destination, but which were
  355. discarded (e.g., for lack of buffer space)
  356. [ipOutDiscards]. Note that this counter would
  357. include datagrams counted in fwddgm/s if any such
  358. packets met this (discretionary) discard criterion.
  359. onort/s
  360. The number of IP datagrams discarded per second
  361. because no route could be found to transmit them to
  362. their destination [ipOutNoRoutes]. Note that this
  363. counter includes any packets counted in fwddgm/s
  364. which meet this 'no-route' criterion. Note that
  365. this includes any datagrams which a host cannot
  366. route because all of its default routers are down.
  367. asmf/s The number of failures detected per second by the
  368. IP re-assembly algorithm (for whatever reason:
  369. timed out, errors, etc) [ipReasmFails]. Note that
  370. this is not necessarily a count of discarded IP
  371. fragments since some algorithms can lose track of
  372. the number of fragments by combining them as they
  373. are received.
  374. fragf/s
  375. The number of IP datagrams that have been discarded
  376. per second because they needed to be fragmented at
  377. this entity but could not be, e.g., because their
  378. Don't Fragment flag was set [ipFragFails].
  379. With the IP6 keyword, statistics about IPv6 network
  380. traffic are reported. Note that IPv6 statistics depend on
  381. sadc's option -S IPV6 to be collected. The following
  382. values are displayed (formal SNMP names between square
  383. brackets):
  384. irec6/s
  385. The total number of input datagrams received from
  386. interfaces per second, including those received in
  387. error [ipv6IfStatsInReceives].
  388. fwddgm6/s
  389. The number of output datagrams per second which
  390. this entity received and forwarded to their final
  391. destinations [ipv6IfStatsOutForwDatagrams].
  392. idel6/s
  393. The total number of datagrams successfully
  394. delivered per second to IPv6 user-protocols
  395. (including ICMP) [ipv6IfStatsInDelivers].
  396. orq6/s The total number of IPv6 datagrams which local IPv6
  397. user-protocols (including ICMP) supplied per second
  398. to IPv6 in requests for transmission
  399. [ipv6IfStatsOutRequests]. Note that this counter
  400. does not include any datagrams counted in
  401. fwddgm6/s.
  402. asmrq6/s
  403. The number of IPv6 fragments received per second
  404. which needed to be reassembled at this interface
  405. [ipv6IfStatsReasmReqds].
  406. asmok6/s
  407. The number of IPv6 datagrams successfully
  408. reassembled per second [ipv6IfStatsReasmOKs].
  409. imcpck6/s
  410. The number of multicast packets received per second
  411. by the interface [ipv6IfStatsInMcastPkts].
  412. omcpck6/s
  413. The number of multicast packets transmitted per
  414. second by the interface [ipv6IfStatsOutMcastPkts].
  415. fragok6/s
  416. The number of IPv6 datagrams that have been
  417. successfully fragmented at this output interface
  418. per second [ipv6IfStatsOutFragOKs].
  419. fragcr6/s
  420. The number of output datagram fragments that have
  421. been generated per second as a result of
  422. fragmentation at this output interface
  423. [ipv6IfStatsOutFragCreates].
  424. With the EIP6 keyword, statistics about IPv6 network
  425. errors are reported. Note that IPv6 statistics depend on
  426. sadc's option -S IPV6 to be collected. The following
  427. values are displayed (formal SNMP names between square
  428. brackets):
  429. ihdrer6/s
  430. The number of input datagrams discarded per second
  431. due to errors in their IPv6 headers, including
  432. version number mismatch, other format errors, hop
  433. count exceeded, errors discovered in processing
  434. their IPv6 options, etc. [ipv6IfStatsInHdrErrors]
  435. iadrer6/s
  436. The number of input datagrams discarded per second
  437. because the IPv6 address in their IPv6 header's
  438. destination field was not a valid address to be
  439. received at this entity. This count includes
  440. invalid addresses (e.g., ::0) and unsupported
  441. addresses (e.g., addresses with unallocated
  442. prefixes). For entities which are not IPv6 routers
  443. and therefore do not forward datagrams, this
  444. counter includes datagrams discarded because the
  445. destination address was not a local address
  446. [ipv6IfStatsInAddrErrors].
  447. iukwnp6/s
  448. The number of locally-addressed datagrams received
  449. successfully but discarded per second because of an
  450. unknown or unsupported protocol
  451. [ipv6IfStatsInUnknownProtos].
  452. i2big6/s
  453. The number of input datagrams that could not be
  454. forwarded per second because their size exceeded
  455. the link MTU of outgoing interface
  456. [ipv6IfStatsInTooBigErrors].
  457. idisc6/s
  458. The number of input IPv6 datagrams per second for
  459. which no problems were encountered to prevent their
  460. continued processing, but which were discarded
  461. (e.g., for lack of buffer space)
  462. [ipv6IfStatsInDiscards]. Note that this counter
  463. does not include any datagrams discarded while
  464. awaiting re-assembly.
  465. odisc6/s
  466. The number of output IPv6 datagrams per second for
  467. which no problem was encountered to prevent their
  468. transmission to their destination, but which were
  469. discarded (e.g., for lack of buffer space)
  470. [ipv6IfStatsOutDiscards]. Note that this counter
  471. would include datagrams counted in fwddgm6/s if any
  472. such packets met this (discretionary) discard
  473. criterion.
  474. inort6/s
  475. The number of input datagrams discarded per second
  476. because no route could be found to transmit them to
  477. their destination [ipv6IfStatsInNoRoutes].
  478. onort6/s
  479. The number of locally generated IP datagrams
  480. discarded per second because no route could be
  481. found to transmit them to their destination
  482. [unknown formal SNMP name].
  483. asmf6/s
  484. The number of failures detected per second by the
  485. IPv6 re-assembly algorithm (for whatever reason:
  486. timed out, errors, etc.) [ipv6IfStatsReasmFails].
  487. Note that this is not necessarily a count of
  488. discarded IPv6 fragments since some algorithms can
  489. lose track of the number of fragments by combining
  490. them as they are received.
  491. fragf6/s
  492. The number of IPv6 datagrams that have been
  493. discarded per second because they needed to be
  494. fragmented at this output interface but could not
  495. be [ipv6IfStatsOutFragFails].
  496. itrpck6/s
  497. The number of input datagrams discarded per second
  498. because datagram frame didn't carry enough data
  499. [ipv6IfStatsInTruncatedPkts].
  500. With the NFS keyword, statistics about NFS client activity
  501. are reported. The following values are displayed:
  502. call/s Number of RPC requests made per second.
  503. retrans/s
  504. Number of RPC requests per second, those which
  505. needed to be retransmitted (for example because of
  506. a server timeout).
  507. read/s Number of 'read' RPC calls made per second.
  508. write/s
  509. Number of 'write' RPC calls made per second.
  510. access/s
  511. Number of 'access' RPC calls made per second.
  512. getatt/s
  513. Number of 'getattr' RPC calls made per second.
  514. With the NFSD keyword, statistics about NFS server
  515. activity are reported. The following values are
  516. displayed:
  517. scall/s
  518. Number of RPC requests received per second.
  519. badcall/s
  520. Number of bad RPC requests received per second,
  521. those whose processing generated an error.
  522. packet/s
  523. Number of network packets received per second.
  524. udp/s Number of UDP packets received per second.
  525. tcp/s Number of TCP packets received per second.
  526. hit/s Number of reply cache hits per second.
  527. miss/s Number of reply cache misses per second.
  528. sread/s
  529. Number of 'read' RPC calls received per second.
  530. swrite/s
  531. Number of 'write' RPC calls received per second.
  532. saccess/s
  533. Number of 'access' RPC calls received per second.
  534. sgetatt/s
  535. Number of 'getattr' RPC calls received per second.
  536. With the SOCK keyword, statistics on sockets in use are
  537. reported (IPv4). The following values are displayed:
  538. totsck Total number of sockets used by the system.
  539. tcpsck Number of TCP sockets currently in use.
  540. udpsck Number of UDP sockets currently in use.
  541. rawsck Number of RAW sockets currently in use.
  542. ip-frag
  543. Number of IP fragments currently in queue.
  544. tcp-tw Number of TCP sockets in TIME_WAIT state.
  545. With the SOCK6 keyword, statistics on sockets in use are
  546. reported (IPv6). Note that IPv6 statistics depend on
  547. sadc's option -S IPV6 to be collected. The following
  548. values are displayed:
  549. tcp6sck
  550. Number of TCPv6 sockets currently in use.
  551. udp6sck
  552. Number of UDPv6 sockets currently in use.
  553. raw6sck
  554. Number of RAWv6 sockets currently in use.
  555. ip6-frag
  556. Number of IPv6 fragments currently in use.
  557. With the SOFT keyword, statistics about software-based
  558. network processing are reported. The following values are
  559. displayed:
  560. total/s
  561. The total number of network frames processed per
  562. second.
  563. dropd/s
  564. The total number of network frames dropped per
  565. second because there was no room on the processing
  566. queue.
  567. squeezd/s
  568. The number of times the softirq handler function
  569. terminated per second because its budget was
  570. consumed or the time limit was reached, but more
  571. work could have been done.
  572. rx_rps/s
  573. The number of times the CPU has been woken up per
  574. second to process packets via an inter-processor
  575. interrupt.
  576. flw_lim/s
  577. The number of times the flow limit has been reached
  578. per second. Flow limiting is an optional RPS
  579. feature that can be used to limit the number of
  580. packets queued to the backlog for each flow to a
  581. certain amount. This can help ensure that smaller
  582. flows are processed even though much larger flows
  583. are pushing packets in.
  584. With the TCP keyword, statistics about TCPv4 network
  585. traffic are reported. Note that TCPv4 statistics depend
  586. on sadc's option -S SNMP to be collected. The following
  587. values are displayed (formal SNMP names between square
  588. brackets):
  589. active/s
  590. The number of times TCP connections have made a
  591. direct transition to the SYN-SENT state from the
  592. CLOSED state per second [tcpActiveOpens].
  593. passive/s
  594. The number of times TCP connections have made a
  595. direct transition to the SYN-RCVD state from the
  596. LISTEN state per second [tcpPassiveOpens].
  597. iseg/s The total number of segments received per second,
  598. including those received in error [tcpInSegs].
  599. This count includes segments received on currently
  600. established connections.
  601. oseg/s The total number of segments sent per second,
  602. including those on current connections but
  603. excluding those containing only retransmitted
  604. octets [tcpOutSegs].
  605. With the ETCP keyword, statistics about TCPv4 network
  606. errors are reported. Note that TCPv4 statistics depend on
  607. sadc's option -S SNMP to be collected. The following
  608. values are displayed (formal SNMP names between square
  609. brackets):
  610. atmptf/s
  611. The number of times per second TCP connections have
  612. made a direct transition to the CLOSED state from
  613. either the SYN-SENT state or the SYN-RCVD state,
  614. plus the number of times per second TCP connections
  615. have made a direct transition to the LISTEN state
  616. from the SYN-RCVD state [tcpAttemptFails].
  617. estres/s
  618. The number of times per second TCP connections have
  619. made a direct transition to the CLOSED state from
  620. either the ESTABLISHED state or the CLOSE-WAIT
  621. state [tcpEstabResets].
  622. retrans/s
  623. The total number of segments retransmitted per
  624. second - that is, the number of TCP segments
  625. transmitted containing one or more previously
  626. transmitted octets [tcpRetransSegs].
  627. isegerr/s
  628. The total number of segments received in error
  629. (e.g., bad TCP checksums) per second [tcpInErrs].
  630. orsts/s
  631. The number of TCP segments sent per second
  632. containing the RST flag [tcpOutRsts].
  633. With the UDP keyword, statistics about UDPv4 network
  634. traffic are reported. Note that UDPv4 statistics depend
  635. on sadc's option -S SNMP to be collected. The following
  636. values are displayed (formal SNMP names between square
  637. brackets):
  638. idgm/s The total number of UDP datagrams delivered per
  639. second to UDP users [udpInDatagrams].
  640. odgm/s The total number of UDP datagrams sent per second
  641. from this entity [udpOutDatagrams].
  642. noport/s
  643. The total number of received UDP datagrams per
  644. second for which there was no application at the
  645. destination port [udpNoPorts].
  646. idgmerr/s
  647. The number of received UDP datagrams per second
  648. that could not be delivered for reasons other than
  649. the lack of an application at the destination port
  650. [udpInErrors].
  651. With the UDP6 keyword, statistics about UDPv6 network
  652. traffic are reported. Note that UDPv6 statistics depend
  653. on sadc's option -S IPV6 to be collected. The following
  654. values are displayed (formal SNMP names between square
  655. brackets):
  656. idgm6/s
  657. The total number of UDP datagrams delivered per
  658. second to UDP users [udpInDatagrams].
  659. odgm6/s
  660. The total number of UDP datagrams sent per second
  661. from this entity [udpOutDatagrams].
  662. noport6/s
  663. The total number of received UDP datagrams per
  664. second for which there was no application at the
  665. destination port [udpNoPorts].
  666. idgmer6/s
  667. The number of received UDP datagrams per second
  668. that could not be delivered for reasons other than
  669. the lack of an application at the destination port
  670. [udpInErrors].
  671. The ALL keyword is equivalent to specifying all the
  672. keywords above and therefore all the network activities
  673. are reported.