Next: , Previous: , Up: Top   [Contents][Index]


8 Local testing

To test the package without installing it, you will need three virtual consoles, each of them with the current working directory in the hostproc source tree. The console ‘A’ will run the snmpd daemon, the console ‘B’ – the hostproc agent, and the console ‘C’ will be used to query the daemon using snmpwalk or snmpget.

Consoles ‘A’ and ‘B’ must run with root privileges.

It is assumed that the server where hostproc is installed already runs the snmpd daemon. To avoid interfering with it, select a port on which the test instance of snmpd will listen. For the purpose of the following instructions, the port 1161 is selected.

  1. In console ‘A’, run
      snmpd -c test/snmpd.conf -Le -f udp:localhost:1161
    
  2. In console ‘B’, run
      ./hostproc -f
    
  3. In console ‘C’, run
      snmpwalk -v 1 -c public -M +$(pwd) -Oq localhost:1161 HOSTPROC-MIB::hostprocMIB
    

    You will see the detailed process listing printed on stdout in form of the ‘HOSTPROC-MIB’ tree. See HOSTPROC-MIB, for the meaning of each OID.