Skip to content

Instantly share code, notes, and snippets.

@lf-
Last active April 8, 2016 05:21
Show Gist options
  • Save lf-/ff8d09adfe99b4f4d8a161cc66de97b1 to your computer and use it in GitHub Desktop.
Save lf-/ff8d09adfe99b4f4d8a161cc66de97b1 to your computer and use it in GitHub Desktop.
#!/bin/ksh
if [ "x$1" == x ]; then
echo "Usage: $0 ifaces dir" >&2
echo "ifaces -- comma-separated network interfaces" >&2
echo "dir -- path to put output files in" >&2
exit 1
fi
IFS=',' set -A ifaces $1
for iface in "${ifaces[@]}"; do
echo "$iface..."
vnstati -m -o "$2/$iface-months.png"
vnstati -d -o "$2/$iface-days.png"
vnstati -vs -o "$2/$iface-summary.png"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment