mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Initial version
This commit is contained in:
parent
e7c04da282
commit
ec912970ed
1 changed files with 29 additions and 0 deletions
29
plugins/other/iperf_
Executable file
29
plugins/other/iperf_
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# iperf_ munin grabber script
|
||||
# 2007.09 by steve@kosada.com
|
||||
#
|
||||
# before trying to use this script, make sure:
|
||||
# - you have an iperf server running on the remote machine
|
||||
# - you are able to successfully run iperf from the commandline. e.g.,
|
||||
# iperf --time 2 --parallel 4 --client $destination --format B
|
||||
|
||||
destination=`basename $0 | sed 's/^iperf_//g'`
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo "graph_title iperf to $destination"
|
||||
echo 'graph_vlabel bytes/sec'
|
||||
echo 'graph_args --lower-limit 0 --upper-limit 200000'
|
||||
echo 'graph_category network'
|
||||
echo 'graph_period second'
|
||||
echo "graph_info This instance of iperf measures the transmit speed to $destination"
|
||||
|
||||
echo 'iperf.label iperf'
|
||||
echo 'iperf.draw AREA'
|
||||
else
|
||||
kbits=`iperf --time 2 --parallel 4 --client $destination --format B \
|
||||
| grep Bytes \
|
||||
| tr --squeeze-repeats ' ' \
|
||||
| cut -d ' ' -f 8`
|
||||
echo "iperf.value $kbits"
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue