dot

packages and services management
Log | Files | Refs | README

commit 64624a7ce7c044479bc97f6ffcdf28a593b47675
parent 1290e461021f379c68a0719e75472136e493ad4f
Author: Josuah Demangeon <mail@josuah.net>
Date:   Thu, 15 Feb 2018 01:27:20 +0100

[ref] back to using collectd-ploot

Diffstat:
Mbin/collectd-ploot | 29-----------------------------
1 file changed, 0 insertions(+), 29 deletions(-)

diff --git a/bin/collectd-ploot b/bin/collectd-ploot @@ -2,34 +2,6 @@ # usage: collectd-ploot <collectd-dir> <target-dir> -mkdir -p stat - -find "$(cd "$1"; pwd)" -mindepth 3 -maxdepth 3 -type f | sort | - sed -r 's:.*/([^/]+/[^/]+)-([0-9]+-[0-9]+-[0-9]+)$:\1/\2:' | -while IFS='/' read -r node category stat -do - printf '%s - %s - %s\n' "$node" "$category" "$stat" -done - -awk ' -NR == 1 { - sub("-[0-9]+-[0-9]+-[0-9]+$", "", FILENAME); - filename = FILENAME; - sub("/[^/]*$", "", FILENAME); - - n = split($0, head, ","); - for (i = 2; i <= n; i++) - name[i] = -} - -NR > 1 { - n = split($0, vals, ","); - for (i = 2; i <= n; i++) - printf("%s\t%s\n", vals[1], vals[i]) >> filename "-" head[i]; -}' - -exit - for host in "$1"/* do { @@ -58,5 +30,4 @@ do printf '\n' } > "$2/$(basename "$host")" - done