SYSTAT(1)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 15.1

πŸ’… systat(1) β€” display system statistics πŸ’…

🌸 NAME 🌸

systat β€” display system statistics 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

systat [-display] [display-commands] [refresh-interval]

πŸ’– DESCRIPTION πŸ’–

Okay bestie, so systat is your screen-oriented system-stats bestie β€” it shows you what's going on using the curses screen display library, ncurses(3). ✨

While systat is running, the screen is usually divided into two windows (an exception is the vmstat display which uses the entire screen). The upper window depicts the current system load average. The information displayed in the lower window may vary, depending on user commands. The last line on the screen is reserved for user input and error messages. πŸŽ€

By default, systat displays the processes getting the largest percentage of the processor in the lower window. Other displays show swap space usage, disk I/O statistics (a la iostat(8)), virtual memory statistics (a la vmstat(8)), TCP/IP statistics, and network connections (a la netstat(1)). Literally so many vibes. 🌈

Input is interpreted at two different levels. A β€œglobal” command interpreter processes all keyboard input. If this command interpreter fails to recognize a command, the input line is passed to a per-display command interpreter. This allows each display to have certain display-specific commands. Iykyk. πŸ‘‘

πŸ› οΈ Command line options

  • -display β€” The - flag expects display to be one of: icmp, icmp6, ifstat, iolat, iostat, ip, ip6, netstat, pigs, sctp, swap, tcp, vmstat, or zarc. These displays can also be requested interactively (without the β€œ-”) and are described in full detail below.
  • refresh-interval β€” The refresh-value specifies the screen refresh time interval in seconds. Time interval can be fractional. Lowkey perfect for when you want it snappy.
  • display-commands β€” A list of commands specific to this display. These commands can also be entered interactively and are described for each display separately below. If the command requires arguments, they can be specified as separate command line arguments. A command line argument -- will finish display commands. For example:
systat -ifstat -match bge0,em1 -pps

This will display statistics of packets per second for network interfaces named as bge0 and em1.

systat -iostat -numbers -- 2.1

This will display all IO statistics in a numeric format and the information will be refreshed each 2.1 seconds.

⌨️ Characters that cause immediate action

Certain characters cause immediate action by systat. These are:

  • ^L β€” Refresh the screen. 🧼
  • ^G β€” Print the name of the current β€œdisplay” being shown in the lower window and the refresh interval.
  • : β€” Move the cursor to the command line and interpret the input line typed as a command. While entering a command the current character erase, word erase, and line kill characters may be used.

🌟 Global commands

The following commands are interpreted by the β€œglobal” command interpreter.

  • help β€” Print the names of the available displays on the command line.
  • load β€” Print the load average over the past 1, 5, and 15 minutes on the command line.
  • stop β€” Stop refreshing the screen.
  • [start] [number] β€” Start (continue) refreshing the screen. If a second, numeric, argument is provided it is interpreted as a refresh interval (in seconds). Supplying only a number will set the refresh interval to this value.
  • quit β€” Exit systat. (This may be abbreviated to q.)

πŸ‘‘ The available displays

  • pigs β€” Display, in the lower window, those processes resident in main memory and getting the largest portion of the processor (the default display). When less than 100% of the processor is scheduled to user processes, the remaining time is accounted to the β€œidle” process. 🐷
  • icmp β€” Display, in the lower window, statistics about messages received and transmitted by the Internet Control Message Protocol (β€œICMP”). The left half of the screen displays information about received packets, and the right half displays information regarding transmitted packets.

The icmp display understands two commands: mode and reset. The mode command is used to select one of four display modes, given as its argument:

  • rate: show the rate of change of each value in packets (the default) per second
  • delta: show the rate of change of each value in packets per refresh interval
  • since: show the total change of each value since the display was last reset
  • absolute: show the absolute value of each statistic

The reset command resets the baseline for since mode. The mode command with no argument will display the current mode in the command line.

  • icmp6 β€” This display is like the icmp display, but displays statistics for IPv6 ICMP. πŸ¦‹
  • ip β€” Otherwise identical to the icmp display, except that it displays IP and UDP statistics.
  • ip6 β€” Like the ip display, except that it displays IPv6 statistics. It does not display UDP statistics. (Not the UDP girly, got it. πŸ™ˆ)
  • sctp β€” Like icmp, but with SCTP statistics.
  • tcp β€” Like icmp, but with TCP statistics.
  • iolat β€” Display statistics describing the hardware latencies of I/O operations as computed by the CAM_IOSCHED_DYNAMIC option. This option must be in the kernel config file of the running kernel for this display to work. All devices are displayed as there is currently no way to filter them. The statistics displayed for the I/O latencies are the percentiles with sufficient data during the polling interval to compute. If a value cannot be estimated - is displayed. The P50 (also known as the median), P90, P99 and P99.9 values are computed if more than 2, 10, 100 or 1000 operations occurred during the polling interval. The latency is the hardware latency values, and does not include any software queuing time. The latencies are estimated based on histogram data computed by the CAM I/O scheduler and represent estimates of the actual value that are only good to two or three significant digits. The display of latency changes based on the scale of the latency to reflect the precision of the estimates and to fit on the available screen space. All latencies are reported in milliseconds. When color is enabled:
    • Values below the medium latency threshold are displayed in green.
    • Values between the minimum latency and high latency thresholds are displayed in magenta.
    • Values above the high latency thresholds are displayed in red.

When color is disabled, the default foreground and background colors are always used.

The following commands are specific to the iolat display; the minimum unambiguous prefix may be supplied.

  • color β€” Toggle the use of color in the display. The default is on.
  • hi=XXX β€” Set the high latency threshold to XXX milliseconds.
  • med=XXX β€” Set the medium latency threshold to XXX milliseconds.
  • read β€” Toggle the display of statistics about read operations. The default is on.
  • write β€” Toggle the display of statistics about write operations. The default is on.
  • trim β€” Toggle the display of statistics about trim operations. The default is on.
  • iostat β€” Display, in the lower window, statistics about processor use and disk throughput. Statistics on processor use appear as bar graphs of the amount of time executing in user mode (β€œuser”), in user mode running low priority processes (β€œnice”), in system mode (β€œsystem”), in interrupt mode (β€œinterrupt”), and idle (β€œidle”). Statistics on disk throughput show, for each drive, megabytes per second, average number of disk transactions per second, and average kilobytes of data per transaction. This information may be displayed as bar graphs or as rows of numbers which scroll downward. Bar graphs are shown by default. πŸ“Š

The following commands are specific to the iostat display; the minimum unambiguous prefix may be supplied.

  • numbers β€” Show the disk I/O statistics in numeric form. Values are displayed in numeric columns which scroll downward.
  • bars β€” Show the disk I/O statistics in bar graph form (default).
  • kbpt β€” Toggle the display of kilobytes per transaction. (the default is to not display kilobytes per transaction).
  • swap β€” Show information about swap space usage on all the swap areas compiled into the kernel and processes that are swapped out as well as a summary of disk activity.

The swap areas are displayed first with their name, sizes and usage percentage. The Used column indicates the total blocks used so far; the graph shows the percentage of space in use on each partition. If there are more than one swap partition in use, a total line is also shown. Areas known to the kernel, but not in use are shown as not available.

Below the swap space statistics, processes are listed in order of higher swap area usage. Pid, username, a part of command line, the total use of swap space in bytes, the size of process, as well as per-process swap usage percentage and per-system swap space percentage are shown per process.

At the bottom left is the disk usage display, bestie. It reports the number of kilobytes per transaction, transactions per second, megabytes per second, and the percentage of the time the disk was busy averaged over the refresh period of the display (by default, five seconds). The system keeps statistics on most every storage device. In general, up to seven devices are displayed. The devices displayed by default are the first devices in the kernel's device list. See devstat(3) and devstat(9) for details on the devstat system. πŸ’Ύβœ¨


πŸ“Š vmstat πŸ’…

okay so vmstat literally takes over the entire display and shows a (rather crowded) compendium of statistics related to virtual memory usage, process scheduling, device interrupts, system name translation caching, disk I/O etc. It is giving full-screen dashboard energy, and ngl it is a lot. 🫢

The upper left quadrant of the screen shows the number of users logged in and the load average over the last one, five, and fifteen minute intervals. Below this line are statistics on memory utilization. The first row of the table reports memory usage only among active processes, that is processes that have run in the previous twenty seconds. The second row reports on memory usage of all processes. The first column reports on the number of kilobytes in physical pages claimed by processes. The second column reports the number of kilobytes in physical pages that are devoted to read only text pages. The third and fourth columns report the same two figures for virtual pages, that is the number of kilobytes in pages that would be needed if all processes had all of their pages. Finally the last column shows the number of kilobytes in physical pages on the free list. πŸ§ πŸ’–

Below the memory display is a list of the average number of threads (over the last refresh interval) that are runnable (r), in page wait (p), in disk wait other than paging (d), sleeping (s), and swapped out but desiring to run (w). The row also shows the average number of context switches (Csw), traps (Trp; includes page faults), system calls (Sys), interrupts (Int), network software interrupts (Sof), and page faults (Flt). πŸ‘‘

Below the process queue length listing is a numerical listing and a bar graph showing the amount of system (shown as =), interrupt (shown as +), user (shown as >), nice (shown as -), and idle time (shown as ). πŸ“ˆ

Below the process display are statistics on name translations. It lists the number of names translated in the previous interval, the number and percentage of the translations that were handled by the system wide name translation cache, and the number and percentage of the translations that were handled by the per process name translation cache. πŸ”

To the right of the name translations display are lines showing the number of dirty buffers in the buffer cache (dtbuf), desired maximum size of vnode cache (desvn), number of vnodes actually allocated (numvn), and number of allocated vnodes that are free (frevn). πŸ—‚οΈ

At the bottom left is the disk usage display. It reports the number of kilobytes per transaction, transactions per second, megabytes per second, and the percentage of the time the disk was busy averaged over the refresh period of the display (by default, five seconds). The system keeps statistics on most every storage device. In general, up to seven devices are displayed. The devices displayed by default are the first devices in the kernel's device list. See devstat(3) and devstat(9) for details on the devstat system. πŸ’½

Under the date in the upper right hand quadrant are statistics on paging and swapping activity. The first two columns report the average number of pages brought in and out per second over the last refresh interval due to page faults and the paging daemon. The third and fourth columns report the average number of pages brought in and out per second over the last refresh interval due to swap requests initiated by the scheduler. The first row of the display shows the average number of disk transfers per second over the last refresh interval; the second row of the display shows the average number of pages transferred per second over the last refresh interval. πŸ”„

Below the paging statistics is a column of lines regarding the virtual memory system. The first few lines describe, in units (except as noted below) of pages per second averaged over the sampling interval: pages copied on write (cow), pages zero filled on demand (zfod), pages optimally zero filled on demand (ozfod), the ratio of the (average) ozfod / zfod as a percentage (%ozfod), pages freed by the page daemon (daefr), pages freed by exiting processes (prcfr), total pages freed (totfr), pages reactivated from the free list (react), the average number of times per second that the page daemon was awakened (pdwak), pages analyzed by the page daemon (pdpgs), and in-transit blocking page faults (intrn).

⚠️ Note that the units are special for %ozfod and pdwak. πŸ’€

The next few lines describe, as amounts of memory in kilobytes, pages wired down (wire), active pages (act), inactive pages (inact), dirty pages queued for laundering (laund), and free pages (free).

🌸 Note that the values displayed are the current transient ones; they are not averages.

At the bottom of this column is a line showing the amount of virtual memory, in kilobytes, mapped into the buffer cache (buf). This statistic is not useful. It exists only as a placeholder for the corresponding useful statistic (the amount of real memory used to cache disks). The most important component of the latter (the amount of real memory used by the vm system to cache disks) is not available, but can be guessed from the inact amount under some system loads. πŸ™ˆ

Running down the right hand side of the display is a breakdown of the interrupts being handled by the system. At the top of the list is the total interrupts per second over the time interval. The rest of the column breaks down the total on a device by device basis. Only devices that have interrupted at least once since boot time are shown. ⚑

The following commands are specific to the vmstat display; the minimum unambiguous prefix may be supplied.

  • boot β€” Display cumulative statistics since the system was booted.
  • run β€” Display statistics as a running total from the point this command is given.
  • time β€” Display statistics averaged over the refresh interval (the default).
  • zero β€” Reset running statistics to zero.

πŸŒ€ zarc

zarc displays arc cache usage and hit/miss statistics. Iconic little cache check. ✨


🌐 netstat

netstat displays, in the lower window, network connections. By default, network servers awaiting requests are not displayed. Each address is displayed in the format host.port, with each shown symbolically, when possible. It is possible to have addresses displayed numerically, limit the display to a set of ports, hosts, and/or protocols (the minimum unambiguous prefix may be supplied): πŸ›°οΈ

  • all β€” Toggle the displaying of server processes awaiting requests (this is the equivalent of the -a flag to netstat(1)).
  • numbers β€” Display network addresses numerically.
  • names β€” Display network addresses symbolically.
  • proto protocol β€” Display only network connections using the indicated protocol. Supported protocols are tcp, udp, and all.
  • ignore [items] β€” Do not display information about connections associated with the specified hosts or ports. Hosts and ports may be specified by name (vangogh, ftp), or numerically. Host addresses use the Internet dot notation (128.32.0.9). Multiple items may be specified with a single command by separating them with spaces.
  • display [items] β€” Display information about the connections associated with the specified hosts or ports. As for ignore, [items] may be names or numbers.
  • show [ports|hosts] β€” Show, on the command line, the currently selected protocols, hosts, and ports. Hosts and ports which are being ignored are prefixed with a !. If ports or hosts is supplied as an argument to show, then only the requested information will be displayed.
  • reset β€” Reset the port, host, and protocol matching mechanisms to the default (any protocol, port, or host).

πŸ›°οΈ ifstat

ifstat displays the network traffic going through active interfaces on the system. Idle interfaces will not be displayed until they receive some traffic. So quiet interfaces stay lowkey invisible until they wake up. πŸ¦‹

So like, for every interface on screen you get the current, peak and total stats, for both incoming and outgoing traffic πŸ’…. By default the ifstat display auto-scales the units so everything's in a human-readable format β€” no cap, it's doing the math so you don't have to 🧚. And yeah, the scaling units for the current and peak traffic columns can be changed with the scale command.

  • scale [units] β€” changes the scale used to display the current and peak traffic across all interfaces. The units it recognizes are: kbit, kbyte, mbit, mbyte, gbit, gbyte and auto ✨.
  • pps β€” shows stats in packets per second instead of bytes/bits per second. And bestie, calling pps again switches this mode back off 🫢.
  • match [patterns] β€” only shows interfaces that match the pattern you hand it. Patterns go in shell syntax, separated by whitespace or commas. Call it with no arguments and every interface gets displayed, periodt. For example:
match em0, bge1

This displays the em0 and bge1 interfaces πŸ’–. And:

match em*, bge*, lo0

This displays all em interfaces, all bge interfaces, and the loopback interface 🌸.


Okay so commands that switch between displays can be abbreviated down to the minimum unambiguous prefix β€” like, io for iostat, iconic behavior honestly πŸ‘‘. Some info gets discarded when the screen size isn't big enough to show it all 😭. For example, on a machine with 10 drives, the iostat bar graph displays only 3 drives on a 24 line terminal. When a bar graph would overflow the space it's been allotted, it gets truncated and the actual value gets printed "over top" of the bar πŸ”₯.


Now these next commands are common to every display that shows info about disk drives β€” they're how you pick which set of drives to report on, in case your system has more drives configured than can normally fit on screen πŸ™ˆ.

  • ignore [drives] β€” don't display info about the drives you listed. Multiple drives can be specified, separated by spaces.
  • display [drives] β€” display info about the drives you listed. Multiple drives can be specified, separated by spaces.
  • only [drives] β€” display only the drives you specified. Multiple drives can be specified, separated by spaces.
  • drives β€” display a list of available devices πŸ‘‘.
  • match type,if,pass [| ...] β€” display devices matching the given pattern. The basic matching expressions are the same ones iostat(8) uses, with one difference: instead of specifying multiple -t arguments that get ORed together, you specify multiple matching expressions joined by the pipe (|) character. The comma separated arguments within each matching expression are ANDed together, and then the pipe separated matching expressions are ORed together πŸ’€. Any device matching the combined expression gets displayed β€” if there's room to display it. For example:
match da,scsi | cd,ide

This displays all SCSI Direct Access devices and all IDE CDROM devices ⭐. And:

match da | sa | cd,pass

This displays all Direct Access devices, all Sequential Access devices, and all passthrough devices that provide access to CDROM drives 🌈.

πŸ“ FILES πŸ“

  • /boot/kernel/kernel β€” for the namelist.
  • /dev/kmem β€” for information in main memory.
  • /etc/hosts β€” for host names.
  • /etc/networks β€” for network names.
  • /etc/services β€” for port names.

πŸ‘€ SEE ALSO πŸ‘€

netstat(1), kvm(3), icmp(4), icmp6(4), ip(4), ip6(4), tcp(4), udp(4), gstat(8), iostat(8), vmstat(8)

πŸ¦‹ HISTORY πŸ¦‹

The systat program appeared in 4.3BSD πŸŽ€. The icmp, ip, and tcp displays appeared in FreeBSD 3.0; and the whole idea of having different display modes for the ICMP, IP, TCP, and UDP statistics was stolen from the -C option to netstat(1) in Silicon Graphics' IRIX system πŸ’€ β€” iconic borrowing, ngl.

πŸ’€ BUGS πŸ’€

  • Certain displays presume a minimum of 80 characters per line 😭.
  • ifstat does not detect new interfaces 🫠.
  • The vmstat display looks out of place because it is (it was added in as a separate display rather than created as a new program) πŸ™ˆ.
  • The iolat command does not implement the common device commands including filtering, because it doesn't use the devstat(3) mechanism to obtain its statistics πŸ“.

And that's the whole page bestie, you ate that πŸ’…βœ¨ β€” this one's from Debian, dated April 1, 2022, so go forth and systat responsibly πŸ«ΆπŸ’–

πŸ“¦ where this page comes from
  • freebsd 15.1: base 15.1
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms