Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to get my Linksys BEFSR41 router to start reporting SNMP stuff, so I can track my whole network's bandwidth usage. I followed the directions here:
(I'm not allowed to post URLs yet... search Google for "linksys mrtg matthew" and it should be the first link.)
which were pretty good, and I now have timestamps updating in mrtg. The problem is that the values for in/out are always zero -- mrtg thinks that there's no bandwidth being used at all! From what I can see, the format that collector.pl is expecting is not what is being received. This is the relevant snippet from collector.pl:
It looks like it's expecting "@in", and then some more data. However, when I log all the SNMP traffic to a file, and then look for anything mentioning "@in", this is the kind of information I'm getting:
Code:
router
192.168.1.1
SNMPv2-MIB::sysUpTime.0 6:23:23:28.81
SNMPv2-MIB::snmpTrapOID.0 SNMPv2-SMI::enterprises.3093.2.2.1.0.1
SNMPv2-SMI::enterprises.3093.1.1.0 "40 69 6E 20 32 34 2E 31 35 37 2E 31 34 37 2E 31 [@in 24.157.147.1]
34 37 20 33 36 37 33 38 20 32 2E 30 2E 30 2E 30 [47 36738 2.0.0.0]
20 32 32 0A [ 22.]"
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 192.168.1.1
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 "public"
SNMPv2-MIB::snmpTrapEnterprise.0 SNMPv2-SMI::enterprises.3093.2.2.1
---------------------------------
Parsed output: 0::0::6:23:23:28.81::router
As you can see, the @in is followed only by the IP and doesn't involve any quotations marks. So the regex doesn't match, collector.pl doesn't see any bandwidth being used, and mrtg reports only a bunch of zeros.
I don't know enough about SNMP to guess why the format is different, or which (the Linksys' options or the collector.pl) script needs to be changed, or even what data collector.pl is gathering to come up with bandwidth usage. (It seems unlikely that the Linksys is counting individual packets.) I've also tried linksysmon, but wasn't able to get it to output data so that mrtg can process it.
If anyone has any suggestions, I'd love to hear them!
I have a Linksys BEFW11S4 and the collector.pl didn't seem to be working for me either. So I wrote the awk script below. It started out as a way to try and figure out what the heck was going on (i.e. what linksys was sending me)...but then I turned around and replaced collector.pl with this script altogether (i.e. in /etc/snmp/snmptrapd.conf).
So now I have what I think is a valid /tmp/router.out file but mrtg graphs are still zero. Anyone else have any ideas?
Originally posted by Kyanos (It seems unlikely that the Linksys is counting individual packets.) I've also tried linksysmon, but wasn't able to get it to output data so that mrtg can process it.
If anyone has any suggestions, I'd love to hear them!
Does your BEFSR Password page have entries for snmp communities? If so, use them and monitor directly instead of using trap collector. The Linksys routers do appear to send packet counts, not byte counts, so the traps are useless for monitoring bandwidth.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.