|
|
| Author |
Message |
polletj Cacti User
Joined: 30 Aug 2006 Posts: 52 Location: Antwerp/Belgium
|
Posted: Thu Feb 08, 2007 1:49 am Post subject: How to read this value in the weathermap???? |
|
|
Sounds stupid but what is now the actual value for this
478.9K
This is shown in the traffic label of the link.
Actual traffic on that link is 4789000 Bits/s
I would expect to read one of the following values:
4789000
4789K
4,789M
Is this my bug or weathermap bug? |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2167 Location: United Kingdom
|
Posted: Thu Feb 08, 2007 2:59 am Post subject: Re: How to read this value in the weathermap???? |
|
|
| polletj wrote: | Sounds stupid but what is now the actual value for this
478.9K
This is shown in the traffic label of the link.
Actual traffic on that link is 4789000 Bits/s
I would expect to read one of the following values:
4789000
4789K
4,789M
Is this my bug or weathermap bug? |
How do you know it's 4789000? I agree that should show as 4789K...
If you are getting data from an rrd file, then weathermap will be multiplying values by 8, since it assumes that they are from a standard SNMP byte-counter. If you have some unusual piece of kit where the counters are truly bits-per-second, then you would get values that are out by a factor of 8, but not 10...  |
|
| Back to top |
|
 |
polletj Cacti User
Joined: 30 Aug 2006 Posts: 52 Location: Antwerp/Belgium
|
Posted: Thu Feb 08, 2007 3:30 am Post subject: |
|
|
Well value read from graph is 4789000.
I leave the bits and bytes for what they are.
Do not take into account only the value. |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2167 Location: United Kingdom
|
Posted: Thu Feb 08, 2007 3:33 am Post subject: |
|
|
| polletj wrote: |
Well value read from graph is 4789000.
I leave the bits and bytes for what they are.
Do not take into account only the value. |
Fair enough. Do you believe the graph is correct then? I don't know of any bugs in this part of weathermap, but I'm happy to look if you think it's definitely a problem... |
|
| Back to top |
|
 |
polletj Cacti User
Joined: 30 Aug 2006 Posts: 52 Location: Antwerp/Belgium
|
Posted: Thu Feb 08, 2007 4:29 am Post subject: |
|
|
Howie,
As it's still early in the morning, just went out in the snow...
to wake up a bit....
The value represented in the traffic graph is multiplied by 8 to get the
bits/s.
So the same is done for the weathermap.
Then I assume the values should be the same right?
eg in the graph showing 4789000 should be represented in the weathermap
as either:
4789000
4789K
4,789M (, is used in Belgium)
Correct me if i'm wrong.
Cheers
Johan |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2167 Location: United Kingdom
|
Posted: Thu Feb 08, 2007 4:51 am Post subject: |
|
|
| polletj wrote: | As it's still early in the morning, just went out in the snow...
to wake up a bit....
|
Yeah, I was blessed with white stuff today too.
| polletj wrote: |
The value represented in the traffic graph is multiplied by 8 to get the
bits/s.
So the same is done for the weathermap.
Then I assume the values should be the same right?
|
Usually, yes. Unless you are using a funny graph template, for some unusual device where it stores the counters as bits, or ATM cells or something else, and the graph template has some CDEFs to calculate the right value. What's the interface you are looking at? |
|
| Back to top |
|
 |
polletj Cacti User
Joined: 30 Aug 2006 Posts: 52 Location: Antwerp/Belgium
|
Posted: Thu Feb 08, 2007 4:55 am Post subject: |
|
|
I use the simple normal template for traffic in bits/sec
no fancy hocus pocus... |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2167 Location: United Kingdom
|
Posted: Thu Feb 08, 2007 4:03 pm Post subject: |
|
|
| polletj wrote: | I use the simple normal template for traffic in bits/sec
no fancy hocus pocus... |
Then would you please run a poller cycle with DEBUG logging turned on, and paste the appropriate part of the Cacti log?
It will be the ReadDataFromRRD lines for the line that has the problem. And let me know what you think the bandwidth should be for the time when the poller ran, too. |
|
| Back to top |
|
 |
polletj Cacti User
Joined: 30 Aug 2006 Posts: 52 Location: Antwerp/Belgium
|
Posted: Fri Feb 09, 2007 2:02 am Post subject: Found it....... |
|
|
Howie,
Thanks for youre time but :
My copy paste mistake in a coding part.
Corrected the lazy copy paste and YES it works again....
I have added this in order to be able to weather the link status:
for ($i=0, $cnt=count($cols); $i < $cnt; $i++)
{
$values[$heads[$i]]=$cols[$i];
}
// as long as no-one actually manages to create an RRD with a DS of '-', //then this will just fall through to 0 for '-'
=> next part is added to cope with link status and connections
stmt 1763 switch ($in_ds)
{
case 'traffic_in':
$inbw=$values[$in_ds] * 8;
break;
default:
$inbw=$values[$in_ds] *1;
break;
}
switch ($out_ds)
{
case 'traffic_out':
$outbw=$values[$out_ds] * 8;
break;
default:
$outbw=$values[$out_ds] * 1;
break;
}
Cheers
Johan
PS: Enjoy the weekend |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2167 Location: United Kingdom
|
Posted: Fri Feb 09, 2007 3:35 am Post subject: Re: Found it....... |
|
|
| polletj wrote: | Howie,
Thanks for youre time but :
My copy paste mistake in a coding part.
|
Aaah. D'oh!
For the future, in version 0.9 you won't need that tweak. There is a seperate 'rrd gauge' DS format without the x8 built in.
| polletj wrote: |
PS: Enjoy the weekend |
You too! |
|
| Back to top |
|
 |
|