Re: [rrd-users] I need help with my rrd file

2008-09-29 Thread alucard95


Nuno Pereira wrote:
 
 Resending to the list...
 
 Instead of 
 
 snmpget -Oqv -v2c -c BAW_R 172.16.200.11 1.3.6.1.2.1.2.2.1.10.4   $input
 snmpget -Oqv -v2c -c BAW_R 172.16.200.11 1.3.6.1.2.1.2.2.1.16.4   $output
 
 try
 
 input  = `snmpget -Oqv -v2c -c BAW_R 172.16.200.11 1.3.6.1.2.1.2.2.1.10.4`
 output = `snmpget -Oqv -v2c -c BAW_R 172.16.200.11 1.3.6.1.2.1.2.2.1.16.4`
 
 Nuno Pereira
 
 

Hi all!!

I try with your synthax, this time the result is :

test_script.sh: 2: input: not found
test_script.sh: 4: output: not found

The problem must be with my variables, i'll try to find how resolv it.
Maybe i have to declare them, i don't know...


-- 
View this message in context: 
http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1125572.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-29 Thread Erik de Mare
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED] [EMAIL PROTECTED]
Message-ID: [EMAIL PROTECTED]
X-Sender: [EMAIL PROTECTED]
User-Agent: RoundCube Webmail/0.1b
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit


eth0_in=`/usr/bin/snmpwalk -c public -v 1 localhost -r 3 -t 9 -Oqv
IF-MIB::ifInOctets.2`
eth0_out=`/usr/bin/snmpwalk -c public -v 1 localhost -r 3 -t 9 -Oqv
IF-MIB::ifOutOctets.2`
echo $eth0_in:$eth0_out
/usr/local/rrdtool-1.0.48/bin/rrdtool update test.rrd N:$eth0_in:$eth0_out


On Mon, 29 Sep 2008 04:14:51 -0700 (PDT), alucard95 [EMAIL PROTECTED]
wrote:
 Hi all!!
 
 I try with your synthax, this time the result is :
 
 test_script.sh: 2: input: not found
 test_script.sh: 4: output: not found
 
 The problem must be with my variables, i'll try to find how resolv it.
 Maybe i have to declare them, i don't know...
 


___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-29 Thread alucard95

When i do the 'echo', i have the result :

#sh test_script.sh 
77134772:461597000

but not in my rrd file: 

#rrdtool fetch switch.rrd AVERAGE 

the result is: nan nan
-- 
View this message in context: 
http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1125660.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-29 Thread alucard95

There is a progress: 

#rrdtool update switch.rrd 1222690800:77134772:461597000
# rrdtool fetch switch.rrd AVERAGE --start 1222690400
  input  output

1222690500: nan nan
1222690800: 0.00e+00 0.00e+00

I try the update manually, why there is 0. instead of my numbers??

-- 
View this message in context: 
http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1125680.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-29 Thread Andy Riebs
Fixing your original script...

---
#!/bin/sh
a=0
while [ $a != 0 ]; do
in=`snmpwalk -v2c -c public xxx.xxx.xxx.xxx 1.3.6.1.2.1.2.2.1.10.4`
out=`snmpwalk -v2c -c public xxx.xxx.xxx.xxx 1.3.6.1.2.1.2.2.1.16.4`
 # I can use N as a replacement for the current time
 rrdtool update /home/zabbix/switch.rrd N:$in:$out
 # sleep until the next 300 seconds are full
 perl -e 'sleep 30 - time % 30'
done # end of while loop 


/andy

On Monday 29 September 2008 08:11:08 am alucard95 wrote:
 When i do the 'echo', i have the result :

 #sh test_script.sh
 77134772:461597000

 but not in my rrd file:

 #rrdtool fetch switch.rrd AVERAGE

 the result is: nan nan
 --
 View this message in context:
 http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1125660.htm
l Sent from the RRDtool Users Mailinglist mailing list archive at
 Nabble.com.

 ___
 rrd-users mailing list
 rrd-users@lists.oetiker.ch
 https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users



-- 
Andy Riebs,  HP Scalable Computing and Infrastructure / Linux RD
(w) [EMAIL PROTECTED] Technology for better business outcomes
+1 (978) 748-0043 (Mon,Thu,Fri)
+1 (508) 467-3002 (Tue,Wed)
(h) [EMAIL PROTECTED]  My opinions are not necessarily those of HP

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-29 Thread alucard95

So, this is the final script which is running : 

 #!/bin/sh
 a=0
 while [ $a!=0 ]; do
input=$(snmpget -Oqv -v2c -c public xxx.xxx.xxx.xxx 1.3.6.1.2.1.2.2.1.10.4)

output=$(snmpget -Oqv -v2c -c public xxx.xxx.xxx.xxx 1.3.6.1.2.1.2.2.1.16.4)

echo $input:$output

# I can use N as a replacement for the current time
$(rrdtool update /home/zabbix/switch.rrd N:$input:$output)

# sleep 30 seconds 
sleep 30 

# end of while loop
done 

the result of the echo is good, but the last problem (i hope :-() is when i
do a rrd fetch, the result is :

1222693200: nan nan
1222693500: 0.00e+00 0.00e+00
1222693800: 0.00e+00 0.00e+00
1222694100: nan nan

why it is not the good number??
-- 
View this message in context: 
http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1125793.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-29 Thread Andy Riebs
OK,

A few more problems here...

1. It's a good bet that the following isn't doing what you think it is:

  a=0
  while [ $a!=0 ]; do

   You probably meant to do

a=1
while [ $a -ne 0 ]; do

   Though I will concede that the following would also work:

a=1
while [ $a !=  0 ]; do

   or
a=0
while [ $a = 0 ]; do

2. You appear to have the rrd set up for 300 second (5 minute) intervals; 
for how long are you collecting your samples?  There are a couple of  
conditions that you'll have to meet before useful results are available.

Consider the following times, in order, given your loop:

a. First sample is taken
b. First time()%300 threshold is passed; the
   start of a measurement interval begins
c. Second time()%300 threshold is passed
d. Another sample is taken, rrd can now determine
   the value for the interval from (b) to (c)

So, given your loop with samples every 30 seconds, it could take nearly 11 
minutes before a single result can be reported:
- The interval between (a) and (b) could be as
  much as 299 seconds
- The interval between (b) and (c) will be
  exactly 300 seconds
- The interval between (c) and (d) could be as
  much as 30 seconds

Make sense?
/andy

On Monday 29 September 2008 09:19:07 am alucard95 wrote:
 So, this is the final script which is running :

  #!/bin/sh
  a=0
  while [ $a!=0 ]; do
 input=$(snmpget -Oqv -v2c -c public xxx.xxx.xxx.xxx
 1.3.6.1.2.1.2.2.1.10.4)

 output=$(snmpget -Oqv -v2c -c public xxx.xxx.xxx.xxx
 1.3.6.1.2.1.2.2.1.16.4)

 echo $input:$output

 # I can use N as a replacement for the current time
 $(rrdtool update /home/zabbix/switch.rrd N:$input:$output)

 # sleep 30 seconds
 sleep 30

 # end of while loop
 done

 the result of the echo is good, but the last problem (i hope :-() is
 when i do a rrd fetch, the result is :

 1222693200: nan nan
 1222693500: 0.00e+00 0.00e+00
 1222693800: 0.00e+00 0.00e+00
 1222694100: nan nan

 why it is not the good number??
 --
 View this message in context:
 http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1125793.htm
l Sent from the RRDtool Users Mailinglist mailing list archive at
 Nabble.com.

 ___
 rrd-users mailing list
 rrd-users@lists.oetiker.ch
 https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users



-- 
Andy Riebs,  HP Scalable Computing and Infrastructure / Linux RD
(w) [EMAIL PROTECTED] Technology for better business outcomes
+1 (978) 748-0043 (Mon,Thu,Fri)
+1 (508) 467-3002 (Tue,Wed)
(h) [EMAIL PROTECTED]  My opinions are not necessarily those of HP

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-29 Thread alucard95

You're right Andy, 

I decrease the intervale and i change the port of the switch.
I explain, i tested the traffic on the port 4 (choose at random) but after
test, the traffic on this port is constant, it's explain the value 0.
I test on a other port and the result is better!! :-D

Thank you for your help =)
-- 
View this message in context: 
http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1125918.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-29 Thread Nuno Pereira
 1. It's a good bet that the following isn't doing what you think it is:
 
 a=0
 while [ $a!=0 ]; do
 
You probably meant to do
 
   a=1
   while [ $a -ne 0 ]; do
 
Though I will concede that the following would also work:
 
   a=1
   while [ $a !=  0 ]; do
 
or
   a=0
   while [ $a = 0 ]; do

In my opinion, as it was said previously, it would much better and simpler
to put:

while true; do


It would do the same and would be better to read.

Nuno Pereira

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-29 Thread alucard95

In fact, i don't really understood

can you explain to me the signification please :-D

a=1
   while [ $a -ne 0 ]; do

particularly this parts : [ $a -ne 0 ]
-- 
View this message in context: 
http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1127008.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-29 Thread Nuno Pereira
 In fact, i don't really understood
 
 can you explain to me the signification please :-D
 
 a=1
  while [ $a -ne 0 ]; do
 
 particularly this parts : [ $a -ne 0 ]

This is a Conditional Expression (see the man section for more info) that
you can use in sh to test if arg1 is not qual to arg2. It's a arithmetic
binary operator. There are others like -eq, -lt, -le, -gt, or -ge, which
mean equal, less then, etc.
It's equivalent to != with the difference that != compares strings, and
-ne compares numbers.

Nuno

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-29 Thread alucard95

thanks you Nuno Pereira, you're right, this method is better.
I'm going to change my script =)
-- 
View this message in context: 
http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1127158.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


[rrd-users] I need help with my rrd file

2008-09-26 Thread alucard95

Hello!!

I need some help with my rrd file. I want to do graphs of input and output
traffic of my network.

I create the follow rrd file:

rrdtool create switch.rrd \
DS:input:COUNTER:600:U:U   \
DS:output:COUNTER:600:U:U  \
RRA:AVERAGE:0.5:1:600  \
RRA:AVERAGE:0.5:6:700  \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797\
RRA:MAX:0.5:1:600  \
RRA:MAX:0.5:6:700  \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797

next i create a script to upload my rrd file : 

 #!/bin/sh
 a=0
 while [ $a != 0 ]; do
snmpwalk -v2c -c public xxx.xxx.xxx.xxx 1.3.6.1.2.1.2.2.1.10.4  $in

snmpwalk -v2c -c public xxx.xxx.xxx.xxx 1.3.6.1.2.1.2.2.1.16.4  $out

 # I can use N as a replacement for the current time
 rrdtool update /home/zabbix/switch.rrd N:$in:$out
 # sleep until the next 300 seconds are full
 perl -e 'sleep 30 - time % 30'
 done # end of while loop

But when i create a graph, he's empty. I think there is a problem with the
rrd file because when i do a rrdtool fetch, i have the answer nan.

if anybody can help me

Thanks
-- 
View this message in context: 
http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1120359.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-26 Thread Andreas Maus
On Fri, Sep 26, 2008 at 01:50:13AM -0700, alucard95 wrote:
 Hello!!
Hi.

 I need some help with my rrd file. I want to do graphs of input and output
 traffic of my network.
[... snipp ...]

 next i create a script to upload my rrd file : 
 
  #!/bin/sh
  a=0
  while [ $a != 0 ]; do
 snmpwalk -v2c -c public xxx.xxx.xxx.xxx 1.3.6.1.2.1.2.2.1.10.4  $in
 
 snmpwalk -v2c -c public xxx.xxx.xxx.xxx 1.3.6.1.2.1.2.2.1.16.4  $out
*ahem*
Why do you do an snmpWALK ? To just fetch an SNMP entry use snmpget.
Show us the output of your snmpget command. I guess it looks like this:

[EMAIL PROTECTED]:~$  snmpwalk -v2c -c public 192.168.1.222 
1.3.6.1.2.1.2.2.1.16.4
IF-MIB::ifOutOctets.4 = Counter32: 262658353

  # I can use N as a replacement for the current time
  rrdtool update /home/zabbix/switch.rrd N:$in:$out
See the comment about the format above.
I guess you are calling rrdtool update /home/zabbix/switch.rrd 
N:IF-MIB::ifInOctets.4 = Counter32: 262658353:IF-MIB::ifOutOctets.4 = 
Counter32: 262658353
and this will definetively NOT work.

Did you run your script by hand? Did it produce any error messages?

  # sleep until the next 300 seconds are full
  perl -e 'sleep 30 - time % 30'
Aeeeh ... whats wrong with sleep 300 ?
(ah and you will sleep for 30 seconds. not 300).

  done # end of while loop

HTH,

Andreas.

-- 
Dipl.-Ing. Andreas Maus science+computing ag
System Administration   Hagellocher Weg 73
tel.: +49 7071 9457 671 72070 Tuebingen, Germany
fax: +49 7071 9457 411  www.science-computing.de


pgpY3WH1h7oxp.pgp
Description: PGP signature
___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-26 Thread alucard95

First thank you for help me!!

Show us the output of your snmpget command. I guess it looks like this:

[EMAIL PROTECTED]:~$  snmpwalk -v2c -c public 192.168.1.222 
1.3.6.1.2.1.2.2.1.16.4
IF-MIB::ifOutOctets.4 = Counter32: 262658353

Yes, the output is : IF-MIB::ifOutOctets.4 = Counter32: 461597000

See the comment about the format above.
I guess you are calling rrdtool update /home/zabbix/switch.rrd
N:IF-MIB::ifInOctets.4 = Counter32: 262658353:IF-MIB::ifOutOctets.4 =
Counter32: 262658353
and this will definetively NOT work.  

I don't understand why it will not work, is there an error??

To test where was the error, i try to update my file manually with this
command : 

rrdtool update switch.rrd N:77134800:461597800

I have no error but with this command : 

rrdtool fetch switch.rrd AVERAGE --start N --end N   

the output is

   input  output

1222422000: nan nan

is the N which causes problem??
-- 
View this message in context: 
http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1120441.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-26 Thread Rene Fritzsche
Hi,

 Show us the output of your snmpget command. I guess it looks like this:
 
 [EMAIL PROTECTED]:~$  snmpwalk -v2c -c public 192.168.1.222 
 1.3.6.1.2.1.2.2.1.16.4
 IF-MIB::ifOutOctets.4 = Counter32: 262658353
 
 Yes, the output is : IF-MIB::ifOutOctets.4 = Counter32: 461597000

as Alexander wrote; this whole output-line can not be used to be filled
in the rrdupdate... you need to seperate/cut out the counter-value and
use only this.
eg.

change
  snmpwalk ... 1.3.6.1.2.1.2.2.1.16.4  $out
to
  snmpwalk ... 1.3.6.1.2.1.2.2.1.16.4 | sed 's/^.*: \([0-9]*]\)$/\1/'  $out

this should seperate the last numbers starting after the : to your variable.


HTH
 Rene.

___
Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=00

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-26 Thread Rene Fritzsche
little typo (sorry):

  snmpwalk ... 1.3.6.1.2.1.2.2.1.16.4 | sed 's/^.*: \([0-9]*\)$/\1/'  $out


Rene.


Pt! Schon vom neuen WEB.DE MultiMessenger gehört? 
Der kann`s mit allen: http://www.produkte.web.de/messenger/?did=3123

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-26 Thread Andreas Maus
On Fri, Sep 26, 2008 at 01:45:35PM +0200, Rene Fritzsche wrote:
 Hi,
 
  Show us the output of your snmpget command. I guess it looks like this:
  
  [EMAIL PROTECTED]:~$  snmpwalk -v2c -c public 192.168.1.222 
  1.3.6.1.2.1.2.2.1.16.4
  IF-MIB::ifOutOctets.4 = Counter32: 262658353
  
  Yes, the output is : IF-MIB::ifOutOctets.4 = Counter32: 461597000
 
 as Alexander wrote; this whole output-line can not be used to be filled
Hi.

I'm not Alexander but thats o.k. :P

 to
   snmpwalk ... 1.3.6.1.2.1.2.2.1.16.4 | sed 's/^.*: \([0-9]*]\)$/\1/'  $out
Or just use the man snmpget to get the options for snmpget to get a more
parsable result. Obviously this depends on your snmp programs.

E.g. my net-snmp uses the switch -Oq to get a result that is easier to
parse:

[EMAIL PROTECTED]:~$ snmpget -Oq -v2c -c public 192.168.1.222 
1.3.6.1.2.1.2.2.1.16.4
IF-MIB::ifOutOctets.4 269735286
[EMAIL PROTECTED]:~$ snmpget -Oq -v2c -c public 192.168.1.222 
1.3.6.1.2.1.2.2.1.16.4 | cut -d ' ' -f 2 
269736768

HTH,

Andreas.

-- 
Dipl.-Ing. Andreas Maus science+computing ag
System Administration   Hagellocher Weg 73
tel.: +49 7071 9457 671 72070 Tuebingen, Germany
fax: +49 7071 9457 411  www.science-computing.de


pgpK7m6tPT4bN.pgp
Description: PGP signature
___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-26 Thread alucard95

ok, i progress,

The problem in my command was whis the end because when i execute : 

rrdtool update switch.rrd 1222430700:77134872:461597800

and next : 

rrdtool fetch switch.rrd AVERAGE --start 1222430400 --end 1222431000

the result is :

  input  output

1222430700: 6.7114093960e-01 5.3691275168e+00
1222431000: nan nan
1222431300: nan nan

My file is not empty, it's good thing :-)

Can i suppose that it is the N in my script which is the problem?? 
-- 
View this message in context: 
http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1120704.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-26 Thread Erik de Mare

or use snmpwalk -Oqv -c public localhost
no parsing needed

rrdtool update file.rrd N:`snmpwalk -Oqv -c public localhost
1.3.6.1.2.1.2.2.1.16.4`:`snmpwalk -Oqv -c public localhost
1.3.6.1.2.1.2.2.1.16.4`

and you only need to graph it

On Fri, 26 Sep 2008 13:58:20 +0200, Andreas Maus
[EMAIL PROTECTED] wrote:
 
 [EMAIL PROTECTED]:~$ snmpget -Oq -v2c -c public 192.168.1.222
 1.3.6.1.2.1.2.2.1.16.4
 IF-MIB::ifOutOctets.4 269735286
 [EMAIL PROTECTED]:~$ snmpget -Oq -v2c -c public 192.168.1.222
 1.3.6.1.2.1.2.2.1.16.4 | cut -d ' ' -f 2 
 269736768
 
 HTH,
 
 Andreas.
 


___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-26 Thread alucard95

ok, thank you for this!

But i have an other question, why when i execute manually this command : 

rrdtool update switch.rrd N:77134772:461597000

and next when i want to see the result : 

rrdtool fetch switch.rrd AVERAGE --start N --end N

the output is : 

  input  output

1222430700: nan nan

my rrdfile is always empty

-- 
View this message in context: 
http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1120696.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-26 Thread Andy Riebs
Hi,

I think the confusion here is that rrdtool generally works with changes 
rates of change; by specifying the same time for the start and end of the 
period, no change can be calculated.

HTH!
/andy

On Friday 26 September 2008 08:14:51 am alucard95 wrote:
 ok, i progress,

 The problem in my command was whis the end because when i execute :

 rrdtool update switch.rrd 1222430700:77134872:461597800

 and next :

 rrdtool fetch switch.rrd AVERAGE --start 1222430400 --end 1222431000

 the result is :

   input  output

 1222430700: 6.7114093960e-01 5.3691275168e+00
 1222431000: nan nan
 1222431300: nan nan

 My file is not empty, it's good thing :-)

 Can i suppose that it is the N in my script which is the problem??
 --
 View this message in context:
 http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1120704.htm
l Sent from the RRDtool Users Mailinglist mailing list archive at
 Nabble.com.

 ___
 rrd-users mailing list
 rrd-users@lists.oetiker.ch
 https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users



-- 
Andy Riebs,  HP Scalable Computing and Infrastructure / Linux RD
(w) [EMAIL PROTECTED] Technology for better business outcomes
+1 (978) 748-0043 (Mon,Thu,Fri)
+1 (508) 467-3002 (Tue,Wed)
(h) [EMAIL PROTECTED]  My opinions are not necessarily those of HP

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-26 Thread alucard95

Thank you for all your answers!!

Now i modifie my script like this : 

 #!/bin/sh
 a=0
 while [ $a != 0 ]; do
snmpget -Oqv -v2c -c public xxx.xxx.xxx.xxx 1.3.6.1.2.1.2.2.1.10.4   $in

snmpget -Oqv -v2c -c public xxx.xxx.xxx.xxx 1.3.6.1.2.1.2.2.1.16.4   $out

 # I can use N as a replacement for the current time
 rrdtool update /home/zabbix/switch.rrd N:$in:$out
 # sleep until the next 300 seconds are full
 perl -e 'sleep 30 - time % 30'
 done # end of while loop

But when i create a graphic :

rrdtool graph switch.png --start -86400 --end +86400 \
DEF:inoctets=switch.rrd:input:AVERAGE \
DEF:outoctets=switch.rrd:output:AVERAGE \
AREA:inoctets#00FF00:In traffic \
LINE1:outoctets#FF:Out traffic

There is no data. 

I launch my script like this : 

#sh script_name.sh

do I make a mistake somewhere??

-- 
View this message in context: 
http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1120825.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-26 Thread jeffrey.j.petter
You may wish to check your variable names. You are updating the rrd
database with the variables $in and $out, yet when you do your graphing,
you ask for data from input and output.

Hope that helps,

Jeff 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of alucard95
Sent: Friday, September 26, 2008 9:07 AM
To: rrd-users@lists.oetiker.ch
Subject: Re: [rrd-users] I need help with my rrd file


Thank you for all your answers!!

Now i modifie my script like this : 

 #!/bin/sh
 a=0
 while [ $a != 0 ]; do
snmpget -Oqv -v2c -c public xxx.xxx.xxx.xxx 1.3.6.1.2.1.2.2.1.10.4 
$in

snmpget -Oqv -v2c -c public xxx.xxx.xxx.xxx 1.3.6.1.2.1.2.2.1.16.4 
$out

 # I can use N as a replacement for the current time
 rrdtool update /home/zabbix/switch.rrd N:$in:$out
 # sleep until the next 300 seconds are full
 perl -e 'sleep 30 - time % 30'
 done # end of while loop

But when i create a graphic :

rrdtool graph switch.png --start -86400 --end +86400 \
DEF:inoctets=switch.rrd:input:AVERAGE \
DEF:outoctets=switch.rrd:output:AVERAGE \
AREA:inoctets#00FF00:In traffic \
LINE1:outoctets#FF:Out traffic

There is no data. 

I launch my script like this : 

#sh script_name.sh

do I make a mistake somewhere??

-- 
View this message in context:
http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1120825.html
Sent from the RRDtool Users Mailinglist mailing list archive at
Nabble.com.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-26 Thread alucard95

I modified my script and named my variables names $input and $output.

The result is the same, how can i verify that my script is running??
-- 
View this message in context: 
http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1120979.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-26 Thread alucard95

I think the problem is with my script.

So, i create a new script like this : 

#!/bin/sh
snmpget -Oqv -v2c -c BAW_R 172.16.200.11 1.3.6.1.2.1.2.2.1.10.4   $input

snmpget -Oqv -v2c -c BAW_R 172.16.200.11 1.3.6.1.2.1.2.2.1.16.4   $output

 # I can use N as a replacement for the current time
 rrdtool update /home/zabbix/switch.rrd 1222431060:$input:$output

and when i execute it, i have this result : 

#sh test_script.sh 
test_script.sh: 2: cannot create : Directory nonexistent
test_script.sh: 4: cannot create : Directory nonexistent

I don't understand this error, i now it's a scripting error without link
with rrdtool but if anybody understand what's happen... :-)

-- 
View this message in context: 
http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1121025.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-26 Thread Andy Riebs
You have to assign values to $input and $output!

/andy

On Friday 26 September 2008 10:28:18 am alucard95 wrote:
 I think the problem is with my script.

 So, i create a new script like this :

 #!/bin/sh
 snmpget -Oqv -v2c -c BAW_R 172.16.200.11 1.3.6.1.2.1.2.2.1.10.4  
 $input

 snmpget -Oqv -v2c -c BAW_R 172.16.200.11 1.3.6.1.2.1.2.2.1.16.4  
 $output

  # I can use N as a replacement for the current time
  rrdtool update /home/zabbix/switch.rrd 1222431060:$input:$output

 and when i execute it, i have this result :

 #sh test_script.sh
 test_script.sh: 2: cannot create : Directory nonexistent
 test_script.sh: 4: cannot create : Directory nonexistent

 I don't understand this error, i now it's a scripting error without
 link with rrdtool but if anybody understand what's happen... :-)

 --
 View this message in context:
 http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1121025.htm
l Sent from the RRDtool Users Mailinglist mailing list archive at
 Nabble.com.

 ___
 rrd-users mailing list
 rrd-users@lists.oetiker.ch
 https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users



-- 
Andy Riebs,  HP Scalable Computing and Infrastructure / Linux RD
(w) [EMAIL PROTECTED] Technology for better business outcomes
+1 (978) 748-0043 (Mon,Thu,Fri)
+1 (508) 467-3002 (Tue,Wed)
(h) [EMAIL PROTECTED]  My opinions are not necessarily those of HP

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-26 Thread alucard95


Normally, the result of this command snmpget -Oqv -v2c -c BAW_R
172.16.200.11 1.3.6.1.2.1.2.2.1.10.4 is assign to $input and the same for
$output

isn't it??
-- 
View this message in context: 
http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1121065.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-26 Thread Nuno Pereira
Resending to the list...



Instead of 

snmpget -Oqv -v2c -c BAW_R 172.16.200.11 1.3.6.1.2.1.2.2.1.10.4   $input
snmpget -Oqv -v2c -c BAW_R 172.16.200.11 1.3.6.1.2.1.2.2.1.16.4   $output

try

input  = `snmpget -Oqv -v2c -c BAW_R 172.16.200.11 1.3.6.1.2.1.2.2.1.10.4`
output = `snmpget -Oqv -v2c -c BAW_R 172.16.200.11 1.3.6.1.2.1.2.2.1.16.4`

Nuno Pereira

-Mensagem original-
De: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Em nome de alucard95
Enviada: sexta-feira, 26 de Setembro de 2008 15:28
Para: rrd-users@lists.oetiker.ch
Assunto: Re: [rrd-users] I need help with my rrd file


I think the problem is with my script.

So, i create a new script like this : 

#!/bin/sh
snmpget -Oqv -v2c -c BAW_R 172.16.200.11 1.3.6.1.2.1.2.2.1.10.4   $input

snmpget -Oqv -v2c -c BAW_R 172.16.200.11 1.3.6.1.2.1.2.2.1.16.4   $output

 # I can use N as a replacement for the current time
 rrdtool update /home/zabbix/switch.rrd 1222431060:$input:$output

and when i execute it, i have this result : 

#sh test_script.sh 
test_script.sh: 2: cannot create : Directory nonexistent
test_script.sh: 4: cannot create : Directory nonexistent

I don't understand this error, i now it's a scripting error without link
with rrdtool but if anybody understand what's happen... :-)

-- 
View this message in context:
http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1121025.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-26 Thread alucard95

Ok, i'm going to try this on monday because i can't acceed to the server the
week end ;-)

However thank you very much for all your answers and i'll give you the
result the faster possible!
-- 
View this message in context: 
http://n2.nabble.com/I-need-help-with-my-rrd-file-tp1120359p1121370.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] I need help with my rrd file

2008-09-26 Thread Joshua Keroes
For infinite loops in sh, I prefer the following:

while :
do
rrdtool ...
sleep 300
done
___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users