Hello
Everyone.
NetView 7.1.3 on AIX
5.2
I wrote a little
script to capture the output from a netstat command and output to a file in the
format xnmgraph would like. The graph works fine but I cannot simply select
Update Data from the menu. In order to update the data - I have to rerun the
xnmgraph script. Here are the scripts and output:
Thanks in
advance.
Ray
Westphal
Enterprise
Rent-A-Car
The script that
collects the data:
#!/bin/ksh
#
while true do d=`date +%T` y=`date
+%m`.`date +%d`.`date +%y`- today=`date +"%b %d"` tot=`/usr/bin/netstat -p
ip | awk '/total packets received/ {print $1}'` drop=`/usr/bin/netstat
-p ip | awk '/packets dropped due to the full socket/ {print $1}'` echo
"scale=5;$drop / $tot * 100" | bc | read test sleep 10 echo "2 0 $y$d $test" >>
/tmp/time done
The
output:
2 0 09.15.03-07:58:03 18.37500 2 0
09.15.03-07:58:13 18.37100 2 0 09.15.03-07:58:23 18.36300 2 0
09.15.03-07:58:33 18.36000 2 0 09.15.03-07:58:43 18.35900
The xnmgraph
script:
#!/bin/ksh # day=`date +%m/%d` exec /usr/OV/bin/xnmgraph <
/tmp/time \ -title "Percent - $day" \ -lineWidth
1 \ -units "Percent" \ -mib
"+2:Percent:::::::" -displayWidth 4d
|