Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SNMP and MRTG Issues [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
hurgh
Tux's lil' helper
Tux's lil' helper


Joined: 29 Oct 2002
Posts: 86
Location: Australia

PostPosted: Mon Oct 10, 2005 3:39 pm    Post subject: SNMP and MRTG Issues [SOLVED] Reply with quote

Hi All

I have searched the forums but have not come up with an answer to my problem.
I have installed SNMP and MRTG following these instructions. I only want the traffic stats so i only followed that part of it but it all seemed to work fine.

The problem I am having is that when I run the cfgmaker, it does the snmp query and writes a config file no problems, but in the config file, the only interface I have in the pc is commented out with the following reason:

Code:
### Interface 2 >> Descr: 'eth0' | Name: '' | Ip: '203.89.230.138' | Eth: '00-80-ad-04-bd-7b' ###
### The following interface is commented out because:
### * it is operationally DOWN


I then decided to do a
Code:
snmpwalk -v 1 -c public localhost if

and this is what i get returned:
Code:

# snmpwalk -v 1 -c public localhost if
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifType.1 = INTEGER: softwareLoopback(24)
IF-MIB::ifType.2 = INTEGER: ethernetCsmacd(6)
IF-MIB::ifMtu.1 = INTEGER: 16436
IF-MIB::ifMtu.2 = INTEGER: 1500
IF-MIB::ifSpeed.1 = Gauge32: 10000000
IF-MIB::ifSpeed.2 = Gauge32: 100000000
IF-MIB::ifPhysAddress.1 = STRING:
IF-MIB::ifPhysAddress.2 = STRING: 0:80:ad:4:bd:7b
IF-MIB::ifAdminStatus.1 = INTEGER: up(1)
IF-MIB::ifAdminStatus.2 = INTEGER: up(1)
IF-MIB::ifOperStatus.1 = INTEGER: up(1)
IF-MIB::ifOperStatus.2 = INTEGER: down(2)
IF-MIB::ifInOctets.1 = Counter32: 2277732
IF-MIB::ifInOctets.2 = Counter32: 1296330268
IF-MIB::ifInUcastPkts.1 = Counter32: 29000
IF-MIB::ifInUcastPkts.2 = Counter32: 4934632
IF-MIB::ifInDiscards.1 = Counter32: 0
IF-MIB::ifInDiscards.2 = Counter32: 0
IF-MIB::ifInErrors.1 = Counter32: 0
IF-MIB::ifInErrors.2 = Counter32: 1532414
IF-MIB::ifOutOctets.1 = Counter32: 2278918
IF-MIB::ifOutOctets.2 = Counter32: 3280727401
IF-MIB::ifOutUcastPkts.1 = Counter32: 29016
IF-MIB::ifOutUcastPkts.2 = Counter32: 6730405
IF-MIB::ifOutDiscards.1 = Counter32: 0
IF-MIB::ifOutDiscards.2 = Counter32: 0
IF-MIB::ifOutErrors.1 = Counter32: 0
IF-MIB::ifOutErrors.2 = Counter32: 4
IF-MIB::ifOutQLen.1 = Gauge32: 0
IF-MIB::ifOutQLen.2 = Gauge32: 0
IF-MIB::ifSpecific.1 = OID: SNMPv2-SMI::zeroDotZero
IF-MIB::ifSpecific.2 = OID: SNMPv2-SMI::zeroDotZero


As you can see
Code:
ifOperStatus.2 = INTEGER: down(2)

it says that my interface is down, yet if i run ifconfig
Code:
# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:80:AD:04:BD:7B
          inet addr:203.89.230.138  Bcast:203.89.230.143  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:4934718 errors:1532445 dropped:0 overruns:2 frame:1
          TX packets:6730506 errors:4 dropped:0 overruns:4 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1296340435 (1236.2 Mb)  TX bytes:3280745809 (3128.7 Mb)
          Interrupt:5 Base address:0xec00

you can see that the interface is actually up and running.

Does anyone know how to fix this problem? or at least force snmp to report the interface as UP so that the MRTG graphs actually work.

Any help with would be great.

-Hurgh-
_________________
Website: http://www.hurgh.org/


Last edited by hurgh on Thu Nov 03, 2005 5:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
Janne Pikkarainen
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1143
Location: Helsinki, Finland

PostPosted: Mon Oct 10, 2005 7:02 pm    Post subject: Reply with quote

Maybe it's because your IF-MIB::ifPhysAddress.2 shows MAC address in a little bit invalid form? Notice that the first 0 is not there, your MAC should be 00:80... and not 0:80...

IF-MIB::ifPhysAddress.2 = STRING: 0:80:ad:4:bd:7b
_________________
Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.".
Back to top
View user's profile Send private message
hurgh
Tux's lil' helper
Tux's lil' helper


Joined: 29 Oct 2002
Posts: 86
Location: Australia

PostPosted: Mon Oct 10, 2005 7:04 pm    Post subject: Reply with quote

Thanks for the reply, I had noticed that, but didnt think much of it, even if that was the problem, how am i ment to change it to fix up the mac address?

-Hurgh-
_________________
Website: http://www.hurgh.org/
Back to top
View user's profile Send private message
Janne Pikkarainen
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1143
Location: Helsinki, Finland

PostPosted: Mon Oct 10, 2005 7:09 pm    Post subject: Reply with quote

Have you tried to re-emerge net-snmp? snmp has been working for me for years without major problems, but sometimes small hassles go away after installing it again... for example, when I upgraded from kernel 2.4.x to 2.6.x, some statistics started to show odd readings and they went away after a reinstall.

I don't know any other way for tweaking that setting. What version of net-snmp you have installed? At least 4.1.2 works for me.
_________________
Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.".
Back to top
View user's profile Send private message
Janne Pikkarainen
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1143
Location: Helsinki, Finland

PostPosted: Mon Oct 10, 2005 7:10 pm    Post subject: Reply with quote

Whoops, I mean 5.2.1.2 works for me. I accidentally looked at dev-perl/Net-SNMP. :roll:
_________________
Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.".
Back to top
View user's profile Send private message
hurgh
Tux's lil' helper
Tux's lil' helper


Joined: 29 Oct 2002
Posts: 86
Location: Australia

PostPosted: Mon Oct 10, 2005 7:51 pm    Post subject: Reply with quote

Hey, thanks for the reply,

Yes I have tried re-installing it a few times, and still get the same outcome.

Any other suggestions out there??

-Hurgh-
_________________
Website: http://www.hurgh.org/
Back to top
View user's profile Send private message
hurgh
Tux's lil' helper
Tux's lil' helper


Joined: 29 Oct 2002
Posts: 86
Location: Australia

PostPosted: Tue Oct 25, 2005 3:29 am    Post subject: Reply with quote

no one else has had this problem??

I just tried re-installing again, clearing the portage cache and everything, hoping that it would work, updated world and still nothing :(

Any other suggestions anyone?

-Hurgh-
_________________
Website: http://www.hurgh.org/
Back to top
View user's profile Send private message
njcwotx
Guru
Guru


Joined: 25 Feb 2005
Posts: 587
Location: Texas

PostPosted: Mon Oct 31, 2005 6:08 pm    Post subject: Reply with quote

Quote:
RX packets:4934718 errors:1532445 dropped:0 overruns:2 frame:1


your ifconfig shows 1.5 million errors out of 5 million packets. What's up with the error count? If you can resolve that, your operational status may change to UP.
_________________
Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting.
Back to top
View user's profile Send private message
hurgh
Tux's lil' helper
Tux's lil' helper


Joined: 29 Oct 2002
Posts: 86
Location: Australia

PostPosted: Tue Nov 01, 2005 1:01 am    Post subject: Reply with quote

Thanks for pointing that out, I had never realy noticed that.
I recently re-started the server and it already has thousands of errors, so I am thinking that something might be wrong with the network card. I am going to try replacing that and seeing if that fixed any of the problems (errors and snmp)

Thanks again for your help.

-Hurgh-
_________________
Website: http://www.hurgh.org/
Back to top
View user's profile Send private message
Janne Pikkarainen
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1143
Location: Helsinki, Finland

PostPosted: Tue Nov 01, 2005 7:34 am    Post subject: Reply with quote

Before replacing your network card you might want to check its duplex settings. If it's currently running at half duplex, that would explain the errors.

Try mii-tool eth0 or even better, emerge ethtool and after that use ethtool eth0. If it shows "Duplex: Half", try ethtool -s eth0 speed 100 duplex full autoneg off (replace speed with the speed of your network) and see what happens.
_________________
Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.".
Back to top
View user's profile Send private message
hurgh
Tux's lil' helper
Tux's lil' helper


Joined: 29 Oct 2002
Posts: 86
Location: Australia

PostPosted: Wed Nov 02, 2005 12:36 am    Post subject: Reply with quote

Thanks for the tip Janne, but it says that my link is 100 Full Duplex, which is what it should be (the switch can handle that so...)

I will probably replace the network card tonight and see if that helps it at all, and if not, will look at something else.

Thanks again.

-Hurgh-
_________________
Website: http://www.hurgh.org/
Back to top
View user's profile Send private message
hurgh
Tux's lil' helper
Tux's lil' helper


Joined: 29 Oct 2002
Posts: 86
Location: Australia

PostPosted: Thu Nov 03, 2005 5:12 pm    Post subject: Reply with quote

Well thanks all for the help, I replaced the network card and it has been up for over 24 hours now and done a few gig of traffic and no errors, and also snmp now shows the interface as being up.

I changed the card to one with a different chipset, so I am not sure if it is the different chipset or the no errors that fixed snmp.

Thanks again for all the help
_________________
Website: http://www.hurgh.org/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum