This is a discussion on agentx subagent serious problem within the SNMP Users forums, part of the Networking and Network Related category; hello, i'm trying to install a agentx subagent and master agent in the same machine, so that i did ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
hello,
i'm trying to install a agentx subagent and master agent in the same machine, so that i did the following steps: 1-configured and instaled my master agentx -./configure --with-mib-modules="agentx/master" -make -make install 2-secondo i installed my subagent: -./configure --with-mib-modules="agentx/subagent" -make -make install 3-then i copy my files test.c and test.h in agent/mibgroup 4-./configure --with-mib-modules="test" make make install 5- then i create my binairy subagent MYSUBAGENT in current directory after copying test.c and .h net-snmp-config --compile-subagent MYSUBAGENT test.c 6-run ./MYSUBAGENT & when i follow these steps it works perfectly. first in my test.c it returns a constante value : 'static int object1=1' the probleme is that i want to use a function that return a value wich i would output in my object.like this object1=func_test(); so i declared my global variable static int object; and in the file generated by mib2c i put object1=func_test(); in the init_test(void) function. now i follows steps described below,to compile my sub agent from the step 4 but it gives me error: failed to connect to agentx master:unknown host (no such file or directory). i test my function it returns a value. i'm really confused. i did snmpd -x 705; ./SUBAGENT -X -x tcp:127.0.0.1:705 and always the same error, please help |