From 243de0fb7684104bc6d66e652876e328e5129036 Mon Sep 17 00:00:00 2001 From: "K.Cima" Date: Tue, 14 Mar 2017 13:48:42 +0900 Subject: [PATCH 1/3] Fix typo $CDEV -> $CDEF --- plugins/node.d.sunos/io_busy_ | 4 ++-- plugins/node.d.sunos/io_bytes_ | 4 ++-- plugins/node.d.sunos/io_ops_ | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/node.d.sunos/io_busy_ b/plugins/node.d.sunos/io_busy_ index 59c5a76d44..23f2fad961 100755 --- a/plugins/node.d.sunos/io_busy_ +++ b/plugins/node.d.sunos/io_busy_ @@ -133,14 +133,14 @@ if [ "$1" = "config" ]; then echo "${dev}_$IN.type DERIVE" echo "${dev}_$IN.min 0" echo "${dev}_$IN.max 1000000000" - if [ -n "$CDEV" ]; then + if [ -n "$CDEF" ]; then echo "${dev}_$IN.cdef ${dev}_$IN$CDEF" fi echo "${dev}_$OUT.label ${dev}_$OUTNAME" echo "${dev}_$OUT.type DERIVE" echo "${dev}_$OUT.min 0" echo "${dev}_$OUT.max 1000000000" - if [ -n "$CDEV" ]; then + if [ -n "$CDEF" ]; then echo "${dev}_$OUT.cdef ${dev}_$OUT$CDEF" fi done diff --git a/plugins/node.d.sunos/io_bytes_ b/plugins/node.d.sunos/io_bytes_ index 59c5a76d44..23f2fad961 100755 --- a/plugins/node.d.sunos/io_bytes_ +++ b/plugins/node.d.sunos/io_bytes_ @@ -133,14 +133,14 @@ if [ "$1" = "config" ]; then echo "${dev}_$IN.type DERIVE" echo "${dev}_$IN.min 0" echo "${dev}_$IN.max 1000000000" - if [ -n "$CDEV" ]; then + if [ -n "$CDEF" ]; then echo "${dev}_$IN.cdef ${dev}_$IN$CDEF" fi echo "${dev}_$OUT.label ${dev}_$OUTNAME" echo "${dev}_$OUT.type DERIVE" echo "${dev}_$OUT.min 0" echo "${dev}_$OUT.max 1000000000" - if [ -n "$CDEV" ]; then + if [ -n "$CDEF" ]; then echo "${dev}_$OUT.cdef ${dev}_$OUT$CDEF" fi done diff --git a/plugins/node.d.sunos/io_ops_ b/plugins/node.d.sunos/io_ops_ index 59c5a76d44..23f2fad961 100755 --- a/plugins/node.d.sunos/io_ops_ +++ b/plugins/node.d.sunos/io_ops_ @@ -133,14 +133,14 @@ if [ "$1" = "config" ]; then echo "${dev}_$IN.type DERIVE" echo "${dev}_$IN.min 0" echo "${dev}_$IN.max 1000000000" - if [ -n "$CDEV" ]; then + if [ -n "$CDEF" ]; then echo "${dev}_$IN.cdef ${dev}_$IN$CDEF" fi echo "${dev}_$OUT.label ${dev}_$OUTNAME" echo "${dev}_$OUT.type DERIVE" echo "${dev}_$OUT.min 0" echo "${dev}_$OUT.max 1000000000" - if [ -n "$CDEV" ]; then + if [ -n "$CDEF" ]; then echo "${dev}_$OUT.cdef ${dev}_$OUT$CDEF" fi done From 20e06272f508ad8de794c51215302304800030d9 Mon Sep 17 00:00:00 2001 From: "K.Cima" Date: Tue, 14 Mar 2017 13:49:52 +0900 Subject: [PATCH 2/3] Add --lower-limit, --upper-limit and vlabel --- plugins/node.d.sunos/io_busy_ | 7 ++++++- plugins/node.d.sunos/io_bytes_ | 7 ++++++- plugins/node.d.sunos/io_ops_ | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/plugins/node.d.sunos/io_busy_ b/plugins/node.d.sunos/io_busy_ index 23f2fad961..060a4f4fb4 100755 --- a/plugins/node.d.sunos/io_busy_ +++ b/plugins/node.d.sunos/io_busy_ @@ -42,18 +42,22 @@ elif [ $FUNCTION = "busy" ]; then OUT=wtime OUTNAME=wait CDEF=",100,*" + GARGS="--lower-limit 0 --upper-limit 100" + VLABEL='%' elif [ $FUNCTION = "bytes" ]; then TITLE="I/O" IN=nread INNAME=$IN OUT=nwritten OUTNAME=$OUT + VLABEL='Bytes per second' elif [ $FUNCTION = "ops" ]; then TITLE="Operations" IN=reads INNAME=$IN OUT=writes OUTNAME=$OUT + VLABEL='Operations per second' fi if [ "$1" = "autoconf" ]; then @@ -104,8 +108,9 @@ fi if [ "$1" = "config" ]; then echo "graph_title $NAME $TITLE" - echo 'graph_args --base 1024' + echo "graph_args --base 1024 $GARGS" echo 'graph_category disk' + echo "graph_vlabel $VLABEL" export IN INNAME OUT OUTNAME CDEF if [ "$HAS_MAPDEV" ]; then diff --git a/plugins/node.d.sunos/io_bytes_ b/plugins/node.d.sunos/io_bytes_ index 23f2fad961..060a4f4fb4 100755 --- a/plugins/node.d.sunos/io_bytes_ +++ b/plugins/node.d.sunos/io_bytes_ @@ -42,18 +42,22 @@ elif [ $FUNCTION = "busy" ]; then OUT=wtime OUTNAME=wait CDEF=",100,*" + GARGS="--lower-limit 0 --upper-limit 100" + VLABEL='%' elif [ $FUNCTION = "bytes" ]; then TITLE="I/O" IN=nread INNAME=$IN OUT=nwritten OUTNAME=$OUT + VLABEL='Bytes per second' elif [ $FUNCTION = "ops" ]; then TITLE="Operations" IN=reads INNAME=$IN OUT=writes OUTNAME=$OUT + VLABEL='Operations per second' fi if [ "$1" = "autoconf" ]; then @@ -104,8 +108,9 @@ fi if [ "$1" = "config" ]; then echo "graph_title $NAME $TITLE" - echo 'graph_args --base 1024' + echo "graph_args --base 1024 $GARGS" echo 'graph_category disk' + echo "graph_vlabel $VLABEL" export IN INNAME OUT OUTNAME CDEF if [ "$HAS_MAPDEV" ]; then diff --git a/plugins/node.d.sunos/io_ops_ b/plugins/node.d.sunos/io_ops_ index 23f2fad961..060a4f4fb4 100755 --- a/plugins/node.d.sunos/io_ops_ +++ b/plugins/node.d.sunos/io_ops_ @@ -42,18 +42,22 @@ elif [ $FUNCTION = "busy" ]; then OUT=wtime OUTNAME=wait CDEF=",100,*" + GARGS="--lower-limit 0 --upper-limit 100" + VLABEL='%' elif [ $FUNCTION = "bytes" ]; then TITLE="I/O" IN=nread INNAME=$IN OUT=nwritten OUTNAME=$OUT + VLABEL='Bytes per second' elif [ $FUNCTION = "ops" ]; then TITLE="Operations" IN=reads INNAME=$IN OUT=writes OUTNAME=$OUT + VLABEL='Operations per second' fi if [ "$1" = "autoconf" ]; then @@ -104,8 +108,9 @@ fi if [ "$1" = "config" ]; then echo "graph_title $NAME $TITLE" - echo 'graph_args --base 1024' + echo "graph_args --base 1024 $GARGS" echo 'graph_category disk' + echo "graph_vlabel $VLABEL" export IN INNAME OUT OUTNAME CDEF if [ "$HAS_MAPDEV" ]; then From 7e2da77a585599b0c7b4e6c36b2585431837a18f Mon Sep 17 00:00:00 2001 From: "K.Cima" Date: Tue, 14 Mar 2017 14:10:40 +0900 Subject: [PATCH 3/3] Add disk device names for Oracle VM (LDOMs) and Kernel Zones --- plugins/node.d.sunos/io_busy_ | 4 ++-- plugins/node.d.sunos/io_bytes_ | 4 ++-- plugins/node.d.sunos/io_ops_ | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/node.d.sunos/io_busy_ b/plugins/node.d.sunos/io_busy_ index 060a4f4fb4..b96877a821 100755 --- a/plugins/node.d.sunos/io_busy_ +++ b/plugins/node.d.sunos/io_busy_ @@ -72,7 +72,7 @@ fi if [ "$1" = "suggest" ]; then if [ -x /usr/bin/kstat ]; then - kstat -p -c '/disk|nfs|tape/' -s "/^$IN\$/" | sed -e 's/:.*//' -e 's/ssd/sd/' -e '/^fd$/d' | sort -u + kstat -p -c '/disk|nfs|tape/' -s "/^$IN\$/" | sed -e 's/:.*//' -e 's/ssd|vdc|zvblk/sd/' -e '/^fd$/d' | sort -u exit 0 else exit 1 @@ -81,7 +81,7 @@ fi REGEX="$MODULE" if [ $MODULE = "sd" ]; then - REGEX="/^s?sd$/" + REGEX="/^(s?sd|vdc|zvblk)$/" NAME="Disk Device" elif [ $MODULE = "dad" ]; then NAME="IDE Disk Device" diff --git a/plugins/node.d.sunos/io_bytes_ b/plugins/node.d.sunos/io_bytes_ index 060a4f4fb4..b96877a821 100755 --- a/plugins/node.d.sunos/io_bytes_ +++ b/plugins/node.d.sunos/io_bytes_ @@ -72,7 +72,7 @@ fi if [ "$1" = "suggest" ]; then if [ -x /usr/bin/kstat ]; then - kstat -p -c '/disk|nfs|tape/' -s "/^$IN\$/" | sed -e 's/:.*//' -e 's/ssd/sd/' -e '/^fd$/d' | sort -u + kstat -p -c '/disk|nfs|tape/' -s "/^$IN\$/" | sed -e 's/:.*//' -e 's/ssd|vdc|zvblk/sd/' -e '/^fd$/d' | sort -u exit 0 else exit 1 @@ -81,7 +81,7 @@ fi REGEX="$MODULE" if [ $MODULE = "sd" ]; then - REGEX="/^s?sd$/" + REGEX="/^(s?sd|vdc|zvblk)$/" NAME="Disk Device" elif [ $MODULE = "dad" ]; then NAME="IDE Disk Device" diff --git a/plugins/node.d.sunos/io_ops_ b/plugins/node.d.sunos/io_ops_ index 060a4f4fb4..b96877a821 100755 --- a/plugins/node.d.sunos/io_ops_ +++ b/plugins/node.d.sunos/io_ops_ @@ -72,7 +72,7 @@ fi if [ "$1" = "suggest" ]; then if [ -x /usr/bin/kstat ]; then - kstat -p -c '/disk|nfs|tape/' -s "/^$IN\$/" | sed -e 's/:.*//' -e 's/ssd/sd/' -e '/^fd$/d' | sort -u + kstat -p -c '/disk|nfs|tape/' -s "/^$IN\$/" | sed -e 's/:.*//' -e 's/ssd|vdc|zvblk/sd/' -e '/^fd$/d' | sort -u exit 0 else exit 1 @@ -81,7 +81,7 @@ fi REGEX="$MODULE" if [ $MODULE = "sd" ]; then - REGEX="/^s?sd$/" + REGEX="/^(s?sd|vdc|zvblk)$/" NAME="Disk Device" elif [ $MODULE = "dad" ]; then NAME="IDE Disk Device"