nielchiano Veteran

Joined: 11 Nov 2003 Posts: 1287 Location: 50N 3E
|
Posted: Sun Feb 13, 2005 2:39 pm Post subject: extending net-snmp |
|
|
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? |
|