Which IF should I move these lines below...this one: ?
//Process MIB Status Values
if (is_numeric($ifAdminStatus[$i]))
switch ($ifAdminStatus[$i]) {
case "1": $ifAdminStatus[$i] = "up"; break;
case "2": $ifAdminStatus[$i] = "down"; break;
case "3": $ifAdminStatus[$i] = "testing"; break;
}
Should I just paste those lines in below this, or just before it...
Thanks.
-----Original Message-----
From: Javier Szyszlican [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 30, 2004 8:23 AM
Cc: jffnms
Subject: Re: [jffnms-users] problem with inbound/outbound bandwidth
Johan,
I think I see whats happening.
I guess none of your interfaces has IP addreses right?
Move this lines:
list(, $ifSpeed[$i]) = explode(":",$ifSpeed[$i]);
$ifSpeed[$i] = round($ifSpeed[$i]/1000);
Below the IF, around line 55, so that will be processed even if the
interface does not have an IP address.
Javier
[EMAIL PROTECTED] wrote:
> Hi,This is after the second debug rule : Array
> (
> [0] => Gauge32: 2312000
> [1] => Gauge32: 10000000
> [2] => Gauge32: 4294967295
> [3] => Gauge32: 0
> [4] => Gauge32: 2312000
> [5] => Gauge32: 0
> [6] => Gauge32: 2312000
> [7] => Gauge32: 1032000
> [8] => Gauge32: 56000
> [9] => Gauge32: 100000000
> [10] => Gauge32: 56000
> )
> 10000000 56000----- Original Message -----
> From: "Javier Szyszlican" <[EMAIL PROTECTED]>
> Cc: "jffnms" <[EMAIL PROTECTED]>
> Sent: Tuesday, June 29, 2004 9:40 PM
> Subject: Re: [jffnms-users] problem with inbound/outbound bandwidth
>
>
>
>>Joham,
>>
>>This looks ok.
>>
>>Now add :
>>
>>debug ($ifSpeed[$i]);
>>
>>in line 41, right bellow the explode of ifSpeed.
>>
>>It has to work.
>>
>>Javier
>>
>>[EMAIL PROTECTED] wrote:
>>
>>>Javier,
>>>Hereby my snmpwalk :
>>>.iso.3.6.1.2.1.2.2.1.5.1 = Gauge: 2312000 .iso.3.6.1.2.1.2.2.1.5.2 =
>>>Gauge: 1000000 .iso.3.6.1.2.1.2.2.1.5.3 = Gauge: 4294967
>>>.iso.3.6.1.2.1.2.2.1.5.4 = Gauge: 0
>>>.iso.3.6.1.2.1.2.2.1.5.5 = Gauge: 2312000
>>>.iso.3.6.1.2.1.2.2.1.5.6 = Gauge: 0
>>>.iso.3.6.1.2.1.2.2.1.5.7 = Gauge: 2312000
>>>.iso.3.6.1.2.1.2.2.1.5.8 = Gauge: 2056000
>>>.iso.3.6.1.2.1.2.2.1.5.9 = Gauge: 56000
>>>.iso.3.6.1.2.1.2.2.1.5.10 = Gauge: 100000
>>>.iso.3.6.1.2.1.2.2.1.5.11 = Gauge: 56000
>>>What I need to see for my customers (i am isp) is the maximal bandwidth,
>>>this means in this case 2312000 kbps and when they see 128 kb, it will
>
> rain
>
>>>complaints :))
>>>
>>>ppm> query net-snmp
>>>Querying target 1 (ActivePerl 5.6.1.633)
>>> 1. Net-SNMP [4.0] Object oriented interface to SNMP
>>> 2. Net-SNMP [4.0] Object oriented interface to SNMP
>>> 3. Net-SNMP-Interfaces [0.2] provide simple methods to gain
>>>interface
>
> data
>
>>>there is no ucd-snmp, since net-snmp the perl interface, is being
>>>used. With the debugging , this is what I see : (
>>> [0] => Gauge32: 2312000
>>> [1] => Gauge32: 10000000
>>> [2] => Gauge32: 4294967295
>>> [3] => Gauge32: 0
>>> [4] => Gauge32: 2312000
>>> [5] => Gauge32: 0
>>> [6] => Gauge32: 2312000
>>> [7] => Gauge32: 2056000
>>> [8] => Gauge32: 56000
>>> [9] => Gauge32: 100000000
>>> [10] => Gauge32: 56000
>>>)
>>>
>>>And what appears in the interface (called ATM0) :
>>> 1 ATM0 up 128000
>>>
>>>
>>>Greetings,
>>>Johan
>>>----- Original Message -----
>>>From: "Javier Szyszlican" <[EMAIL PROTECTED]>
>>>Cc: "jffnms" <[EMAIL PROTECTED]>
>>>Sent: Tuesday, June 29, 2004 6:06 PM
>>>Subject: Re: [jffnms-users] problem with inbound/outbound bandwidth
>>>
>>>
>>>
>>>
>>>>Johan,
>>>>
>>>>I see, which NET-SNMP or UCD-SNMP version do you have?
>>>>
>>>>can you add :
>>>>
>>>>debug ($ifSpeed);
>>>>
>>>>just below the ifSpeed snmpwalk in the snmp_interfaces.inc.php
>>>>
>>>>And show me the output when you do a Manual Discovery.
>>>>
>>>>Javier
>>>>
>>>>johan wrote:
>>>>
>>>>
>>>>>Hi,
>>>>>
>>>>>according to my humble opinion, this is not necessary, since when I
>>>>>do an snmpwalk for that oid , I receive for example 800.000 bps,
>>>>>which means that the router gives the correct value. I also checked
>>>>>this with a mib-viewer.
>>>>>
>>>>>When I remove the rule
>>>>>$ifSpeed[$i] = ($ifSpeed[$i]/1000); I receive the real value, in
>>>>>this case 8000000, but with GAUGE32 before it, which causes it is
>>>>>not being translated to rrd. I also tried with cricket where the
>>>>>correct value is being given. Suggestions ?
>>>>>
>>>>>Greetings,
>>>>>Johan
>>>>>
>>>>>On Tue, 2004-06-29 at 17:50, Javier Szyszlican wrote:
>>>>>
>>>>>
>>>>>
>>>>>>Johan,
>>>>>>
>>>>>>We only use the default if the real IfSpeed is 0.
>>>>>>So please check if the router has correctly set the Bandwidth in
>>>>>>each interface.
>>>>>>
>>>>>>Also you may want to show me a snmpwalk of the IfSpeed OID against
>
> your
>
>>>>>>router.
>>>>>>
>>>>>>Javier
>>>>>>
>>>>>>johan wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Hi,
>>>>>>>
>>>>>>>I have problem in getting the correct inbound and outbound
>>>>>>>bandwidth
>
> in
>
>>>>>>>the discovering of the performance graphs. Apparently for some
>>>>>>>odd
>>>
>>>raeson he always gives
>>>
>>>
>>>>>>>the 128000 kbps, due to a rule in snmp_interfaces.inc.php : if
>>>>>>>($ifSpeed[$i] == 0) $ifSpeed[$i] = 128; //default Speed Value
>>>>>>>
>>>>>>>I tried to remove it, and then he gives 56000bps as standard
>>>>>>>value.
>>>
>>>What
>>>
>>>
>>>>>>>I want is the real inbound/outbound bandwidth, i.e. the result of
>>>>>>>
>>>>>>>$ifSpeed = snmp_walk($ip,$rocommunity,".1.3.6.1.2.1.2.2.1.5");
>>>>>>>
>>>>>>>Anybody know how I can fix this ?
>>>>>>>
>>>>>>>Greetings,
>>>>>>>Johan
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>-------------------------------------------------------
>>>>>>>This SF.Net email sponsored by Black Hat Briefings & Training.
>>>>>>>Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
>>>>>>>digital self defense, top technical experts, no vendor pitches,
>>>>>>>unmatched networking opportunities. Visit www.blackhat.com
>>>>>>>_______________________________________________
>>>>>>>jffnms-users mailing list [EMAIL PROTECTED]
>>>>>>>https://lists.sourceforge.net/lists/listinfo/jffnms-users
>>>>>
>>>>>
>>>>--
>>>>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>>>Javier Szyszlican, Project Leader, JFFNMS
>>>>[EMAIL PROTECTED]
>>>>
>>>>I hope JFFNMS or I were helpful to you, if you
>>>>can, please donate at http://jffnms.org/donate
>>>>
>>>>
>>>>
>>>>-------------------------------------------------------
>>>>This SF.Net email sponsored by Black Hat Briefings & Training.
>>>>Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
>>>>digital self defense, top technical experts, no vendor pitches,
>>>>unmatched networking opportunities. Visit www.blackhat.com
>>>>_______________________________________________
>>>>jffnms-users mailing list [EMAIL PROTECTED]
>>>>https://lists.sourceforge.net/lists/listinfo/jffnms-users
>>>
>>>
>>--
>>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>Javier Szyszlican, Project Leader, JFFNMS
>>[EMAIL PROTECTED]
>>
>>I hope JFFNMS or I were helpful to you, if you
>>can, please donate at http://jffnms.org/donate
>>
>>
>>
>>-------------------------------------------------------
>>This SF.Net email sponsored by Black Hat Briefings & Training. Attend
>>Black Hat Briefings & Training, Las Vegas July 24-29 - digital self
>>defense, top technical experts, no vendor pitches, unmatched
>>networking opportunities. Visit www.blackhat.com
>>_______________________________________________
>>jffnms-users mailing list
>>[EMAIL PROTECTED]
>>https://lists.sourceforge.net/lists/listinfo/jffnms-users
>
>
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Javier Szyszlican, Project Leader, JFFNMS
[EMAIL PROTECTED]
I hope JFFNMS or I were helpful to you, if you
can, please donate at http://jffnms.org/donate
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black
Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
jffnms-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jffnms-users
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
jffnms-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jffnms-users