disk plugin¶
| Plugin name | disk |
| Type | read |
| Callbacks | config, init, read |
| Status | supported |
| Since | 1.5 |
| Copyright | 2005–2008 Florian octo Forster, 2009 Manuel Sanmartin |
| License | GPLv2 |
| Configuration | collectd.conf(5) |
The Disk plugin collects performance statistics of hard-disks and, where supported, partitions. While the “octets” and “operations” are quite straight forward, the other two datasets need a little explanation:
- “merged” are the number of operations, that could be merged into other, already queued operations, i. e. one physical disk access served two or more logical operations. Of course, the higher that number, the better.
- “time” is the average time an I/O-operation took to complete. Since this is a little messy to calculate take the actual values with a grain of salt.
Since 5.5 there are also additional metrics on the Linux platform:
- “io_time” - time spent doing I/Os (ms). You can treat this metric as a device load percentage (Value of 1 sec time spent matches 100% of load).
- “weighted_io_time” - measure of both I/O completion time and the backlog that may be accumulating.
- “pending_operations” - shows queue size of pending I/O operations.
For details about these metrics you can also read kernel documentation (Explanations of fields "Field 9", "Field 10" and "Field 11").
Synopsis¶
Example graphs¶






Dependencies¶
- Linux
- Either
/proc/diskstats(Linux 2.6) or/proc/partitions(Linux 2.4)
- Either
- Darwin / Mac OS X
- Solaris
libkstat(3KSTAT)
- AIX
- libperfstat(3)
- FreeBSD
Configuration¶
Configuration options · from collectd.conf(5)
See this section in the full configuration reference
The disk plugin collects information about the usage of physical disks and logical disks (partitions). Values collected are the number of octets written to and read from a disk or partition, the number of read/write operations issued to the disk and a rather complex "time" it took for these commands to be issued.
Using the following two options you can ignore some disks or configure the collection only of specific disks.
- Disk Name
-
Select the disk Name. Whether it is collected or ignored depends on the IgnoreSelected setting, see below. As with other plugins that use the daemon's ignorelist functionality, a string that starts and ends with a slash is interpreted as a regular expression. Examples:
See
/"IGNORELISTS"for details. - IgnoreSelected true|false
- Sets whether selected disks, i. e. the ones matches by any of the Disk statements, are ignored or if all other disks are ignored. The behavior (hopefully) is intuitive: If no Disk option is configured, all disks are collected. If at least one Disk option is given and no IgnoreSelected or set to false, only matching disks will be collected. If IgnoreSelected is set to true, all disks are collected except the ones matched.
- UseBSDName true|false
- Whether to use the device's "BSD Name", on MacE<nbsp>OSE<nbsp>X, instead of the default major/minor numbers. Requires collectd to be built with Apple's IOKitLib support.
- UdevNameAttr Attribute
-
Attempt to override disk instance name with the value of a specified udev attribute when built with libudev. If the attribute is not defined for the given device, the default name is used. Example:
Please note that using an attribute that does not differentiate between the whole disk and its particular partitions (like ID_SERIAL) will result in data about the whole disk and each partition being mixed together incorrectly. In this case, you can use ID_COLLECTD attribute that is provided by contrib/99-storage-collectd.rules udev rule file instead.