On Tue, 11 Apr 2006 16:01:11 +0300 Ofer wrote:
OG>      snmpCmd = "/usr/bin/snmptrap -v 2c -c public " + nmsIpAddress +
OG>                     " '' PROXY-MIB::proxyWrongUserPassTrap
OG> PROXY-MIB::proxyWrongUserPassTrap s " + snmpTrapDesc; 
OG>     Logger.logInformation(this, snmpCmd);
OG>     Runtime.getRuntime().exec(snmpCmd);
OG> 
OG> snmpTrapDesc, snmpCmd and nmsIpAddress  are all String-s.
OG> 
OG> I failed to get the sysUpTime in the trap on the trap receiver
OG> application. In C, the same works perfectly well (with the required
OG> modifications to code, of course). I get the trap, but w/o the
OG> sysUpTime. 
OG> My questions:
OG> 1. Why aren't those double single quote signs working?
OG> 2. Is there something I can use to replace them (I tried
OG> SNMP_MIB2::sysUpTime.0. Didn't work).

It could be that the single quotes are getting eaten by the exec command. You
could try escaping them. Alternatively, you could try putting in an actual
uptime value.

-- 
NOTE: messages sent directly to me, instead of the lists, will be deleted
      unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>

You are lost in a twisty maze of little standards, all different. 


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to