#!/bin/sh

case $1 in
   config)
        cat <<'EOM'
graph_title IPv6 bandwidth usage
graph_info Displays IPv6 Traffic
graph_vlabel ipv6
graph_category network
in.label bytes
in.type DERIVE
in.min 0
out.label bytes
out.type DERIVE
out.min 0
EOM
        exit 0;;
esac

echo -n 'in.value '
netstat -s -6 | grep -i octet | awk '{print $2}' |head -1
echo -n 'out.value '
netstat -s -6 | grep -i octet | awk '{print $2}' |sed -n '2p'