Skip to content
Snippets Groups Projects

OP#7938 Icinga Check Disk Performance messen https://projects.iml.unibe.ch/work_packages/7938

2 files
+ 107
27
Compare changes
  • Side-by-side
  • Inline

Files

+ 42
20
@@ -21,13 +21,13 @@ From this repository you need next to this script:
@@ -21,13 +21,13 @@ From this repository you need next to this script:
```txt
```txt
______________________________________________________________________
______________________________________________________________________
CHECK_DISK-IO
CHECK_DISK-IO
v1.2
v1.3
Check dis io and latency
(c) Institute for Medical Education - University of Bern
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
Licence: GNU GPL 3
 
 
https://os-docs.iml.unibe.ch/icinga-checks/Checks/check_disk_io.html
______________________________________________________________________
______________________________________________________________________
Disk infos based on /sys/block/[NAME]/stat
Disk infos based on /sys/block/[NAME]/stat
@@ -43,18 +43,32 @@ check_disk-io -m MODE
@@ -43,18 +43,32 @@ check_disk-io -m MODE
OPTIONS:
OPTIONS:
-m MODE set mode for type of output (required)
-h or --help show this help.
-h or --help show this help.
 
-m MODE set mode for type of output (required)
 
-d DIR for measure: set a directory, default: "/tmp"
 
-s SIZE for measure: set a size, default: "100M"
PARAMETERS:
PARAMETERS:
MODE
MODE
io read I/Os, write I/Os, discard I/0s
io read I/Os, write I/Os, discard I/0s
 
measure measure write and read speed
ticks read ticks, write ticks, discard ticks
ticks read ticks, write ticks, discard ticks
wait total wait time for all requests
wait total wait time for all requests
 
DIR
 
Directory to perform read and write test.
 
 
SIZE
 
Block size for dd command: a number followed multiplicative suffix.
 
c=1, w=2, b=512, kB=1000, K=1024, MB=1000*1000, M=1024*1024, xM=M,
 
GB=1000*1000*1000, G=1024*1024*1024, and so on for T, P, E, Z, Y, R, Q
 
EXAMPLE:
EXAMPLE:
check_disk-io -m io
 
check_disk-io -m io
 
check_disk-io -m measure
 
check_disk-io -m measure -d /mnt/data -s 10M
```
```
@@ -64,28 +78,36 @@ check_disk-io -m io
@@ -64,28 +78,36 @@ check_disk-io -m io
## Examples
## Examples
 
### Disk io
 
`$ check_disk-io -m io` returns
`$ check_disk-io -m io` returns
```txt
```txt
OK: Disk data ... read I/Os, write I/Os, discard I/0s, number of I/Os currently in flight
OK: Disk data ... read I/Os, write I/Os, discard I/0s, number of I/Os currently in flight
--- sda
disk-sda-ReadIO: 0
disk-sda-WriteIO: 0
disk-sda-DiscardIO: 0
disk-sda-FlightIO: 0
--- nvme0n1
--- nvme0n1
disk-nvme0n1-ReadIO: 3
disk-nvme0n1-ReadIO: 401
disk-nvme0n1-WriteIO: 16
disk-nvme0n1-WriteIO: 61
disk-nvme0n1-DiscardIO: 4
disk-nvme0n1-DiscardIO: 0
disk-nvme0n1-FlightIO: 0
disk-nvme0n1-FlightIO: 0
--- TOTAL
--- MAX
ReadIO: 3
ReadIO: 401
WriteIO: 16
WriteIO: 61
DiscardIO: 4
DiscardIO: 0
FlightIO: 0
FlightIO: 0
|readio=3;; writeio=16;; discardio=4;; flightio=0;;
|readio=401;; writeio=61;; discardio=0;; flightio=0;;
```
```
 
 
### Measure
 
 
The mode `measure` writes a randomly generated filename with `dd` and reads the file afterwards. From the output is the of the command we fetch the speed in MB/s or GB/s.
 
 
```txt
 
$ check_disk-io -m measure
 
OK: Disk speed in /tmp using 100M - WRITE 952 MB/s READ 4.1 GB/s
 
|write=952;; read=4198.4;;
 
```
 
 
By default the check is done in /tmp with 100MB generated random data. You can set another directory eg. to perform a check on a mounted filesystem.
Loading