View previous topic :: View next topic |
Author |
Message |
hurgh Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 29 Oct 2002 Posts: 86 Location: Australia
|
Posted: Mon Oct 10, 2005 3:39 pm Post subject: SNMP and MRTG Issues [SOLVED] |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Janne Pikkarainen Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/10433783463f526aba4144d.jpg)
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Mon Oct 10, 2005 7:02 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
hurgh Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 29 Oct 2002 Posts: 86 Location: Australia
|
Posted: Mon Oct 10, 2005 7:04 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Janne Pikkarainen Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/10433783463f526aba4144d.jpg)
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Mon Oct 10, 2005 7:09 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Janne Pikkarainen Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/10433783463f526aba4144d.jpg)
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Mon Oct 10, 2005 7:10 pm Post subject: |
|
|
Whoops, I mean 5.2.1.2 works for me. I accidentally looked at dev-perl/Net-SNMP. ![Rolling Eyes :roll:](images/smiles/icon_rolleyes.gif) _________________ 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 |
|
![](templates/gentoo/images/spacer.gif) |
hurgh Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 29 Oct 2002 Posts: 86 Location: Australia
|
Posted: Mon Oct 10, 2005 7:51 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
hurgh Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 29 Oct 2002 Posts: 86 Location: Australia
|
Posted: Tue Oct 25, 2005 3:29 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
njcwotx Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/2613710048d26fe72d3e4.png)
Joined: 25 Feb 2005 Posts: 587 Location: Texas
|
Posted: Mon Oct 31, 2005 6:08 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
hurgh Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 29 Oct 2002 Posts: 86 Location: Australia
|
Posted: Tue Nov 01, 2005 1:01 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Janne Pikkarainen Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/10433783463f526aba4144d.jpg)
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Tue Nov 01, 2005 7:34 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
hurgh Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 29 Oct 2002 Posts: 86 Location: Australia
|
Posted: Wed Nov 02, 2005 12:36 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
hurgh Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 29 Oct 2002 Posts: 86 Location: Australia
|
Posted: Thu Nov 03, 2005 5:12 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|