Provided by: atsar_1.7-2_amd64
NAME
atsar — system activity report
SYNOPSIS
atsar [ -flags ] t [ n ] atsar [ -flags ] [ -s time ] [ -e time ] [ -i sec ] [ -f file | -n day# ]
DESCRIPTION
The program atsar(1) can be used to deliver statistics. The design of this program can be compared with the standard sadc(1) and sar(1) programs being delivered for other UNIX- implementations, i.e. a data-collector which reads the statistical counters (from the files under the directory /proc ) and a presentation-program which formats the counters and presents them on stdout. In the first synopsis line, atsar samples cumulative activity counters in the kernel at n intervals of t seconds, where t should be 1 or greater. The default value of n is 1. The type of command shown in the first synopsis line immediately sends the output for every option specified to standard output. If only one type of statistical counter is requested, the header is printed once and after every t seconds the statistical counters are shown for that period. If several options are requested, a header is printed per sample followed by the statistical counters for that period. In the second synopsis line (no sampling interval specified), atsar extracts data from a previously recorded file, either the one specified by the -f option or, by default, the daily activity data file /var/log/atsar/atsadd for the current day dd (day of month). Alternatively the -n option can be used to specify the day of the month from which counters should be shown. The starting and ending times of the report can be defined using the -s and -e time arguments of the form hh:mm. The -i option selects records at sec second intervals. Otherwise, all intervals found in the data file are reported. The -flags option is used to define which statistical counters are presented: -S By default the time-stamp at the beginning of a line is suppressed if more lines are shown for one time-interval. With this flag a time-stamp is given for every output- line (easier for post-processing). -A Statistics of all possible options. -u Statistics about CPU utilization (average and per cpu). -P Statistics about processes and load-averages. -d Limited statistics about utilization of disks (2.4 kernel only). -D Statistics about utilization of disks and disk-partitions. -r Current memory- and swap-occupation. -p Statistics about paging- and swapping-activity. -I Statistics about the number interrupts per second. -v Statistics about utilization of kernel-tables. -y Statistics about utilization of tty's (serial interfaces). -l Statistics about the network interfaces. -L Statistics about errors for network-interfaces. -w Statistics about IP (version 4) network traffic). -W Statistics about errors for IP (version 4) traffic. -m General statistics about ICMP (version 4) layer activity. -M Per-type statistics about ICMP (version 4) layer activity. -t Statistics about TCP network traffic. -T Statistics about errors for TCP-traffic. -U Statistics about UDP (version 4) network traffic. -g Statistics about IP (version 6) network traffic). -G Statistics about errors for IP (version 6) traffic. -k General statistics about ICMP (version 6) layer activity. -K Per-type statistics about ICMP (version 6) layer activity. -j Statistics about TCP (version 6) socket-utilization. -h Statistics about UDP (version 6) network traffic. -N Statistics about NFS server- and client-requests. -E Statistics about errors for NFS server- and client-requests. -V Statistics about behaviour of NFS-server. -R Statistics about the RPC-calls for NFS-requests. A transfer-rate is given per type of RPC-request (percentage of total number of RPC-requests). -F Optional statistics about the ftp-traffic. This flag only produces relevant output if the script atsaftp is activated with regular intervals (by the script atsa1 ). Note that the names of the FTP-logfiles have to be specified in the /etc/atsar.conf configuration-file. -H Optional statistics about the http-traffic. This flag only produces relevant output if the script atsahttp is activated with regular intervals (by the script atsa1 ). Note that the names of the HTTP-logfiles have to be specified in the /etc/atsar.conf configuration-file.
OUTPUT DESCRIPTION
Depending on the flag, a number of columns with output-values are produced. The values are mostly presented as a number of events per second. The output for the flag -u contains the following columns per cpu: usr% Percentage of cpu-time consumed in user-mode (program-text) for all active processes running with a nice-value of zero (default) or a negative nice-value (which means a higher priority than usual). The cpu-consumption in user-mode of processes with a nice-value larger than zero (lower priority) is indicated in the nice%-column. nice% Percentage of cpu-time consumed in user-mode (i.e. program-text) for all processes running witn a nice-value larger than zero (which means with a lower priority than average). sys% Percentage of cpu-time consumed in system-mode (kernel-text) for all active processes. A high percentage usually indicates a lot of system calls being issued. Kernel-version 2.4: Interrupt-handling is also part of this percentage. irq% Percentage of cpu-time consumed for interrupt-handling (not for kernel-version 2.4). softirq% Percentage of cpu-time consumed for soft interrupt-handling (not for kernel- version 2.4). idle% Percentage of unused cpu-time because all processes are in a wait-state (>= kernel-version 2.6: but not waiting for disk-I/O). wait% Percentage of unused cpu-time. At least one of the processes in wait-state awaits completion of disk-I/O (not for kernel-version 2.4). The output for the flag -P contains the following values: pswtch/s Number of process-switches (also called context-switches) per second on all cpu's. A process-switch occurs at the moment that the active process (i.e. the process using a cpu) enters a wait-state or has used its time-slice completely; another process will then be chosen to use the cpu. runq Number of processes which are currently waiting for CPU-scheduling (including the processes which are currently active on a CPU). nrproc Total number of processes which are currently present in the system. lavg1 Load-average reflecting the average number of processes in the run-queue during the last minute. lavg5 Load-average reflecting the average number of processes in the run-queue during the last 5 minutes. lavg15 Load-average reflecting the average number of processes in the run-queue during the last 15 minutes. The output for the flag -d contains the following columns per active physical disk: device Disk-drive number (major-minor). read/s Number of read-requests issued per second on this disk. rdKb/s Number of Kbytes tranferred per second by read-requests. write/s Number of write-requests issued per second on this disk. wrKb/s Number of Kbytes tranferred per second by write-requests. rdwr/s Number of read/write requests issued per second on this disk (total of read/s + write/s) The output for the flag -D contains the following columns per used partition of a physical disk: partition Disk (-partition) name. For the entire disk, the major-minor number is shown between brackets. busy Busy-percentage of the physical disk (i.e. the portion of time that the device was busy handling requests). This figure is only shown for partitions which represent the entire physical disk. read/s Number of read-requests issued per second on this partition. For partitions which represent the entire physical disk, the total number of read-requests per second for all partitions on that disk is shown. Kbyt/r Average number of Kbytes transferred per read-request for this partition. For partitions which represent the entire physical disk, the average number of Kbytes per read-request for all partitions on that disk is shown. write/s Number of write-requests issued per second on this partition. For partitions which represent the entire physical disk, the total number of write-requests per second for all partitions on that disk is shown. Kbyt/w Average number of Kbytes transferred per write-request for this partition. For partitions which represent the entire physical disk, the average number of Kbytes per write-request for all partitions on that disk is shown. avque Average number of disk-requests outstanding in the queue during the time that the disk is busy. This figure is only shown for partitions which represent the entire physical disk. avserv Average number of milliseconds needed by a request on this physical disk (seek, latency and data-transfer). This figure is only shown for partitions which represent the entire physical disk. The output for the flag -r contains information about the memory- and swap-utilization: memtot Total usable main memory size (snapshot). memfree Available main memory size (snapshot). buffers Main memory used for cached metadata-blocks (snapshot). cached Main memory used for cache data-blocks (snapshot). slabmem Main memory used for dynamically allocated memory by the kernel (snapshot). swptot Total swap space size (snapshot). swpfree Available swap space size (snapshot). The output for the flag -p contains information about the frequency of paging and swapping: pagein/s The number of memory-pages the system paged in from disk per second. This implies normal data-access (so not necessarily indicating lack of memory). pageout/s The number of memory-pages the system paged out to disk per second. This implies normal data-access (so not necessarily indicating lack of memory). swapin/s The number of memory-pages the system read from the swap-device per second. swapout/s The number of memory-pages the system wrote to the swap-device per second. fork/s The number of new processes started per second. The output for the flag -I provides information about interrupt-frequency, reported per irq per cpu. Notice that for the active irq-levels the number of interrupts per second is shown. iq.. Number of interrupts per second for this interrupt-type. The file /proc/interrupts on the measured system shows which device uses this irq. The output for the flag -v provides information about utilization of particular limited kernel-resources: superb-sz The current and maximum occupation of the collection of super-blocks which is maintained by the kernel for mounted filesystems. inode-sz The current and maximum occupation of the collection of incore-inodes maintained by the kernel. One entry is needed for every disk-file which is currently open (at least once). file-sz The current and maximum occupation of the collection of open-file entries maintained by the kernel. One entry is needed for every open-request for a disk- file. So if one file is currently opened by five processes, one incore-inode entry is needed and five open-file entries. dquota-sz The current and maximum occupation of the collection of disk-quota entries. flock-sz The current and maximum number of file-locks. The output for the flag -y provides information about utilization of tty's: port The port-number of the concerning serial interface. xmit/s The number of transmit-interrupts per second for this tty. recv/s The number of receive-interrupts per second for this tty. frer/s The number of framing-errors discovered by the uart per second. parer/s The number of parity-errors discovered by the uart per second. ovrun/s The number of overrun-errors discovered by the uart per second. brk/s The number of breaks discovered by the uart per second. The output for the flag -l provides information about utilization of network-interfaces: inpck/s Number of packets received from this interface per second. otpck/s Number of packets transmitted via this interface per second. inbyt/s Number of bytes received from this interface per second. otbyt/s Number of bytes transmitted via this interface per second. incmpr/s Number of compressed packets received per second (slip). otcmpr/s Number of compressed packets transmitted per second (slip). inmcst/s Number of multicast-packets received from this interface per second. iface Name of the interface. The output for the flag -L provides information about the failures which were detected for network-interfaces: inerr/s Number of bad packets received from this interface per second. oterr/s Number of packet-transmit problems encountered via this interface per second. coll/s Number of collisions encountered per second while transmitting packets. indrop/s Number of received packets dropped per second due to lack of buffer-space in the local system. otdrop/s Number of transmitted packets dropped per second due to lack of buffer-space in the local system. infram/s Number of frame alignment-errors encountered per second on received packets. otcarr/s Number of carrier-errors encountered per second on transmitted packets. iface Name of the interface. The output for the flag -w provides information about the utilization of the IPv4-layer (formal snmp-names between brackets): inrecv/s Number of input datagrams received from interfaces per second, including those received in error (ipInReceives). outreq/s Number of IP datagrams per second that local higher-layer protocols supplied to IP in requests for transmission (ipOutRequests). indeliver/s Number of input datagrams per second that have been succesfully delivered to higher protocol-layers (ipInDelivers). forward/s 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 forward (ipForwDatagrams). reasmok/s Number of IP datagrams succesfully reassembled per second (ipReasmOKs). fragcreat/s Number of IP datagram fragments generated per second at this entity (ipFragCreates). The output for the flag -W provides information about the failures which were detected in the IPv4-layer (formal snmp-names between brackets): indsc/s Number of input IP datagrams per second for which no problems were encountered to prevent their continued processing but that were discarded, e.g. for lack of buffer space (ipInDiscards). hder/s Number of input datagrams per second discarded due to errors in the IP header (ipInHdrErrors). ader/s Number of input datagrams per second discarded because the IP address in the destination field was not valid to be received by this entity (ipInAddrErrors). unkp/s Number of inbound packets per second that were discarded because of an unknown or unsupported protocol (ipInUnknownProtos). ratim/s Number of timeout-situations per second while other fragments were expected for successful reassembly (ipReasmTimeout). rfail/s Number of failures detected per second by the IP reassembly algorithm (ipReasmFails). otdsc/s Number of output IP datagrams per second for which no problems were encountered to prevent their continued processing but that were discarded, e.g. for lack of buffer space (ipOutDiscards). nort/s Number of IP datagrams per second discarded because no route could be found (ipOutNoRoutes). The output for the flag -t provides information about the utilization of the TCP-layer (formal snmp-names between brackets): insegs/s Number of received segments per second, including those received in error (tcpInSegs). otsegs/s Number of transmitted segments per second, excluding those containing only retransmitted octets (tcpOutSegs). actopen/s Number of active opens per second that have been supported by this entity (tcpActiveOpens). pasopen/s Number of passive opens per second that have been supported by this entity (tcpPassiveOpens). nowopen Number of connections currently open (snapshot), for which the state is either ESTABLISHED or CLOSE-WAIT (tcpCurrEstab). socknow Number of TCPv4-sockets currently open (snapshot). sockmax Maximum number of parallel TCPv4-sockets ever open. This value is not always supported by the kernel. The output for the flag -T provides information about the failures which were detected in the TCP-layer (formal snmp-names between brackets): inerr/s Number of received segments per second received in error (tcpInErrs). retrans/s Number of retransmitted segments per second (tcpRetransSegs). attfail/s Number of failed connection attempts per second that have occurred at this entity (tcpAttemptFails). estabreset/s Number of resets per second that have occurred at this entity (tcpEstabResets). outreset/s Number of transmitted segments per second containing the RST flag (tcpOutRsts). The output for the flag -U provides information about the utilization of the UDPv4-layer (formal snmp-names between brackets): indgram/s Number of UDP datagrams per second delivered to UDP users (udpInDatagrams), otdgram/s Number of UDP datagrams transmitted per second from this entity (udpOutDatagrams), inerr/s 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). noport/s Number of received UDP datagrams per second for which there was no application at the destination port (udpNoPorts). socknow Number of UDP-sockets currently open (snapshot). sockmax Maximum number of parallel UDP-sockets ever open. This value is not always supported by the kernel. The output for the flag -m provides information about the general utilization of the ICMPv4-layer and some information per type of ICMP-message (formal snmp-names between brackets): intot/s Number of ICMP messages (any type) received per second at this entity (icmpInMsgs). outtot/s Number of ICMP messages (any type) transmitted per second from this entity (icmpOutMsgs). inecho/s Number of ICMP Echo (request) messages received per second (icmpInEchos). inerep/s Number of ICMP Echo-Reply messages received per second (icmpInEchoReps). otecho/s Number of ICMP Echo (request) messages transmitted per second (icmpOutEchos). oterep/s Number of ICMP Echo-Reply messages transmitted per second (icmpOutEchoReps). The output for the flag -M provides information about other types of ICMPv4-messages (formal snmp-names between brackets): ierr/s Number of ICMP messages received per second but determined to have ICMP-specific errors (icmpInErrors). isq/s Number of ICMP Source Quench messages received per second (icmpInSrcQuenchs). ird/s Number of ICMP Redirect messages received per second (icmpInRedirects). idu/s Number of ICMP Destination Unreachable messages received per second (icmpInDestUnreachs). ite/s Number of ICMP Time Exceeded messages received per second (icmpOutTimeExcds). oerr/s Number of ICMP messages transmitted per second but determined to have ICMP- specific errors (icmpOutErrors). osq/s Number of ICMP Source Quench messages transmitted per second (icmpOutSrcQuenchs). ord/s Number of ICMP Redirect messages transmitted per second (icmpOutRedirects). odu/s Number of ICMP Destination Unreachable messages transmitted per second (icmpOutDestUnreachs). ote/s Number of ICMP Time Exceeded messages transmitted per second (icmpOutTimeExcds). The output for the flag -g provides information about the utilization of the IPv6-layer (formal snmp-names between brackets): inrecv/s Number of input IPv6-datagrams received from interfaces per second, including those received in error (ipv6IfStatsInReceives). outreq/s Number of IPv6-datagrams per second that local higher-layer protocols supplied to IP in requests for transmission (ipv6IfStatsOutRequests). This counter does not include any forwarded datagrams. inmc/s Number of multicast packets per second that have been received by the interface (ipv6IfStatsInMcastPkts). outmc/s Number of multicast packets per second that have been transmitted to the interface (ipv6IfStatsOutMcastPkts). indeliv/s Number of IP datagrams succesfully delivered per second to IPv6 user-protocols, including ICMP (ipv6IfStatsInDelivers). reasmok/s Number of IPv6 datagrams succesfully reassembled per second (ipv6IfStatsReasmOKs). fragcre/s Number of IPv6 datagram fragments generated per second at this entity (ipv6IfStatsOutFragCreates). The output for the flag -G provides information about the failures which were detected in the IPv4-layer (formal snmp-names between brackets): indsc/s Number of input IPv6 datagrams per second for which no problems were encountered to prevent their continued processing but that were discarded, e.g. for lack of buffer space (ipv6IfStatsInDiscards). hder/s Number of input datagrams per second discarded due to errors in the IPv6 header (ipv6IfStatsInHdrErrors). ader/s Number of input datagrams per second discarded because the IPv6 address in the destination field was not valid to be received by this entity (ipv6IfStatsInAddrErrors). unkp/s Number of locally-addressed datagrams per second that were discarded because of an unknown or unsupported protocol (ipv6IfStatsInUnknownProtos). ratim/s Number of timeout-situations per second while other IPv6 fragments were expected for successful reassembly. rfail/s Number of failures detected per second by the IPv6 reassembly-algorithm (ipv6IfStatsReasmFails). otdsc/s Number of output IPv6 datagrams per second for which no problems were encountered to prevent their continued processing but that were discarded, e.g. for lack of buffer space (ipv6IfStatsOutDiscards). nort/s Number of IPv6 datagrams per second discarded because no route could be found (ipv6IfStatsInNoRoutes). The output for the flag -j provides information about the utilization of the TCPv6-sockets: socknow Number of TCPv6-sockets currently open (snapshot). sockmax Maximum number of parallel TCPv6-sockets ever open. This value is not always supported by the kernel. The output for the flag -h provides information about the utilization of the UDPv6-layer (formal snmp-names between brackets): indgram/s Number of UDPv6 datagrams per second delivered to UDP users (udpInDatagrams), otdgram/s Number of UDPv6 datagrams transmitted per second from this entity (udpOutDatagrams), inerr/s Number of received UDPv6 datagrams per second that could not be delivered for reasons other than the lack of an application at the destination port (udpInErrors). noport/s Number of received UDPv6 datagrams per second for which there was no application at the destination port (udpNoPorts). socknow Number of UDPv6 sockets currently open (snapshot). sockmax Maximum number of parallel UDPv6 sockets ever open. This value is not always supported by the kernel. The output for the flag -k provides information about the general utilization of the ICMPv6-layer and some information per type of ICMP-message (formal snmp-names between brackets): intot/s Number of ICMPv6 messages (any type) received per second at the interface (ipv6IfIcmpInMsgs). outtot/s Number of ICMPv6 messages (any type) transmitted per second from this entity (ipv6IfIcmpOutMsgs). inerr/s Number of ICMPv6 messages received per second which had ICMP-specific errors, such as bad ICMP checksums, bad length, etc (ipv6IfIcmpInErrors). innsol/s Number of ICMP Neighbor Solicit messages received per second (ipv6IfIcmpInNeighborSolicits). innadv/s Number of ICMP Neighbor Advertisement messages received per second (ipv6IfIcmpInNeighborAdvertisements). otnsol/s Number of ICMP Neighbor Solicit messages transmitted per second (ipv6IfIcmpOutNeighborSolicits). otnadv/s Number of ICMP Neighbor Advertisement messages transmitted per second (ipv6IfIcmpOutNeighborAdvertisements). The output for the flag -K provides information about other types of ICMPv6-messages (formal snmp-names between brackets): iecho/s Number of ICMP Echo (request) messages received per second (ipv6IfIcmpInEchos). ierep/s Number of ICMP Echo-Reply messages received per second (ipv6IfIcmpInEchoReplies). oerep/s Number of ICMP Echo-Reply messages transmitted per second (ipv6IfIcmpOutEchoReplies). idu/s Number of ICMP Destination Unreachable messages received per second (ipv6IfIcmpInDestUnreachs). odu/s Number of ICMP Destination Unreachable messages transmitted per second (ipv6IfIcmpOutDestUnreachs). ird/s Number of ICMP Redirect messages received per second (ipv6IfIcmpInRedirects). ord/s Number of ICMP Redirect messages transmitted per second (ipv6IfIcmpOutRedirect). ite/s Number of ICMP Time Exceeded messages received per second (ipv6IfIcmpInTimeExcds). ote/s Number of ICMP Time Exceeded messages transmitted per second (ipv6IfIcmpOutTimeExcds). The output for the flag -N provides information about the utilization of the NFS-layer, acting as NFS-client as well as NFS-server: svrpc/s Number of RPC-requests handled by this NFS-server system per second. clrpc/s Number of RPC-requests issued by this NFS-client system per second. sudp/s Number of requests handled via UDP by this NFS-server system per second. stcp/s Number of requests handled via TCP by this NFS-server system per second. stcon/s Number of TCP-connections established by this NFS-server system per second. cudp/s Number of requests issued via UDP by this NFS-client system per second. ctcp/s Number of requests issued via TCP by this NFS-client system per second. ctcon/s Number of TCP-connections established by this NFS-client system per second. The output for the flag -E provides information about the failures which were detected in the NFS-layer: svbadfmt/s Number of RPC-requests received per second by the NFS-server system with a bad format (version-number if RPC-packet not recognized). svbadauth/s Number of RPC-requests received per second by the NFS-server system with a bad authorization. svbadclnt/s Meaning unknown. clretrans/s Number of RPC-request which have been retransmitted by the NFS-client per second due to a timeout. clauthrefresh/s Number of times that the credentials have been refreshed per second by the NFS- client due to rejection by the NFS-server. The output for the flag -V provides information about the behaviour of the NFS-server: rchit/s Number of succesful accesses on the reply-cache per second. rcmiss/s Number of unsuccesful accesses on the reply-cache per second. %hit Hit-ratio for the reply-cache. fhstale/s Number of stale-errors per second for file-handles. iord/s Number of bytes returned to read-requests per second. This counter is not supported by all NFS-versions (contains zero). iowr/s Number of bytes passed in write-requests per second. This counter is not supported by all NFS-versions (contains zero). thrnow Number of avaliable threads (nfsd-servers). This counter is not supported by all NFS-versions (contains zero). tlast/s Number of times that the last available thread is activated per second. This counter is not supported by all NFS-versions (contains zero). The output for the flag -R provides information about the types of RPC-calls used by the NFS-layer (NFS-client as well as NFS-server). Note that per RPC-type the usage-percentage is shown. gat Percentage of RPC-call type Get Attribute. sat Percentage of RPC-call type Set Attribute. lku Percentage of RPC-call type Lookup. rln Percentage of RPC-call type Read Link. rd Percentage of RPC-call type Read. wrc Percentage of RPC-call type Write Cache. wr Percentage of RPC-call type Write. cre Percentage of RPC-call type Create. rm Percentage of RPC-call type Remove. rnm Percentage of RPC-call type Rename. lnk Percentage of RPC-call type Link. sln Percentage of RPC-call type Symbolic Link. mkd Percentage of RPC-call type Mkdir. rmd Percentage of RPC-call type Rmdir. rdd Percentage of RPC-call type Read Directory. fst Percentage of RPC-call type Statfs. The output for the flag -F provides information about the FTP-traffic. Note that the script atsaftp should be installed and called by the script atsa1 with regular intervals. The counters are not relevant if atsar is started with an interval; only when viewing long-term counters from a history-file. xfers/s Number of FTP-transfers per second. kbytes/s Number of Kbytes transferred per second during the interval. avg_time Average number of seconds per ftp-transfer. avg_kbytes Average number of Kbytes per ftp-transfer. direct Direction indicates whether these files have been transmitted (output) or received (input) via FTP. name Symbolic name (as specified in the /etc/atsar.conf file) of the xfer-log file from which the usage-info is retrieved. The output for the flag -H provides information about Apache HTTP-traffic. Note that the script atsahttp should be installed and called by the script atsa1 with regular intervals. The counters are not relevant if atsar is started with an interval; only when viewing long-term counters from a history-file. head/s Number of http-requests handled per second (type HEAD). get/s Number of http-requests handled per second (type GET). put/s Number of http-requests handled per second (type PUT). post/s Number of http-requests handled per second (type POST). delete/s Number of http-requests handled per second (type DELETE). name Symbolic name (as specified in the /etc/atsar.conf file) of the access-log file from which the usage-info is retrieved.
EXAMPLES
To see today's processor-activity so far: atsar To watch TCP activity evolve for ten minutes (10 samples with sixty seconds interval): atsar -t 60 10
FILES
/var/log/atsar/atsadd Daily data file, where dd are digits representing the day of the month.
SEE ALSO
atsadc(1)
AUTHOR
Gerlof Langeveld, AT Computing (gerlof@ATComputing.nl)