This chapter explains how TrueSight OM - Hardware provides diagnostic commands and helps gather debug information from TrueSight through the built-in Agent Query Tool.
The Agent Query Tool allows you to run commands as if you were connected to a PATROL Console. TrueSight OM - Hardware provides access to some PSL functions to run PSL scripts and help you diagnose potential problems.
All text arguments should be delimited by quotes (ex: "text argument"). If a backslash character (\) is used, it must be doubled (ex: \\).
To perform an Agent Query
1. | In the navigation pane of the TrueSight OM console, click Configuration and select Managed Devices. |
2. | Click a PATROL Agent menu and select Query PATROL Agent. The Agent Query Tool opens in a new browser window. |

Access the Agent Query Tool
3. | In the Command box, specify the query and click Execute. |
Global Reports Queries
Global reports provides information about the PATROL Agent and the hosts associated to the PATROL Agent.
Local Report
requires MS_HW_q; localReport();
|
This command gathers information about the PATROL Agent Environment (loaded KMs, connected consoles, running processes, environment variables, PATROL configuration).
Hosts Summary
requires MS_HW_q; hostsInfo();
|
This command returns a table containing the following host information:
This summary can be used to identify the host ID to use for running host commands.
Hosts Report
requires MS_HW_q; hostsReport();
|
This command returns a table containing the following information for each existing host:
Full Report
requires MS_HW_q; fullReport();
|
This command gathers consolidated environment information that contains the following reports:
• | Hosts report (network, object count, connectors report) |
Depending on the number of monitored hosts, this command may take time to execute.
Host Reports Queries
Hosts reports queries provides information related to the specified host.
The host argument corresponds to the PATROL ID of the host as provided in the interface.
Network Report
requires MS_HW_q; networkReport("<host ID>");
|
This command returns the following information for the specified host:
Objects Report
requires MS_HW_q; objectsReport("<host ID>");
|
This command returns a list of the component types discovered on the PATROL Agent for the specified host and indicates the total number of discovered component types.
Connectors Report
requires MS_HW_q; connectorsReport("<host ID>");
|
This command returns the content of the TestReport parameter for each discovered connector instance of the specified host.
SNMP Report
requires MS_HW_q; snmpReport("<host ID>");
|
This command gathers SNMP information such as the list of SNMP sub-agents and performs an SNMP dump if the SNMP protocol is available and configured for the specified host.
Other Queries
The following queries rely on the host settings (username, password, etc.) and a discovery must be completed for these settings to be properly registered and accessible.
The queries return their status (success or failure) and the associated result or error message.
Command-line
requires MS_HW_q; command(host ID,command,timeout,executeLocally
username,password,keyFile);
|
This command can use the following arguments:
• | host: If a Host ID is provided, simply provide the command to execute and other argument values will automatically be retrieved from the configuration. If a hostname or IP address is provided, add the arguments you want to retrieve to the query. |
• | command: command to execute. |
• | timeout: command timeout in seconds. Default: 30 |
• | executeLocally: indicate whether the command should be executed on the PATROL Agent (1) or the remote host (0). Default: 1 |
• | username: username to use for executing the query |
• | password: password in plain text |
• | keyFile: path to the private key file on the localhost |
SNMP Get
requires MS_HW_q; snmpGet(hostID/IP,oid,snmpVersion,port,timeout,community,retryIntervals,
authenticationprotocol,username,authenticationpassword,privacyprotocol,privacyPassword,context);
|
This command requires the following arguments:
• | host: either the hostID (PATROL ID of the host that will be used to execute the SNMP query) or a hostname/IP. If a hostID is provided, then the function only needs the OID to query. All settings are read from the PATROL Agent configuration. If a hostname/IP is provided, the optional relevant arguments need to be provided. |
Optional arguments:
• | snmpVersion is either 1, 2 (or 2c) or 3: |
▪ | snmp Version 1: port (default: 161), timeout (default: 60 - read from PATROL configuration), community,oid, or |
▪ | snmp Version 2: port (default: 161), timeout (default: 60 - read from PATROL configuration), community, retryIntervals (default read from PATROL configuration) oid, or |
▪ | snmp Version 3: port, timeout, snmpRetryIntervals, oid, authenticationProtocol, username, authenticationPassword, privacyProtocol, privacyPassword, context |
• | timeout : SNMP query timeout in seconds |
• | passwords: password in plain text |
SNMP Walk
requires MS_HW_q; snmpWalk(hostID/IP, oid, snmpVersion, port, timeout, community, retryIntervals, authenticationprotocol, username, authenticationpassword, privacyprotocol, privacyPassword, context);
|
• | hostID/IP: The host is either the hostID (PATROL ID of the host that will be used to execute the SNMP walk ) or a hostname/IP. If a hostID is provided, then the function only needs the OID to query. All settings are read from the PATROL agent configuration. If a hostname/IP is provided, the relevant optional arguments need to be provided. |
Optional arguments:
▪ | snmp Version 1: community, port (default: 161), timeout (default: 60 - read from PATROL configuration), oid |
▪ | snmp Version 2 (or 2c): community, port (default: 161), timeout (default: 60 - read from PATROL configuration, retryIntervals (default read from PATROL configuration)oid, or |
▪ | snmp Version 3: port, timeout, snmpRetryIntervals, oid, authenticationProtocol, username, authenticationPassword, privacyProtocol, privacyPassword, context |
▪ | timeout: SNMP query timeout in seconds |
▪ | password: password in plain text |
WBEM
requires MS_HW_q; wbem(host, query, namespace, port, timeout, protocol, username, password);
|
This command requires the following arguments:
• | host: either the hostID (PATROL ID of the host that will be used to execute the WBEM query) or a hostname/IP. If a hostID is provided, then the function only needs the query. All settings are read from the PATROL agent configuration. If a hostname/IP is provided, the optional arguments need to be provided. |
Optional arguments:
▪ | namespace: query namespace (Default: "root/cimv2") |
▪ | port: WBEM port (Default: 5989) |
▪ | username: the username to use for executing the query |
▪ | password: plain text password |
WMI
requires MS_HW_q; wmi(host, query, namespace, username, password);
|
This command requires the following arguments:
• | host: either the hostID (PATROL ID of the host that will be used to execute the WMI query) or a hostname/IP. If a hostID is provided, then the function only needs the query. All settings will be read from the PATROL agent configuration. If a hostname/IP is provided, the optional arguments need to be provided: |
Optional arguments:
▪ | namespace: query namespace (default: "root/cimv2") |
▪ | username: the username to use for executing the query |
▪ | password: plain text password |
Help Commands
List of commands
requires MS_HW_q; help();
|
This command returns a list of all available commands along with a short description and a syntax example.

See Also
Hardware Connector Library 6
|