# Server Pool Monitoring Agent commands

You can test and monitor the Server Pool Monitoring Agents on the command line.

Table 1. Server Pool Monitoring Agent commands
Command | Description
--- | ---
`agent` `[-v level]` `[-c path]` `[test [files]]` `[syntax [files]]` | (Windows only) Allows you to test different configurations before activating them. `-v` sets the verbosity level. The default level is 5. Levels 6–8 are for debugging where available. `-c` uses the specified path as the first search directory for the configuration. `test` runs in the test mode - status queries do not receive a response. If you specify the files, they are used for reading the configuration instead of the default files. `syntax` checks the syntax in the configuration file. If no files are specified, the default configuration files are checked.
`sgagentd [-d]` `[-v level]` `[-c path]` `[test [files]]` `[syntax [files]]` | (Linux only) Allows you to test different configurations before activating them. `-d` means Don't Fork as a daemon. All log messages are printed to stdout or stderr only. `-v` sets the verbosity level. The default level is 5. Levels 6–8 are for debugging where available. `-c` uses the specified path as the first search directory for the configuration. `test` runs in the test mode - status queries do not receive a response. If you specify the files, they are used for reading the configuration instead of the default files. The output is directed to syslog or eventlog instead of the console where the command was run unless you use the `-d` option. `syntax` checks the syntax in the configuration file. If no files are specified, the default configuration files are checked. The output is directed to syslog or eventlog instead of the console where the command was run unless you use the `-d` option.
`sgmon` `[status|info|proto]` `[-p port]` `[-t timeout]` `[-a id]` `host` | Sends a UDP query to the specified host and waits for a response until received, or until the timeout limit is reached. The request type can be defined as a parameter. If no parameter is given, status is requested. The commands are: `status` queries the status. `info` queries the agent version. `proto` queries the highest supported protocol version. `-p` connects to the specified port instead of the default port. `-t` sets the timeout (in seconds) to wait for a response. `-a` acknowledge the received log messages up to the specified id. Each response message has an id, and you can acknowledge more than one message at a given time by using the id parameter. Messages acknowledged by sgmon will no longer appear in the firewall logs. `host` is the IP address of the host to connect to. To get the status locally, you can give localhost as the host argument. This parameter is mandatory.