New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Install NET-SNMP - B3?

Got problems with your B2 or B3? Share and get helped!
texan
Posts: 11
Joined: 18 Apr 2012, 09:35

Install NET-SNMP - B3?

Post by texan »

Hi,

How do I install NET-SNMP, to be able to read ifInOctets and ifOutOctets?
texan
Posts: 11
Joined: 18 Apr 2012, 09:35

Re: Install NET-SNMP - B3?

Post by texan »

:cry: No one that know how to install it :cry:
Last edited by texan on 03 May 2012, 16:51, edited 1 time in total.
RandomUsername
Posts: 904
Joined: 09 Oct 2009, 18:49

Re: Install NET-SNMP - B3?

Post by RandomUsername »

From what I understand from this page - http://packages.debian.org/source/lenny/net-snmp, you just need to do this (as root):

Code: Select all

aptitude install libsnmp-base libsnmp15 snmp snmpd
texan
Posts: 11
Joined: 18 Apr 2012, 09:35

Re: Install NET-SNMP - B3?

Post by texan »

All package was already installed - still nothing from ifInOctets and ifOutOctets.


root@B3:~# aptitude install libsnmp-base libsnmp15 snmp snmpd
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
RandomUsername
Posts: 904
Joined: 09 Oct 2009, 18:49

Re: Install NET-SNMP - B3?

Post by RandomUsername »

My knowledge of snmp is quite limited so I think you're going to have to explain in more detail what you're trying to do.
texan
Posts: 11
Joined: 18 Apr 2012, 09:35

Re: Install NET-SNMP - B3?

Post by texan »

I'm trying to retrieve some integers running snmpwalk;

[root@computer ~]# snmpwalk -v 2c -c public 127.0.0.1 | grep -E
'if(In|Out)Octets'
IF-MIB::ifInOctets.1 = Counter32: 3925379800
IF-MIB::ifInOctets.2 = Counter32: 3862050976
IF-MIB::ifOutOctets.1 = Counter32: 3925379800
IF-MIB::ifOutOctets.2 = Counter32: 808228674
[root@computer ~]#

With these I can make a network usage graph with RRD.
The problem is that I don't see these values walking the SNMP.
nobody
Posts: 226
Joined: 10 Mar 2012, 14:46

Re: Install NET-SNMP - B3?

Post by nobody »

i know it's not the solution you asked for, but if all you want is a network usage graph you may want to cansider installing munin on the B2/B3.
texan
Posts: 11
Joined: 18 Apr 2012, 09:35

Re: Install NET-SNMP - B3?

Post by texan »

Munin can't draw any graphs if I can't install IF-MIB/NET-SNMP.
jallee
Posts: 49
Joined: 12 Jun 2009, 13:15

Re: Install NET-SNMP - B3?

Post by jallee »

texan wrote:Munin can't draw any graphs if I can't install IF-MIB/NET-SNMP.
If you do an.

Code: Select all

apt-get install munin
I believe it is something .. snmp .. there, else search whit.

Code: Select all

apt-cache search snmp
texan
Posts: 11
Joined: 18 Apr 2012, 09:35

Re: Install NET-SNMP - B3?

Post by texan »

Actually I don't want Munin at all. Read the thread again.

I know how to search the repository. I still can't find the right
package though.
jallee
Posts: 49
Joined: 12 Jun 2009, 13:15

Re: Install NET-SNMP - B3?

Post by jallee »

texan wrote:Actually I don't want Munin at all. Read the thread again.

I know how to search the repository. I still can't find the right
package though.
Ok, to my humble knowledge net-snmp is snmpd.

Code: Select all

apt-get install snmpd
texan
Posts: 11
Joined: 18 Apr 2012, 09:35

Re: Install NET-SNMP - B3?

Post by texan »

jallee wrote:
texan wrote:Actually I don't want Munin at all. Read the thread again.

I know how to search the repository. I still can't find the right
package though.
Ok, to my humble knowledge net-snmp is snmpd.

Code: Select all

apt-get install snmpd

Already installed.

root@B3:~# apt-get install snmpd
Reading package lists... Done
Building dependency tree
Reading state information... Done
snmpd is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
nobody
Posts: 226
Joined: 10 Mar 2012, 14:46

Re: Install NET-SNMP - B3?

Post by nobody »

texan wrote:Munin can't draw any graphs if I can't install IF-MIB/NET-SNMP.
Sure it can. I do it every day. And as all you seem to need is network usage then munin will be a solution. Of course if you prefer whining about not being able to use your preferred solution insteD of being practical and just getting the job done, i cant be of any more help. Even after being commanded to read the thread again
Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: Install NET-SNMP - B3?

Post by Cheeseboy »

Hi texan,

You need to install the MIBS as well, in the snmp-mibs-downloader package:

Code: Select all

niklas@b3:~$ sudo apt-get install snmpd snmp snmp-mibs-downloader
(I think that if you already have a /etc/snmp/snmp.conf file, you have to get rid of the line 'mibs :' or it will not work. I think I just deleted the file...)

Edit /etc/snmp/snmpd.conf and uncomment this line:

Code: Select all

rocommunity public  localhost
Restart snmpd:

Code: Select all

niklas@b3:~$ sudo /etc/init.d/snmpd restart
Set the MIBS variable to IF-MIB that you are interested in, or you will have to wait all day:

Code: Select all

niklas@b3:~$ export MIBS=IF-MIB
niklas@b3:~$ snmpwalk -v 2c -c public 127.0.0.1 | grep -E 'if(In|Out)Octets'
IF-MIB::ifInOctets.1 = Counter32: 6813559
IF-MIB::ifInOctets.2 = Counter32: 2367243795
IF-MIB::ifInOctets.3 = Counter32: 2517069826
IF-MIB::ifInOctets.4 = Counter32: 2436125601
IF-MIB::ifInOctets.5 = Counter32: 4069041910
IF-MIB::ifInOctets.7 = Counter32: 0
IF-MIB::ifInOctets.14 = Counter32: 245148007
IF-MIB::ifOutOctets.1 = Counter32: 6830111
IF-MIB::ifOutOctets.2 = Counter32: 96100640
IF-MIB::ifOutOctets.3 = Counter32: 4200563557
IF-MIB::ifOutOctets.4 = Counter32: 2258954014
IF-MIB::ifOutOctets.5 = Counter32: 220062692
IF-MIB::ifOutOctets.7 = Counter32: 0
IF-MIB::ifOutOctets.14 = Counter32: 0
Cheers,

Cheeseboy
texan
Posts: 11
Joined: 18 Apr 2012, 09:35

Re: Install NET-SNMP - B3?

Post by texan »

Cheeseboy wrote:Hi texan,

You need to install the MIBS as well, in the snmp-mibs-downloader package:

Code: Select all

niklas@b3:~$ sudo apt-get install snmpd snmp snmp-mibs-downloader
(I think that if you already have a /etc/snmp/snmp.conf file, you have to get rid of the line 'mibs :' or it will not work. I think I just deleted the file...)

Edit /etc/snmp/snmpd.conf and uncomment this line:

Code: Select all

rocommunity public  localhost
Restart snmpd:

Code: Select all

niklas@b3:~$ sudo /etc/init.d/snmpd restart
Set the MIBS variable to IF-MIB that you are interested in, or you will have to wait all day:

Code: Select all

niklas@b3:~$ export MIBS=IF-MIB
niklas@b3:~$ snmpwalk -v 2c -c public 127.0.0.1 | grep -E 'if(In|Out)Octets'
IF-MIB::ifInOctets.1 = Counter32: 6813559
IF-MIB::ifInOctets.2 = Counter32: 2367243795
IF-MIB::ifInOctets.3 = Counter32: 2517069826
IF-MIB::ifInOctets.4 = Counter32: 2436125601
IF-MIB::ifInOctets.5 = Counter32: 4069041910
IF-MIB::ifInOctets.7 = Counter32: 0
IF-MIB::ifInOctets.14 = Counter32: 245148007
IF-MIB::ifOutOctets.1 = Counter32: 6830111
IF-MIB::ifOutOctets.2 = Counter32: 96100640
IF-MIB::ifOutOctets.3 = Counter32: 4200563557
IF-MIB::ifOutOctets.4 = Counter32: 2258954014
IF-MIB::ifOutOctets.5 = Counter32: 220062692
IF-MIB::ifOutOctets.7 = Counter32: 0
IF-MIB::ifOutOctets.14 = Counter32: 0
Cheers,

Cheeseboy
Hi Cheeseboy

Thank you. It's working fine now.
I had missed the part where I should have had uncommented the rocommunity line.

Thanks again.
Post Reply