title: linux历史问题排查神器-sar命令 #标题tags: #标签
date: 2022-01-28
categories: linux大杂烩 # 分类
工作中总会碰到几次要分析机器历史问题的需求,之前没有系统化的整理过,也没有深入的去理解那些排查系统性能工具的指标输出,导致在遇上这种需求的时候,总是心虚,能搪塞过去就搪塞过去,不过随着工作年限的增加,遇到这种需求,再说不出个123来,就配不上工牌上那“高级运维工程师”几个字了。这篇文章,就来拆解下这个linux历史问题排查神器-sar命令 。
参考资料:
- Linux manual page
- SAR system accounting utility
- 系统命令:man sar
如果你的系统没有安装sysstat
这个包,那么是没有sar命令的,也不会有可分析的文件,需要执行命令yum -y install sysstat
去安装,安装完成后,就有sar命令了。同时也会自动生成相关目录及计划任务/etc/cron.d/sysstat
。
sar常用命令
假设你要全面的分析系统指标,又没有足够的耐心将这篇文章看完,想着现学现卖,那么直接执行下面的命令,然后去看系统输出的各项指标吧,看不懂的,就来这个页面搜索下指标名称,就可以找到对应的解释,如果文章中没有解释,那就需要去文章开头附的参考资料中寻找答案了。
万能的sar命令如下:
# 输出26日的20:00:01到23:00:01之间的所有报告
$ sar -f sa26 -A -s 20:00:01 -e 23:00:01 | less
# 每隔3s打印下当前系统的所有性能指标并输出到/tmp/sar_3.log文件中
$ 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相关指标
# 输出26号,20:00:00到22:00:00,CPU相关的指标(-P ALL:输出每个核心的详细指标信息)
$ 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。
任务创建和系统切换活动相关
# 输出26号,20:00:00到22:00:00,任务创建和系统切换活动相关指标
$ sar -f sa26 -w -s 20:00:00 -e 22:00:00
各项指标解释如下:
- proc/s:每秒创建的总任务数
- cswch/s:每秒上下文切换的总数。
系统负载相关
# 输出26号,20:00:00到22:00:00,进程队列长度和平均负载状态的指标
$ 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完成的任务数。
内存统计信息相关
# 输出26号,20:00:00到22:00:00,内存统计信息相关的指标
$ sar -f sa26 -R -s 20:00:00 -e 22:00:00
输出的各项指标含义如下:
- frmpg/s:系统每秒释放的内存页数。负数表示系统分配的页面数。注意,根据机器的体系结构,页面的大小为4 kB或8 kB。
- bufpg/s:每秒系统用作缓冲区的额外内存页数。负值意味着系统使用更少的页作为缓冲区。
- campg/s:系统每秒缓存的额外内存页数。负值意味着缓存中的页面更少。
内存和交换空间相关
# 输出26号,20:00:00到22:00:00,内存和交换空间相关的指标
$ 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为单位的内存量。
系统交换活动相关信息
# 输出26号,20:00:00到22:00:00,系统交换活动相关的指标
$ sar -f sa26 -W -s 20:00:00 -e 22:00:00
输出的各项指标含义如下:
- pswpin/s:每秒系统换入的交换页面(swap page)数量
- pswpout/s:每秒系统换出的交换页面(swap page)数量
内存分页相关
# 输出26号,20:00:00到22:00:00,内存和交换空间相关的指标
$ 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:每秒清除的页占总扫描页的百分比。
网络设备统计相关
# 输出26号,20:00:00到22:00:00,eth0这块网卡的网络设备统计相关的指标
# 省略egrep的话,输出所有网卡,也可以egrep中填入多块网卡名称,| 分隔即可
$ 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)包的总数排查网络设备故障。
网络设备故障相关
# 输出26号,20:00:00到22:00:00,eth0这块网卡的故障相关的指标(省略egrep的话,输出所有网卡,也可以egrep中填入多块网卡名称,| 分隔即可)
$ 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和传送速率
# 输出26号,20:00:00到22:00:00,机器上所有I/O和传送速率相关指标
$ 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
磁盘相关
# 输出26号,20:00:00到22:00:00,机器上所有磁盘的使用相关指标
$ sar -f sa26 -d -p -s 20:00:00 -e 22:00:00
# -p:打印设备的名字。此选项与选项-d一起使用。默认不加-p的话情况下,名称打印为dev m-n,
# 其中m和n为设备的主号码和副号码。使用-p选项将显示设备名,易读性更高。
# 设备的主号码和副号码可以通过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利用率相关
# 输出26号,20:00:00到22:00:00,机器上交换空间swap利用率相关指标
$ 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:缓存的交换内存与已用交换空间的比例。
大量页面的利用率统计数据
# 输出26号,20:00:00到22:00:00, 大量页面的利用率统计数据相关指标
$ sar -f sa26 -H -s 20:00:00 -e 22:00:00
输出的各项指标含义如下:
- kbhugfree:未分配的大页面内存数量(以KB为单位)。
- kbhugused:已分配的大页面内存数量(以KB为单位)。
- %hugused:已分配的大页内存占总内存的百分比。
inode、file和其他内核相关
# 输出26号,20:00:00到22:00:00,inode、file和其他内核相关指标
$ sar -f sa26 -v -s 20:00:00 -e 22:00:00
输出的各项指标含义如下:
- dentunusd:目录缓存中未使用的缓存条目数。
- file-nr:系统使用的块句柄数。
- inode-nr:系统使用的inode句柄数
- pty-nr:系统使用的伪终端数目,如果此时没人登录着系统,则此值应该为0。
TTY设备活动相关
# 输出26号,20:00:00到22:00:00,TTY设备活动相关指标
$ 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客户端相关
# 输出26号,20:00:00到22:00:00,关于NFS客户端活动的统计信息。
$ 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 客户端相关
# 输出26号,20:00:00到22:00:00,关于NFS服务器活动的统计信息
$ 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)相关
# 输出26号,20:00:00到22:00:00,关于套接字的使用(IPv4)相关的统计信息
$ 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.
这里只将官方提供的英文贴到这,有需要的话,自行翻译即可。
-n { keyword[,...] | ALL }
Report network statistics.
Possible keywords are DEV, EDEV, FC, ICMP, EICMP, ICMP6,
EICMP6, IP, EIP, IP6, EIP6, NFS, NFSD, SOCK, SOCK6, SOFT,
TCP, ETCP, UDP and UDP6.
With the DEV keyword, statistics from the network devices
are reported. Statistics for all network interfaces are
displayed unless a restricted list is specified using
option --iface= (see corresponding option entry). The
following values are displayed:
IFACE Name of the network interface for which statistics
are reported.
rxpck/s
Total number of packets received per second.
txpck/s
Total number of packets transmitted per second.
rxkB/s Total number of kilobytes received per second.
txkB/s Total number of kilobytes transmitted per second.
rxcmp/s
Number of compressed packets received per second
(for cslip etc.).
txcmp/s
Number of compressed packets transmitted per
second.
rxmcst/s
Number of multicast packets received per second.
%ifutil
Utilization percentage of the network interface.
For half-duplex interfaces, utilization is
calculated using the sum of rxkB/s and txkB/s as a
percentage of the interface speed. For full-duplex,
this is the greater of rxkB/S or txkB/s.
With the EDEV keyword, statistics on failures (errors)
from the network devices are reported. Statistics for all
network interfaces are displayed unless a restricted list
is specified using option --iface= (see corresponding
option entry). The following values are displayed:
IFACE Name of the network interface for which statistics
are reported.
rxerr/s
Total number of bad packets received per second.
txerr/s
Total number of errors that happened per second
while transmitting packets.
coll/s Number of collisions that happened per second while
transmitting packets.
rxdrop/s
Number of received packets dropped per second
because of a lack of space in linux buffers.
txdrop/s
Number of transmitted packets dropped per second
because of a lack of space in linux buffers.
txcarr/s
Number of carrier-errors that happened per second
while transmitting packets.
rxfram/s
Number of frame alignment errors that happened per
second on received packets.
rxfifo/s
Number of FIFO overrun errors that happened per
second on received packets.
txfifo/s
Number of FIFO overrun errors that happened per
second on transmitted packets.
With the FC keyword, statistics about fibre channel
traffic are reported. Note that fibre channel statistics
depend on sadc's option -S DISK to be collected. The
following values are displayed:
FCHOST Name of the fibre channel host bus adapter (HBA)
interface for which statistics are reported.
fch_rxf/s
The total number of frames received per second.
fch_txf/s
The total number of frames transmitted per second.
fch_rxw/s
The total number of transmission words received per
second.
fch_txw/s
The total number of transmission words transmitted
per second.
With the ICMP keyword, statistics about ICMPv4 network
traffic are reported. Note that ICMPv4 statistics depend
on sadc's option -S SNMP to be collected. The following
values are displayed (formal SNMP names between square
brackets):
imsg/s The total number of ICMP messages which the entity
received per second [icmpInMsgs]. Note that this
counter includes all those counted by ierr/s.
omsg/s The total number of ICMP messages which this entity
attempted to send per second [icmpOutMsgs]. Note
that this counter includes all those counted by
oerr/s.
iech/s The number of ICMP Echo (request) messages received
per second [icmpInEchos].
iechr/s
The number of ICMP Echo Reply messages received per
second [icmpInEchoReps].
oech/s The number of ICMP Echo (request) messages sent per
second [icmpOutEchos].
oechr/s
The number of ICMP Echo Reply messages sent per
second [icmpOutEchoReps].
itm/s The number of ICMP Timestamp (request) messages
received per second [icmpInTimestamps].
itmr/s The number of ICMP Timestamp Reply messages
received per second [icmpInTimestampReps].
otm/s The number of ICMP Timestamp (request) messages
sent per second [icmpOutTimestamps].
otmr/s The number of ICMP Timestamp Reply messages sent
per second [icmpOutTimestampReps].
iadrmk/s
The number of ICMP Address Mask Request messages
received per second [icmpInAddrMasks].
iadrmkr/s
The number of ICMP Address Mask Reply messages
received per second [icmpInAddrMaskReps].
oadrmk/s
The number of ICMP Address Mask Request messages
sent per second [icmpOutAddrMasks].
oadrmkr/s
The number of ICMP Address Mask Reply messages sent
per second [icmpOutAddrMaskReps].
With the EICMP keyword, statistics about ICMPv4 error
messages are reported. Note that ICMPv4 statistics depend
on sadc's option -S SNMP to be collected. The following
values are displayed (formal SNMP names between square
brackets):
ierr/s The number of ICMP messages per second which the
entity received but determined as having ICMP-
specific errors (bad ICMP checksums, bad length,
etc.) [icmpInErrors].
oerr/s The number of ICMP messages per second which this
entity did not send due to problems discovered
within ICMP such as a lack of buffers
[icmpOutErrors].
idstunr/s
The number of ICMP Destination Unreachable messages
received per second [icmpInDestUnreachs].
odstunr/s
The number of ICMP Destination Unreachable messages
sent per second [icmpOutDestUnreachs].
itmex/s
The number of ICMP Time Exceeded messages received
per second [icmpInTimeExcds].
otmex/s
The number of ICMP Time Exceeded messages sent per
second [icmpOutTimeExcds].
iparmpb/s
The number of ICMP Parameter Problem messages
received per second [icmpInParmProbs].
oparmpb/s
The number of ICMP Parameter Problem messages sent
per second [icmpOutParmProbs].
isrcq/s
The number of ICMP Source Quench messages received
per second [icmpInSrcQuenchs].
osrcq/s
The number of ICMP Source Quench messages sent per
second [icmpOutSrcQuenchs].
iredir/s
The number of ICMP Redirect messages received per
second [icmpInRedirects].
oredir/s
The number of ICMP Redirect messages sent per
second [icmpOutRedirects].
With the ICMP6 keyword, statistics about ICMPv6 network
traffic are reported. Note that ICMPv6 statistics depend
on sadc's option -S IPV6 to be collected. The following
values are displayed (formal SNMP names between square
brackets):
imsg6/s
The total number of ICMP messages received by the
interface per second which includes all those
counted by ierr6/s [ipv6IfIcmpInMsgs].
omsg6/s
The total number of ICMP messages which this
interface attempted to send per second
[ipv6IfIcmpOutMsgs].
iech6/s
The number of ICMP Echo (request) messages received
by the interface per second [ipv6IfIcmpInEchos].
iechr6/s
The number of ICMP Echo Reply messages received by
the interface per second [ipv6IfIcmpInEchoReplies].
oechr6/s
The number of ICMP Echo Reply messages sent by the
interface per second [ipv6IfIcmpOutEchoReplies].
igmbq6/s
The number of ICMPv6 Group Membership Query
messages received by the interface per second
[ipv6IfIcmpInGroupMembQueries].
igmbr6/s
The number of ICMPv6 Group Membership Response
messages received by the interface per second
[ipv6IfIcmpInGroupMembResponses].
ogmbr6/s
The number of ICMPv6 Group Membership Response
messages sent per second
[ipv6IfIcmpOutGroupMembResponses].
igmbrd6/s
The number of ICMPv6 Group Membership Reduction
messages received by the interface per second
[ipv6IfIcmpInGroupMembReductions].
ogmbrd6/s
The number of ICMPv6 Group Membership Reduction
messages sent per second
[ipv6IfIcmpOutGroupMembReductions].
irtsol6/s
The number of ICMP Router Solicit messages received
by the interface per second
[ipv6IfIcmpInRouterSolicits].
ortsol6/s
The number of ICMP Router Solicitation messages
sent by the interface per second
[ipv6IfIcmpOutRouterSolicits].
irtad6/s
The number of ICMP Router Advertisement messages
received by the interface per second
[ipv6IfIcmpInRouterAdvertisements].
inbsol6/s
The number of ICMP Neighbor Solicit messages
received by the interface per second
[ipv6IfIcmpInNeighborSolicits].
onbsol6/s
The number of ICMP Neighbor Solicitation messages
sent by the interface per second
[ipv6IfIcmpOutNeighborSolicits].
inbad6/s
The number of ICMP Neighbor Advertisement messages
received by the interface per second
[ipv6IfIcmpInNeighborAdvertisements].
onbad6/s
The number of ICMP Neighbor Advertisement messages
sent by the interface per second
[ipv6IfIcmpOutNeighborAdvertisements].
With the EICMP6 keyword, statistics about ICMPv6 error
messages are reported. Note that ICMPv6 statistics depend
on sadc's option -S IPV6 to be collected. The following
values are displayed (formal SNMP names between square
brackets):
ierr6/s
The number of ICMP messages per second which the
interface received but determined as having ICMP-
specific errors (bad ICMP checksums, bad length,
etc.) [ipv6IfIcmpInErrors]
idtunr6/s
The number of ICMP Destination Unreachable messages
received by the interface per second
[ipv6IfIcmpInDestUnreachs].
odtunr6/s
The number of ICMP Destination Unreachable messages
sent by the interface per second
[ipv6IfIcmpOutDestUnreachs].
itmex6/s
The number of ICMP Time Exceeded messages received
by the interface per second
[ipv6IfIcmpInTimeExcds].
otmex6/s
The number of ICMP Time Exceeded messages sent by
the interface per second [ipv6IfIcmpOutTimeExcds].
iprmpb6/s
The number of ICMP Parameter Problem messages
received by the interface per second
[ipv6IfIcmpInParmProblems].
oprmpb6/s
The number of ICMP Parameter Problem messages sent
by the interface per second
[ipv6IfIcmpOutParmProblems].
iredir6/s
The number of Redirect messages received by the
interface per second [ipv6IfIcmpInRedirects].
oredir6/s
The number of Redirect messages sent by the
interface by second [ipv6IfIcmpOutRedirects].
ipck2b6/s
The number of ICMP Packet Too Big messages received
by the interface per second
[ipv6IfIcmpInPktTooBigs].
opck2b6/s
The number of ICMP Packet Too Big messages sent by
the interface per second [ipv6IfIcmpOutPktTooBigs].
With the IP keyword, statistics about IPv4 network traffic
are reported. Note that IPv4 statistics depend on sadc's
option -S SNMP to be collected. The following values are
displayed (formal SNMP names between square brackets):
irec/s The total number of input datagrams received from
interfaces per second, including those received in
error [ipInReceives].
fwddgm/s
The number of input datagrams per second, for which
this entity was not their final IP destination, as
a result of which an attempt was made to find a
route to forward them to that final destination
[ipForwDatagrams].
idel/s The total number of input datagrams successfully
delivered per second to IP user-protocols
(including ICMP) [ipInDelivers].
orq/s The total number of IP datagrams which local IP
user-protocols (including ICMP) supplied per second
to IP in requests for transmission [ipOutRequests].
Note that this counter does not include any
datagrams counted in fwddgm/s.
asmrq/s
The number of IP fragments received per second
which needed to be reassembled at this entity
[ipReasmReqds].
asmok/s
The number of IP datagrams successfully re-
assembled per second [ipReasmOKs].
fragok/s
The number of IP datagrams that have been
successfully fragmented at this entity per second
[ipFragOKs].
fragcrt/s
The number of IP datagram fragments that have been
generated per second as a result of fragmentation
at this entity [ipFragCreates].
With the EIP keyword, statistics about IPv4 network errors
are reported. Note that IPv4 statistics depend on sadc's
option -S SNMP to be collected. The following values are
displayed (formal SNMP names between square brackets):
ihdrerr/s
The number of input datagrams discarded per second
due to errors in their IP headers, including bad
checksums, version number mismatch, other format
errors, time-to-live exceeded, errors discovered in
processing their IP options, etc. [ipInHdrErrors]
iadrerr/s
The number of input datagrams discarded per second
because the IP address in their IP header's
destination field was not a valid address to be
received at this entity. This count includes
invalid addresses (e.g., 0.0.0.0) and addresses of
unsupported Classes (e.g., Class E). For entities
which are not IP routers and therefore do not
forward datagrams, this counter includes datagrams
discarded because the destination address was not a
local address [ipInAddrErrors].
iukwnpr/s
The number of locally-addressed datagrams received
successfully but discarded per second because of an
unknown or unsupported protocol
[ipInUnknownProtos].
idisc/s
The number of input IP datagrams per second for
which no problems were encountered to prevent their
continued processing, but which were discarded
(e.g., for lack of buffer space) [ipInDiscards].
Note that this counter does not include any
datagrams discarded while awaiting re-assembly.
odisc/s
The number of output IP datagrams per second for
which no problem was encountered to prevent their
transmission to their destination, but which were
discarded (e.g., for lack of buffer space)
[ipOutDiscards]. Note that this counter would
include datagrams counted in fwddgm/s if any such
packets met this (discretionary) discard criterion.
onort/s
The number of IP datagrams discarded per second
because no route could be found to transmit them to
their destination [ipOutNoRoutes]. Note that this
counter includes any packets counted in fwddgm/s
which meet this 'no-route' criterion. Note that
this includes any datagrams which a host cannot
route because all of its default routers are down.
asmf/s The number of failures detected per second by the
IP re-assembly algorithm (for whatever reason:
timed out, errors, etc) [ipReasmFails]. Note that
this is not necessarily a count of discarded IP
fragments since some algorithms can lose track of
the number of fragments by combining them as they
are received.
fragf/s
The number of IP datagrams that have been discarded
per second because they needed to be fragmented at
this entity but could not be, e.g., because their
Don't Fragment flag was set [ipFragFails].
With the IP6 keyword, statistics about IPv6 network
traffic are reported. Note that IPv6 statistics depend on
sadc's option -S IPV6 to be collected. The following
values are displayed (formal SNMP names between square
brackets):
irec6/s
The total number of input datagrams received from
interfaces per second, including those received in
error [ipv6IfStatsInReceives].
fwddgm6/s
The number of output datagrams per second which
this entity received and forwarded to their final
destinations [ipv6IfStatsOutForwDatagrams].
idel6/s
The total number of datagrams successfully
delivered per second to IPv6 user-protocols
(including ICMP) [ipv6IfStatsInDelivers].
orq6/s The total number of IPv6 datagrams which local IPv6
user-protocols (including ICMP) supplied per second
to IPv6 in requests for transmission
[ipv6IfStatsOutRequests]. Note that this counter
does not include any datagrams counted in
fwddgm6/s.
asmrq6/s
The number of IPv6 fragments received per second
which needed to be reassembled at this interface
[ipv6IfStatsReasmReqds].
asmok6/s
The number of IPv6 datagrams successfully
reassembled per second [ipv6IfStatsReasmOKs].
imcpck6/s
The number of multicast packets received per second
by the interface [ipv6IfStatsInMcastPkts].
omcpck6/s
The number of multicast packets transmitted per
second by the interface [ipv6IfStatsOutMcastPkts].
fragok6/s
The number of IPv6 datagrams that have been
successfully fragmented at this output interface
per second [ipv6IfStatsOutFragOKs].
fragcr6/s
The number of output datagram fragments that have
been generated per second as a result of
fragmentation at this output interface
[ipv6IfStatsOutFragCreates].
With the EIP6 keyword, statistics about IPv6 network
errors are reported. Note that IPv6 statistics depend on
sadc's option -S IPV6 to be collected. The following
values are displayed (formal SNMP names between square
brackets):
ihdrer6/s
The number of input datagrams discarded per second
due to errors in their IPv6 headers, including
version number mismatch, other format errors, hop
count exceeded, errors discovered in processing
their IPv6 options, etc. [ipv6IfStatsInHdrErrors]
iadrer6/s
The number of input datagrams discarded per second
because the IPv6 address in their IPv6 header's
destination field was not a valid address to be
received at this entity. This count includes
invalid addresses (e.g., ::0) and unsupported
addresses (e.g., addresses with unallocated
prefixes). For entities which are not IPv6 routers
and therefore do not forward datagrams, this
counter includes datagrams discarded because the
destination address was not a local address
[ipv6IfStatsInAddrErrors].
iukwnp6/s
The number of locally-addressed datagrams received
successfully but discarded per second because of an
unknown or unsupported protocol
[ipv6IfStatsInUnknownProtos].
i2big6/s
The number of input datagrams that could not be
forwarded per second because their size exceeded
the link MTU of outgoing interface
[ipv6IfStatsInTooBigErrors].
idisc6/s
The number of input IPv6 datagrams per second for
which no problems were encountered to prevent their
continued processing, but which were discarded
(e.g., for lack of buffer space)
[ipv6IfStatsInDiscards]. Note that this counter
does not include any datagrams discarded while
awaiting re-assembly.
odisc6/s
The number of output IPv6 datagrams per second for
which no problem was encountered to prevent their
transmission to their destination, but which were
discarded (e.g., for lack of buffer space)
[ipv6IfStatsOutDiscards]. Note that this counter
would include datagrams counted in fwddgm6/s if any
such packets met this (discretionary) discard
criterion.
inort6/s
The number of input datagrams discarded per second
because no route could be found to transmit them to
their destination [ipv6IfStatsInNoRoutes].
onort6/s
The number of locally generated IP datagrams
discarded per second because no route could be
found to transmit them to their destination
[unknown formal SNMP name].
asmf6/s
The number of failures detected per second by the
IPv6 re-assembly algorithm (for whatever reason:
timed out, errors, etc.) [ipv6IfStatsReasmFails].
Note that this is not necessarily a count of
discarded IPv6 fragments since some algorithms can
lose track of the number of fragments by combining
them as they are received.
fragf6/s
The number of IPv6 datagrams that have been
discarded per second because they needed to be
fragmented at this output interface but could not
be [ipv6IfStatsOutFragFails].
itrpck6/s
The number of input datagrams discarded per second
because datagram frame didn't carry enough data
[ipv6IfStatsInTruncatedPkts].
With the NFS keyword, statistics about NFS client activity
are reported. The following values are displayed:
call/s Number of RPC requests made per second.
retrans/s
Number of RPC requests per second, those which
needed to be retransmitted (for example because of
a server timeout).
read/s Number of 'read' RPC calls made per second.
write/s
Number of 'write' RPC calls made per second.
access/s
Number of 'access' RPC calls made per second.
getatt/s
Number of 'getattr' RPC calls made per second.
With the NFSD keyword, statistics about NFS server
activity are reported. The following values are
displayed:
scall/s
Number of RPC requests received per second.
badcall/s
Number of bad RPC requests received per second,
those whose processing generated an error.
packet/s
Number of network packets received per second.
udp/s Number of UDP packets received per second.
tcp/s Number of TCP packets received per second.
hit/s Number of reply cache hits per second.
miss/s Number of reply cache misses per second.
sread/s
Number of 'read' RPC calls received per second.
swrite/s
Number of 'write' RPC calls received per second.
saccess/s
Number of 'access' RPC calls received per second.
sgetatt/s
Number of 'getattr' RPC calls received per second.
With the SOCK keyword, statistics on sockets in use are
reported (IPv4). The following values are displayed:
totsck Total number of sockets used by the system.
tcpsck Number of TCP sockets currently in use.
udpsck Number of UDP sockets currently in use.
rawsck Number of RAW sockets currently in use.
ip-frag
Number of IP fragments currently in queue.
tcp-tw Number of TCP sockets in TIME_WAIT state.
With the SOCK6 keyword, statistics on sockets in use are
reported (IPv6). Note that IPv6 statistics depend on
sadc's option -S IPV6 to be collected. The following
values are displayed:
tcp6sck
Number of TCPv6 sockets currently in use.
udp6sck
Number of UDPv6 sockets currently in use.
raw6sck
Number of RAWv6 sockets currently in use.
ip6-frag
Number of IPv6 fragments currently in use.
With the SOFT keyword, statistics about software-based
network processing are reported. The following values are
displayed:
total/s
The total number of network frames processed per
second.
dropd/s
The total number of network frames dropped per
second because there was no room on the processing
queue.
squeezd/s
The number of times the softirq handler function
terminated per second because its budget was
consumed or the time limit was reached, but more
work could have been done.
rx_rps/s
The number of times the CPU has been woken up per
second to process packets via an inter-processor
interrupt.
flw_lim/s
The number of times the flow limit has been reached
per second. Flow limiting is an optional RPS
feature that can be used to limit the number of
packets queued to the backlog for each flow to a
certain amount. This can help ensure that smaller
flows are processed even though much larger flows
are pushing packets in.
With the TCP keyword, statistics about TCPv4 network
traffic are reported. Note that TCPv4 statistics depend
on sadc's option -S SNMP to be collected. The following
values are displayed (formal SNMP names between square
brackets):
active/s
The number of times TCP connections have made a
direct transition to the SYN-SENT state from the
CLOSED state per second [tcpActiveOpens].
passive/s
The number of times TCP connections have made a
direct transition to the SYN-RCVD state from the
LISTEN state per second [tcpPassiveOpens].
iseg/s The total number of segments received per second,
including those received in error [tcpInSegs].
This count includes segments received on currently
established connections.
oseg/s The total number of segments sent per second,
including those on current connections but
excluding those containing only retransmitted
octets [tcpOutSegs].
With the ETCP keyword, statistics about TCPv4 network
errors are reported. Note that TCPv4 statistics depend on
sadc's option -S SNMP to be collected. The following
values are displayed (formal SNMP names between square
brackets):
atmptf/s
The number of times per second TCP connections have
made a direct transition to the CLOSED state from
either the SYN-SENT state or the SYN-RCVD state,
plus the number of times per second TCP connections
have made a direct transition to the LISTEN state
from the SYN-RCVD state [tcpAttemptFails].
estres/s
The number of times per second TCP connections have
made a direct transition to the CLOSED state from
either the ESTABLISHED state or the CLOSE-WAIT
state [tcpEstabResets].
retrans/s
The total number of segments retransmitted per
second - that is, the number of TCP segments
transmitted containing one or more previously
transmitted octets [tcpRetransSegs].
isegerr/s
The total number of segments received in error
(e.g., bad TCP checksums) per second [tcpInErrs].
orsts/s
The number of TCP segments sent per second
containing the RST flag [tcpOutRsts].
With the UDP keyword, statistics about UDPv4 network
traffic are reported. Note that UDPv4 statistics depend
on sadc's option -S SNMP to be collected. The following
values are displayed (formal SNMP names between square
brackets):
idgm/s The total number of UDP datagrams delivered per
second to UDP users [udpInDatagrams].
odgm/s The total number of UDP datagrams sent per second
from this entity [udpOutDatagrams].
noport/s
The total number of received UDP datagrams per
second for which there was no application at the
destination port [udpNoPorts].
idgmerr/s
The number of received UDP datagrams per second
that could not be delivered for reasons other than
the lack of an application at the destination port
[udpInErrors].
With the UDP6 keyword, statistics about UDPv6 network
traffic are reported. Note that UDPv6 statistics depend
on sadc's option -S IPV6 to be collected. The following
values are displayed (formal SNMP names between square
brackets):
idgm6/s
The total number of UDP datagrams delivered per
second to UDP users [udpInDatagrams].
odgm6/s
The total number of UDP datagrams sent per second
from this entity [udpOutDatagrams].
noport6/s
The total number of received UDP datagrams per
second for which there was no application at the
destination port [udpNoPorts].
idgmer6/s
The number of received UDP datagrams per second
that could not be delivered for reasons other than
the lack of an application at the destination port
[udpInErrors].
The ALL keyword is equivalent to specifying all the
keywords above and therefore all the network activities
are reported.