Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
extending net-snmp
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
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Sun Feb 13, 2005 2:39 pm    Post subject: extending net-snmp Reply with quote

Hi,

I'm trying to extend my net-snmp agent. According to the man-page, you can do so by using "exec" lines in the snmpd.conf file.
I tried it, and it works.
The man-page also states that you can only get the first line of output; but I always get more lines (so I don't complain!)
manpage wrote:

exec NAME PROG ARGS

exec MIBNUM NAME PROG ARGS

If MIBNUM is not specified, the agent executes the named PROG with arguments of ARGS and returns the exit status and the first
line of the STDOUT output of the PROG program to queries of the 1.3.6.1.4.1.2021.8.1.100 and 1.3.6.1.4.1.2021.8.1.101 mib col-
umns (respectively). All STDOUT output beyond the first line is silently truncated.

If MIBNUM is specified, it acts as above but returns the exit status to MIBNUM.100.0 and the entire STDOUT output to the table
MIBNUM.101 in a MIB table. In this case, the MIBNUM.101 mib contains the entire STDOUT output, one MIB table entry per line
of output (ie, the first line is output as MIBNUM.101.1, the second at MIBNUM.101.2, etc...).


The real problem is: I need to get a long output, but it get's truncated at character 913.
I also tried the other form (with MIB number and table output), but I get exactly the same problem: the lines are splitted accros multiple, but the end is truncated.

So I tought it was my program (iptables) that caused the truncate; but I also tries it with cat and got the same result.

Anyone with an idea how to do it?
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