nv-l
[Top] [All Lists]

[nv-l] xnmgraph question

To: <nv-l@lists.tivoli.com>
Subject: [nv-l] xnmgraph question
From: "Westphal, Raymond W" <Raymond.W.Westphal@erac.com>
Date: Mon, 15 Sep 2003 08:14:44 -0500
Delivered-to: mailing list nv-l@lists.tivoli.com
Delivery-date: Mon, 15 Sep 2003 14:25:40 +0100
Envelope-to: nv-l-archive@lists.skills-1st.co.uk
List-help: <mailto:nv-l-help@lists.tivoli.com>
List-post: <mailto:nv-l@lists.tivoli.com>
List-subscribe: <mailto:nv-l-subscribe@lists.tivoli.com>
List-unsubscribe: <mailto:nv-l-unsubscribe@lists.tivoli.com>
Mailing-list: contact nv-l-help@lists.tivoli.com; run by ezmlm
Thread-index: AcN7i1N+Zg/M2D8kRXW0qlNIReq8Sg==
Thread-topic: xnmgraph question
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
 

 
 
<Prev in Thread] Current Thread [Next in Thread>

Archive operated by Skills 1st Ltd

See also: The NetView Web