Skip to content

Instantly share code, notes, and snippets.

@f99aq8ove
Created January 24, 2009 05:05
Show Gist options
  • Save f99aq8ove/51344 to your computer and use it in GitHub Desktop.
Save f99aq8ove/51344 to your computer and use it in GitHub Desktop.
munin plugin to show CPU frequency using sysctl for FreeBSD
#!/bin/sh
#
# CPU frequency from sysctl
#
if [ "$1" = "config" ]; then
echo "graph_title CPU frequency"
echo 'graph_category system'
echo "graph_info This graph shows the cpu frequency"
echo "freq.label CPU frequency [MHz]"
echo "freq.info CPU frequency [MHz]"
echo "freq.type GAUGE"
exit
fi
if [ "$sysctl" = "" ]; then
sysctl=sysctl
fi
echo -n "freq.value "
$sysctl -a dev.cpu.0.freq | cut -f 2 -d' '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment