This is a view of the disks and/or partitions on a Linux machine, with statistics on read and write operations.
On a 2.6 kernel, data is retrieved from the /proc/diskstats special file, whereas on a 2.4 kernel, it uses the /proc/partitions file, which requires the per partition statistics in /proc/diskstats feature to be enabled in the running kernel (that option is available with the 2.4.20 kernel version and above).
Note: see also the disks module for displaying more information on the disks themselves, and the mounts module to display the mounted file systems.
The initial table columns are:
- disk or partition name (partitions end by a number)
- size in megabytes (with first decimal below 100 megabytes, rounded above)
- number of kilobytes read, per second, averaged over the last poll period
- number of kilobytes written, per second, averaged over the last poll period
- time spent reading in percent during the last poll period (available for disks only)
- time spent writing in percent during the last poll period (available for disks only)
- how busy the disk is: time spent doing input/output in percent during the last poll period (available for disks only)
By default, only the disk entries are displayed, but that can be tuned using the options below.
- -a (--all)
Display both disk (such as hda, sdb, ...) and partition (such as hda2, sdb1, ...) entries (as shown in the screen shot above). Note: this option has a higher priority than the --partitions option.
- -C (only available for ssh on UNIX client)
Whether data compression is used on all data between client and server (useful on slow connections, see ssh manual for detailed information).
- -i file (only available for ssh on UNIX client)
Selects a file from which the identity (private key) for authentication is read (useful if an authentication agent is not running). It must not be protected by a passphrase.
- -p port (only available for ssh on UNIX client)
Port to connect to on the remote host.
Only display partition entries (with names such as hda1, sdb1, ...).
- -r (--remote) [[rsh|ssh]://][user@]host
Remote monitoring using user as logname on remote host host (rsh or ssh facilities must be properly setup). If user is not specified, current user is used as logname on remote host. The protocol is either ssh or rsh (used by default). The module title is set to diskstats(host).
When there is a communication error with the remote host, all rows disappear and the displayed table becomes empty. A descriptive error message is also generated in such a case.
Notes on remote monitoring:
- Using ssh is strongly recommended, as rsh, while being much less secure is also less efficient, as it requires creating a new session for each poll.
- On a Windows client, you must use the putty software package (see install.txt), which does not support rsh in non interactive sessions. Consequently, the -r (--remote) ssh://session syntax is required to remove any confusion (where session has been added to the running pageant application).
$ moodss diskstats --all
$ moodss diskstats --partitions
$ moodss diskstats -r firstname.lastname@example.org
$ moodss diskstats -a -r ssh://email@example.com
$ moodss diskstats --remote foo.bar.com