Debug Console

The NetXMS server provides an interactive debug console for runtime diagnostics, configuration changes, and troubleshooting.

Accessing the Debug Console

Local Access with nxadm

Connect to a locally running server using the nxadm tool:

nxadm -i

This opens an interactive session. Type help to see available commands.

To execute a single command without entering interactive mode:

nxadm -u <login> -c "show stats"

Console access is authenticated by default (Server.Security.RestrictLocalConsoleAccess server configuration variable, enabled by default). Interactive mode prompts for credentials; for one-shot commands, pass the login with -u (the password is supplied with -p or prompted for with -P). nxadm -s <script> executes an NXSL script — the argument is resolved as a script library name first, or loaded from the given file and compiled.

Remote Access via Management Client

The debug console is accessible in the management client under Tools > Server debug console (requires the Access server console system right).

Command Reference

Task Scheduling

Command Description

at +<sec> <script>

Schedule one-time NXSL script execution after given delay in seconds; script arguments are passed in parentheses, e.g. MyScript(arg1, arg2)

For recurring schedules, use scheduled tasks in the management client — the console at command cannot accept a multi-field cron schedule.

Device Configuration Backup

Command Description

backup show <node>

Show latest device configuration backup for given node

backup start <node>

Start device configuration backup for given node

backup status <node>

Show device configuration backup status for given node

Server Control

Command Description

down

Shut down NetXMS server

ha status

Show high availability cluster status (available only when the server runs in cluster mode)

ha switchover

Perform graceful switchover to the standby cluster node (available only when the server runs in cluster mode)

hkrun

Run housekeeper immediately

ldapsync

Synchronize LDAP users with local user database

logrotate

Force server log file rotation

reload mib

Reload MIB tree from compiled MIB file

sync

Wake up syncer thread immediately (force pending data writes to database)

Configuration Variables

Command Description

get <variable>

Get value of server configuration variable

set <variable> <value>

Set value of server configuration variable; the value must be a single word without whitespace

Debug and Logging

Command Description

debug [<level>|off]

Show or set global debug level (0..9)

debug <tag> <level|off|default>

Set debug level for a specific debug tag, or reset to default (default or -1)

debug sql [on|off]

Turn SQL query trace on or off

dump

Write process memory dump (Windows only)

log <text>

Write custom text to the server log

logmark

Write a marker line ( MARK ) to the server log

raise <exception>

Raise exception (access or breakpoint); raise access crashes the server on any platform (dump file created on Windows only), raise breakpoint works on Windows only and reports "Not supported on current platform" elsewhere

snapshot <user-id>

Create object access snapshot for given user ID

Script Execution

Command Description

exec <script> [<params>]

Execute NXSL script from an allowed script location

Script resolution for exec is controlled by the DebugConsole.AllowedScriptLocations server configuration variable — an ordered, comma-separated list of locations searched left to right. The default @library resolves scripts from the script library; absolute directory paths can also be listed. An empty value disables the command. Script names must not contain path separators.

Database

Command Description

clear

Show list of valid component names that can be cleared

clear <component>

Clear internal data or queue (DBWriter Counters, DBWriter DataQueue, NCQueue <channel>)

dbcp reset

Reset database connection pool

Session Management

Command Description

exit

Exit from remote session

kill <session>

Kill client session by session ID

notify <session> <code> [<data>]

Send notification message to a client session

Network Diagnostics

Command Description

ping <address>

Send ICMP echo request to given IP address

tcpping <address> <port>

TCP ping to a specific address and port

trace <node1> <node2>

Show network path trace between two nodes

Polling and Discovery

Command Description

poll <type> <node>

Initiate node poll (types: status, configuration, discovery, instance, map, routing-table, topology)

scan <start> <end> [proxy <id>|zone <uin>] [discovery]

Manual network discovery scan over an IP range; optionally specify proxy node or zone; add discovery to run full discovery processing

Tunnel Management

Command Description

tunnel bind <tunnel> <node>

Bind an agent tunnel to a node

tunnel unbind <node>

Unbind an agent tunnel from a node

Thread Pool

Command Description

tp loadtest <pool> <tasks>

Start test tasks in given thread pool for load testing

Show Commands

Command Description

show ai operators

Show AI operator instances

show ai providers

Show configured AI providers

show ai slots

Show AI provider slots

show arp <node>

Show ARP cache for given node

show authtokens

Show active user authentication tokens

show components <node>

Show physical components of given node

show dbcp

Show active sessions in database connection pool

show dbstats

Show database library statistics

show discovery ranges

Show state of active network discovery by address range

show ep

Show event processing threads statistics

show epp

Show event processing policy rules

show fdb <node>

Show forwarding database for given node

show flags

Show internal server flags

show heap details

Show detailed heap memory information

show heap summary

Show heap usage summary

show index <index> [zone <uin>]

Show internal index (valid names: CONDITION, GUID, ID, INTERFACE, NETMAP, NODEADDR, NODEID, SENSOR, SUBNET, ZONE; INTERFACE, NODEADDR, and SUBNET accept a zone <uin> modifier)

show lldp <node>

Show LLDP topology information for given node

show memusage

Show memory usage information

show mgmtnode

Show management server node information

show modules

Show loaded server modules

show ndd

Show registered network device drivers

show objects [<filter>]

Dump network objects to screen, optionally filtered by name, ID, or GUID

show ospf <node>

Show OSPF topology information for given node

show pollers [summary]

Show poller threads state information; add summary for aggregated view

show queues

Show internal queues statistics

show routing-table <node>

Show cached routing table for given node

show sessions

Show active client and mobile device sessions

show sizeof

Show sizes of internal data structures

show stats

Show global server statistics

show syncer

Show data syncer statistics

show tasks

Show background tasks

show threads [<pool>]

Show thread statistics; optionally for a specific thread pool

show topology <node>

Collect and show link layer topology for given node

show tunnels

Show active agent tunnels

show users

Show registered users and groups

show version

Show NetXMS server version

show vlans <node>

Show cached VLAN information for given node

show watchdog

Display watchdog information

Help

Command Description

help (or ?)

Display available commands

Almost all commands can be abbreviated to 2 or 3 characters (e.g., sh st for show stats). In interactive nxadm sessions, command history is available: !! repeats the last command, !<N> repeats command number N.

Examples

Force a configuration poll on node with ID 150
poll configuration 150
Get and set server configuration variables
get Syslog.AllowUnknownSources
set Syslog.AllowUnknownSources 1
Enable debug logging for a specific tag
debug poll.status 7
Disable tag-specific debug and reset to default
debug poll.status default
Run a network discovery scan with zone and full discovery processing
scan 10.0.0.1 10.0.0.254 zone 5 discovery
Schedule a script to run once after 60 seconds
at +60 MyCleanupScript
Show server performance overview
show stats
show queues
show threads
Check active agent tunnels
show tunnels
Reload MIB files after adding new MIBs
reload mib

For more details on debug logging and tags, see Diagnostics. For common problems and solutions, see Common Issues.