Хочу снимать показатель активности 80 порта.
Сколько соединений открыто.
Код: Выделить всё
PageTop[www]: <h1>Connecton 80,443 port.</h1>
Target[www]: `/usr/local/etc/mrtg/finist_apache`
Options[www]: gauge, nopercent
MaxBytes[www]: 10000
#WithPeak[www]: dwmy
WithPeak[www]: ymwd
Title[www]: peer second
ShortLegend[www]: peer
YLegend[www]: peer second
Legend1[www]: .
Legend2[www]: Number of WWW connection
Legend3[www]: .
Legend4[www]: Number of WWW connection
LegendI[www]: Maximum:
LegendO[www]: Loaded:
Скрипт.
Код: Выделить всё
#!/bin/sh
res=`netstat -an -f inet | grep .80 | grep ESTABLISHED | wc -l`
echo $res
echo $res
echo `uptime | awk '{print $3 $4 " " $5}' | cut -d, -f 1,2`
echo "`hostname`"
Скрипт выдает такие данные.
Код: Выделить всё
# /usr/local/etc/mrtg/finist_apache
41
41
4days, 23:35
home
Но в графика отмечаются 4,-5 какието маленькие показатели или вовсе 0.
Как лучьше такой показатель снимать?