root / plugins / network / umts_sig @ d7f54f3e
Historique | Voir | Annoter | Télécharger (1005 octets)
| 1 | ae84b39f | Stig Sandbeck Mathisen | #!/bin/bash |
|---|---|---|---|
| 2 | 17f78427 | Lars Kruse | # |
| 3 | afe5182a | Derik Vercueil | # A Munin Plugin to show umts signal strength using gcom |
| 4 | # Created by Derik Vercueil <jfvercueil@yahoo.co.uk> |
||
| 5 | # Based on a work of "auth" |
||
| 6 | # |
||
| 7 | # Parameters understood: |
||
| 8 | # |
||
| 9 | # config (required) |
||
| 10 | # autoconf (optional - used by munin-config) |
||
| 11 | # |
||
| 12 | # |
||
| 13 | # Magic markers (optional - used by munin-config and installation |
||
| 14 | # scripts): |
||
| 15 | # |
||
| 16 | #%# family=auto |
||
| 17 | #%# capabilities=autoconf |
||
| 18 | |||
| 19 | |||
| 20 | ############################# |
||
| 21 | # Configuration |
||
| 22 | ############################# |
||
| 23 | MAXLABEL=20 |
||
| 24 | EXPR_BIN=/usr/bin/expr |
||
| 25 | ############################# |
||
| 26 | |||
| 27 | if [ "$1" = "autoconf" ]; then |
||
| 28 | echo yes |
||
| 29 | exit 0 |
||
| 30 | fi |
||
| 31 | |||
| 32 | if [ "$1" = "config" ]; then |
||
| 33 | |||
| 34 | echo 'graph_title UMTS Signal Strength' |
||
| 35 | echo 'graph_args --base 1000 -l 0' |
||
| 36 | echo 'graph_vlabel Signal Strength' |
||
| 37 | echo 'graph_category network' |
||
| 38 | echo 'signal_strength.label Signal Strength' |
||
| 39 | exit 0 |
||
| 40 | fi |
||
| 41 | ############################# |
||
| 42 | # Illegal User |
||
| 43 | ############################# |
||
| 44 | VAL=`gcom -d /dev/ttyUSB2 sig | sed 's/[Signal Quality: ]//g' | sed 's/,/./g'` |
||
| 45 | echo -en "signal_strength.value $VAL" |
||
| 46 | echo -n |
