Important

   

This documentation space contains information about PATROL Agents when deployed in a TrueSight Operations Management environment. If you are a BMC Helix Operations Management user, see PATROL Agent 22.1 for BMC Helix Operations Management. Open link

snmp_close()

Close a PATROL Agent SNMP session.

Syntax

snmp_close(session)

Parameter

Parameter

Definition

session

ID of the SNMP session that is to be closed The session is the value returned when an snmp_open() function is executed.

Description

The snmp_close() function closes session with the PATROL SNMP Sub-Agent that was opened with the snmp_open() function and removes internal structures belonging to session. The snmp_close() function sets the PSL variable errno = 93 (E_PSL_NO_SUCH_ID) if session is not a valid SNMP session ID. T he snmp_close() function returns the string "OK" if successful, or the NULL string otherwise.

Example

The following example opens an SNMP session makes a query to determine what SNMP agent is listening on port 8161 and closes the SNMP session:

session=snmp_open(“runner”,””,””,””,””,”8161”);
print(snmp_get(session,”.1.3.6.1.2.1.1.1.0”));
snmp_close(session);


Was this page helpful? Yes No Submitting... Thank you

Comments