Projet

Général

Profil

Révision 36dbfa1b

ID36dbfa1b28bada1de4faef91a29b514be108b790
Parent 24e77a26
Enfant 2d0c82de

Ajouté par Martin Ness il y a environ 11 ans

arp_ sh lint

Voir les différences:

plugins/network/arp_
15 15
#%# family=contrib
16 16
#%# capabilities=autoconf suggest
17 17

  
18
INTERFACE=`basename $0 | sed 's/^arp_//g' | tr '_' '.'`
18
INTERFACE=$(basename $0 | sed 's/^arp_//g' | tr '_' '.')
19 19

  
20 20
if [ "$1" = "autoconf" ]; then
21 21
    # Search for arp
......
43 43
        echo 'graph_vlabel Entries'
44 44
        echo 'graph_category network'
45 45
	echo 'graph_scale no'
46
        echo "graph_info This graph shows the number of ARP entries registered by the system for interface $INTERFACE."
46
        echo "graph_info This graph shows the number of ARP entries registered by the system for interface ${INTERFACE}."
47 47
	echo 'entries.label ARP entries'
48 48
	echo 'entries.draw LINE2'
49 49
	echo 'entries.type GAUGE'
......
51 51
	exit 0
52 52
fi
53 53

  
54
arp -an -i $INTERFACE | awk 'BEGIN { regex="<incomplete>";} { if (!match($4,regex)) { a[$4] }} END{for(i in a){n++};print "entries.value " n}'
54
arp -an -i "$INTERFACE" | awk 'BEGIN { regex="<incomplete>";} { if (!match($4,regex)) { a[$4] }} END{for(i in a){n++};print "entries.value " n}'
55 55

  

Formats disponibles : Unified diff