dot

packages and services management
Log | Files | Refs | README

commit f9278ce25a01656385ec8ec172da23314b5a86e9
parent b19313cb89321fb18a7d3b93c64d9e0ea7c677b0
Author: Josuah Demangeon <josuah.demangeon@gandi.net>
Date:   Sun, 23 Jul 2017 20:06:00 +0200

Merge branch 'master' of http://github.com/josuah/etc

Diffstat:
Mbin/monitor | 9+++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/bin/monitor b/bin/monitor @@ -26,11 +26,7 @@ BEGIN { sub(/.*[Ll]oad[^0-9]*/, "", load) sub(/[^0-9.].*/, "", load) - split(disks, diskv, " ") - - while ("df" | getline) - if ($1 ~ "^/dev/") - stor += $4 + while ("df" | getline) if ($1 ~ "^/dev/") stor += $4 } NR == 2 { split($0, keys, " ") } @@ -43,8 +39,9 @@ NR >= 4 { mem = table[mem] cpu = 100 - table[cpu] + split(disks, diskv, " ") for (disk in diskv) - diskio += table[disk] + diskio += table[diskv[disk]] print host " " date " " mem " " cpu " " load " " diskio " " stor }'