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


Indicate if the PATROL SNMP Sub-Agent is active or not active.




This function does not accept any parameters.


The snmp_agent_config() function returns one of the following messages indicating if the PATROL SNMP Sub-Agent is active or inactive.

SNMP support is not active.


SNMP support is active.


The following example uses the snmp_agent_config() function to create a user-defined function, verify_snmp_agent(), to check for SNMP support. 

The main() section of the example starts SNMP, checks for SNMP support, stops SNMP, and then checks again for SNMP support using the user-defined verify_snmp_agent() function:

function verify_snmp_agent() {
print("Checking for SNMP support... ");
#Check the result of snmp_agent_config()function for the text "not" starting
#in the 17th character of the output string using the substr() function.
if (substr(snmp_agent_config(),17,3)=="not") {
print("SNMP NOT ACTIVE\n");
} else {
print("SNMP ACTIVE\n");
function main() {
print("Starting SNMP\n");
snmp_agent_start(); #Starting SNMP
verify_snmp_agent(); #Checking for SNMP support
print("Stopping SNMP\n");
snmp_agent_stop(); #Stopping SNMP
verify_snmp_agent(); #Checking for SNMP support

This example produces the following output:

Starting SNMP
Checking for SNMP support... SNMP ACTIVE
Stopping SNMP
Checking for SNMP support... SNMP NOT ACTIVE

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