Command-Line Tools

NetXMS includes several command-line tools for server administration, agent management, SNMP operations, and data integration.

Most agent-related tools share a common set of connection options:

Option Description

-A

Connect to the agent over a TLS tunnel

-D <level>

Set debug level (0..9 or off, default: off)

-e <policy>

Set encryption policy: 0=disabled, 1=encrypt if required, 2=encrypt if supported, 3=force encrypted

-g <fingerprint>

Expected SHA-256 fingerprint of the agent certificate (implies -A)

-h

Display help and exit

-K <file>

Specify server’s key file (default: /var/lib/netxms/.server_key)

-O <port>

Proxy agent’s port number (default: 4700)

-p <port>

Agent’s port number (default: 4700)

-s <secret>

Shared secret for agent authentication

-S <secret>

Shared secret for proxy agent authentication

-v

Display version and exit

-w <seconds>

Set command timeout (default: 5 seconds)

-W <seconds>

Set connection timeout (default: 30 seconds)

-X <addr>

Use proxy agent at given address

The -A (tunnel connection) and -X (proxy agent) options are mutually exclusive.

Server Tools

nxdbmgr

The primary database management tool for NetXMS server. It reads database connection parameters from the server configuration file (/etc/netxmsd.conf on Linux).

Usage:

nxdbmgr [options] <command> [arguments]

Commands

Command Description

background-convert

Convert collected data to TimescaleDB format in background

background-upgrade

Run pending background upgrade procedures

batch <file>

Execute SQL batch file

check

Check database consistency

check-data-tables

Check database for missing data tables

convert

Convert standard PostgreSQL schema to TimescaleDB schema

export <file>

Export entire database to a portable file (.nxd format)

get <pattern>

Get value of server configuration variable(s) matching given pattern

import <file>

Import database from a previously exported file

init [<type_or_file>]

Initialize a new database. With no argument, the database type is auto-detected from the configured DB driver. Optionally accepts a short DB type name (db2, mssql, mysql, oracle, pgsql, sqlite, tsdb) or a full path to a custom SQL init file.

migrate <config>

Migrate data from a source database (defined by the given config file) into the destination database (defined by the main server config)

online-upgrade

Synonym for background-upgrade (kept for compatibility)

reset-monitoring

Reset all monitoring state (alarms, thresholds, object status, DCI states)

reset-system-account

Reset the built-in system administrator account (for password recovery)

set <name> <value>

Set a server configuration variable

set-user-password <login>

Set password for the given user

unlock

Unlock database instance after server crash or unclean shutdown

unlock-user <login>

Unlock the given user account

upgrade

Upgrade database schema to match the current server version

Options

Option Description

-c <file>

Use alternate server configuration file

-C <dba>

Create database and database user before initialization, using the given DBA credentials

-d

Check collected data (may take a very long time)

-D

Migrate only collected data

-e <table>

Exclude given table from export, import, or migration

-E

Fail consistency check if a fix is required

-f

Force repair — do not ask for confirmation

-F <syntax>

Fallback database syntax to use if it cannot be determined

-G

GUI mode (Windows only)

-h

Display help and exit

-I

Create new tables with TYPE=InnoDB (MySQL only)

-j <count>

Number of parallel workers for data migration (1..64, default: 4)

-L <log>

Migrate only given log

-m

Improved machine readability of output

-M

Create new tables with TYPE=MyISAM (MySQL only)

-N

Do not replace existing configuration value (set command only)

-o

Show output from SELECT statements in a batch

-p <passwd>

Set password for the admin user during database initialization

-P

Pause after error

-q

Quiet mode (suppress startup banner)

-s

Skip collected data during export, import, conversion, or migration

-S

Skip collected data and do not clear or create data tables during export, import, or migration

-t

Enable trace mode (show executed SQL queries)

-T <recs>

Transaction size for data migration

-v

Display version and exit

-x

Ignore errors when importing or migrating collected data

-X

Ignore SQL errors when upgrading (use with extreme caution)

-Y <table>

Migrate only given table

-Z <log>

Exclude given log from export, import, or migration

Exit Status

Code Meaning

0

Success

1

Invalid command line arguments

2

Configuration file malformed or cannot be loaded

3

Unable to load database driver, initialize the database library, or read the database password

4

Unable to connect to database

5

Unable to determine database syntax

6

Unable to load server modules

7

Unable to determine database type from the configured driver

8

Database initialization aborted

9

Unable to create database or database user

Displaying help (-h) or version (-v) also exits with code 1.

Always back up the database before running nxdbmgr check.
Examples
# Initialize a new PostgreSQL database
nxdbmgr init pgsql

# Upgrade database schema after server update
nxdbmgr upgrade

# Check database consistency (interactive, guides through repairs)
nxdbmgr check

# Export database
nxdbmgr export /backup/netxms-backup.nxd

# Import database from backup
nxdbmgr import /backup/netxms-backup.nxd

# Get/set server configuration variables
nxdbmgr get EnableZoning
nxdbmgr set EnableZoning 1

# Migrate from one database engine to another
nxdbmgr migrate /etc/netxmsd-source.conf

For more details see:

nxadm

Server administration and debug console tool. Connects to a locally running server process for interactive management, single command execution, or NXSL script execution.

Usage:

nxadm [-u <login>] [-P|-p <password>] -i
nxadm [-u <login>] [-P|-p <password>] -c <command>
nxadm [-u <login>] [-P|-p <password>] [-r] -s <script>
nxadm -P
nxadm -p <db_password>
nxadm -R

Options

Option Description

-c <command>

Execute a single command at the server debug console and disconnect

-h

Display help and exit

-i

Connect to the server debug console in interactive mode

-p <password>

Provide database password for server startup, or user password for console access

-P

Prompt for password (read from terminal): the database password for server startup, or the console user’s password when used with -i, -c, or -s

-r

Use the NXSL script’s return value as the nxadm exit code

-R

Check if the server is currently running

-s <script>

Execute given NXSL script on the server and disconnect

-u <name>

User name for authentication

-v

Display version and exit

Interactive Console Commands

When connected in interactive mode (-i), the following commands are available:

Command Description

at +<sec> <script> [<params>]

Schedule one-time NXSL script execution after given delay

at <schedule> <script> [<params>]

Schedule repeated NXSL script execution using cron format

backup show|start|status <node>

Show latest device configuration backup, start a new backup, or show backup status for a node

clear

Show list of valid component names that can be cleared

clear <component>

Clear internal data or queue for the specified component

dbcp reset

Reset database connection pool

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

debug sql [on|off]

Turn SQL query trace on or off

down

Shut down NetXMS server

dump

Write diagnostic dump of the server process

exec <script> [<params>]

Execute an NXSL script from the server script library

exit

Exit from the console session

get <variable>

Get value of a server configuration variable

ha status|switchover

Show HA cluster status or perform graceful switchover

help

Display available commands

hkrun

Run housekeeper immediately

kill <session>

Kill a client session by session ID

ldapsync

Synchronize LDAP users with local user database

log <text>

Write custom text to the server log

logmark

Write a marker line to the server log

logrotate

Force server log file rotation

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

Send notification message to a client session

ping <address>

Send ICMP echo request to an address

poll <type> <node>

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

raise <exception>

Raise an exception (for crash dump generation during debugging)

reload mib

Reload MIB tree from compiled file

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

Manual active discovery scan of an IP address range; without the discovery keyword the scan only reports results and does not create nodes

set <variable> <value>

Set a server configuration variable

show ai operators|providers|slots

Show AI operator instances, configured AI providers, or AI provider slots

show arp <node>

Show ARP cache for a node

show authtokens

Show active authentication tokens

show components <node>

Show physical components of a node

show dbcp

Show active sessions in the database connection pool

show dbstats

Show database 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 (FDB) for a node

show flags

Show internal server flags

show heap details|summary

Show detailed heap information or heap usage summary

show index <index>

Show contents of an internal index

show lldp <node>

Show LLDP information for a node

show memusage

Show server memory usage

show mgmtnode

Show ID and name of the management server node

show modules

Show loaded server modules

show ndd

Show registered network device drivers

show objects [<filter>]

Dump network objects, optionally filtered by name

show ospf <node>

Show OSPF data for a node

show pollers [summary]

Show poller thread state information, or a summary only

show queues

Show internal queue statistics

show routing-table <node>

Show cached routing table for a node

show sessions

Show active client sessions

show sizeof

Show sizes of internal data structures

show stats

Show server statistics

show syncer

Show data syncer status

show tasks

Show background tasks

show threads [<pool>]

Show active thread information, optionally for a specific thread pool

show topology <node>

Collect and show link layer topology for a node

show tunnels

Show active agent tunnels

show users

Show registered users and groups

show version

Show server version information

show vlans <node>

Show cached VLAN information for a node

show watchdog

Display watchdog information

snapshot <user-id>

Create object snapshot for the given user (diagnostic)

sync

Wake up database syncer thread immediately

tcpping <address> <port>

TCP ping to a specific address and port

tp loadtest <pool> <tasks>

Load test a thread pool

trace <node1> <node2>

Show network path trace between two nodes

tunnel bind <tunnel> <node>

Bind an agent tunnel to a node

tunnel unbind <node>

Unbind an agent tunnel from a node

Examples
# Interactive console session
nxadm -i

# Execute a single command
nxadm -c "show stats"

# Execute with authentication (prompts for password)
nxadm -u admin -P -i

# Run an NXSL script
nxadm -s MyMaintenanceScript

# Run NXSL script and use return value as exit code
nxadm -r -s CheckHealth

# Check if server is running
nxadm -R

For the full debug console command reference, see Debug Console.

nxevent

Send events to NetXMS server using the client protocol. Installed with the NetXMS client distribution.

Usage:

nxevent [<options>] <server> <event> [<param_1> [... <param_N>]]
nxevent [<options>] -n <server> <event> [name=parameter ...]

Options

Option Description

-c <codepage>

Character codepage (default: ISO8859-1; non-Windows builds only)

-C <count>

Repeat event sending the given number of times

-d

Turn on debug mode

-e

Encrypt session (always encrypted, kept for compatibility)

-h

Display help and exit

-i <interval>

Repeat event with given interval in milliseconds

-n

Parameters in named format (name=value)

-o <id>

Specify source object ID

-P <password>

User password (default: empty)

-S

Skip protocol version check (use with care)

-T <tag>

User tag to associate with event

-u <user>

Login user name (default: "guest")

-v

Display version and exit

-w <seconds>

Command timeout (default: 3 seconds)

Examples
# Send a simple event
nxevent -u admin -P adminpassword 127.0.0.1 MY_APP_EVENT

# Send event with positional parameters
nxevent -u admin -P adminpassword 127.0.0.1 MY_APP_EVENT param1 param2

# Send event with named parameters
nxevent -n -u admin -P adminpassword 127.0.0.1 MY_APP_EVENT state=UP desc="Application started"

# Stress test: send event 1000 times with 100ms interval
nxevent -C 1000 -i 100 -u admin -P adminpassword 127.0.0.1 TEST_EVENT

nxalarm

Command-line alarm management utility. Connects to NetXMS server to list, acknowledge, resolve, or terminate alarms.

Usage:

nxalarm [<options>] <server> <command> [<alarm_id>]

Commands

Command Description

ack <id>

Acknowledge alarm

add-comment <id> <text>

Add comment to alarm

get-comments <id>

Get comments for alarm

list

List active alarms

open <id>

Open helpdesk issue from alarm

resolve <id>

Resolve alarm

terminate <id>

Terminate alarm

Options

Option Description

-c <codepage>

Character codepage (default: ISO8859-1; non-Windows builds only)

-D

Turn on debug mode

-e

Encrypt session (always encrypted, kept for compatibility)

-h

Display help and exit

-o <format>

Output format for list command (see format codes below)

-P <password>

User password (default: empty)

-s

Sticky acknowledge (valid only with the ack command)

-S <minutes>

Sticky acknowledge with timeout in minutes (valid only with the ack command)

-u <user>

Login user name (default: "guest")

-v

Display version and exit

-w <seconds>

Command timeout (default: 3 seconds)

Output Format Codes

Used with -o option for the list command. Default format: %I %S %H %m

Code Description

%a

Primary IP address of source object

%A

Primary hostname of source object

%c

Repeat count

%d

Related DCI ID

%e

Event code

%E

Event name

%h

Helpdesk state as number

%H

Helpdesk state as text

%i

Source object identifier

%I

Alarm identifier

%m

Message text

%n

Source object name

%s

Severity as number

%S

Severity as text

%x

Alarm state as number

%X

Alarm state as text

%%

Literal percent sign

Examples
# List all active alarms
nxalarm -u admin -P adminpasswd 127.0.0.1 list

# List alarms with custom format
nxalarm -u admin -P adminpasswd -o "%I %S %n: %m" 127.0.0.1 list

# Acknowledge alarm
nxalarm -u admin -P adminpasswd 127.0.0.1 ack 226875

# Sticky acknowledge with 60-minute timeout
nxalarm -u admin -P adminpasswd -S 60 127.0.0.1 ack 226875

# Resolve alarm
nxalarm -u admin -P adminpasswd 127.0.0.1 resolve 226875

# Terminate alarm
nxalarm -u admin -P adminpasswd 127.0.0.1 terminate 226875

Agent Tools

nxaction

Remotely execute a preconfigured action on a NetXMS agent.

Usage:

nxaction [<options>] <host> <action> [<action_args>]

In addition to the common agent options, nxaction supports:

Option Description

-o

Show action’s output

Examples
# Execute agent restart action
nxaction 127.0.0.1 Agent.Restart

# Execute action with output
nxaction -o 10.0.0.50 RestartService httpd

# Execute via proxy agent
nxaction -X 172.16.1.1 10.0.0.50 Agent.Restart

See Agent Configuration for details on defining agent actions.

nxget

Query agent metrics, lists, tables, configuration, and perform network service checks from the command line.

Usage:

nxget [<options>] <host> [<metric> [<metric> ...]]

Options

In addition to the common agent options:

Option Description

-b

Batch mode — get all parameters specified on command line

-C

Get agent’s configuration file

-d <delimiter>

Print table content as delimited text

-E

Take screenshot — the first positional argument is the output file name, the optional second one is the session name (default: "Console")

-f

Do not try lists/tables if metric does not exist

-F

Get information about given file set

-i <seconds>

Get parameter(s) continuously with given interval

-I

Get list of supported single-value metrics (lists and tables are not printed)

-l

Requested parameter is a list

-n

Show parameter name in result

-N <addr>

Check state of network service at address

-o <proto>

Protocol number for service check

-P <port>

Network service port (used with -N)

-r <string>

Service check request string

-R <string>

Service check expected response string

-t <type>

Type of service to check: custom, ssh, pop3, smtp, ftp, http, https, telnet

-T

Requested parameter is a table

-U

Get list of active user sessions

-Y

Read remote system time

Examples
# Get a single metric
nxget 10.0.0.2 Agent.Version

# Get metric with authentication
nxget -s mySecret 10.0.0.50 System.CPU.Usage

# List all supported single-value metrics
nxget 10.0.0.2 -I

# Get a list metric
nxget -l 10.0.0.2 Agent.SubAgentList

# Get a table metric
nxget -T 10.0.0.2 System.Processes

# Batch mode - get multiple metrics at once
nxget -bn 10.0.0.2 Agent.Uptime System.Uptime System.CPU.Usage

# Get agent configuration
nxget -C 10.0.0.2

# Get metric via proxy agent
nxget -X 172.16.1.1 10.0.0.2 System.PlatformName

# Get list metric with forced encryption
nxget -e 3 -l 10.0.0.10 Agent.SubAgentList

# Monitor metric continuously every 5 seconds
nxget -i 5 10.0.0.2 System.CPU.Usage

# Check POP3 service
nxget -N 10.0.0.5 -t pop3 -P 110 10.0.0.2

# Print table as CSV
nxget -T -d "," 10.0.0.2 System.Processes

Useful Lists

Agent.ActionList

List of defined actions

Agent.SubAgentList

List of loaded subagents

Agent.SupportedLists

List of supported list metrics

Agent.SupportedParameters

List of supported single-value metrics

Agent.SupportedPushParameters

List of supported push metrics

Agent.SupportedTables

List of supported table metrics

Agent.ThreadPools

List of agent thread pools

nxap

Manage agent policies on a remote NetXMS agent.

Usage:

nxap [<options>] -l <host>
nxap [<options>] -u <guid> <host>

Options

In addition to the common agent options:

Option Description

-l

List installed policies on the agent

-u <guid>

Uninstall policy with given GUID

Examples
# List all installed policies
nxap -l 127.0.0.1

# Uninstall a specific policy
nxap -u 550e8400-e29b-41d4-a716-446655440000 127.0.0.1

nxupload

Upload files to a NetXMS agent. Can also trigger agent upgrade or package installation.

Usage:

nxupload [<options>] <host> <file>

Options

In addition to the common agent options:

Option Description

-C <options>

Set package deployment options or command line

-d <file>

Fully qualified destination file name on agent

-i

Start installation of uploaded package

-q

Quiet mode

-t <type>

Set package type (default: "executable")

-u

Start agent upgrade from uploaded package

-z

Compress data stream with LZ4

-Z

Compress data stream with DEFLATE

Examples
# Upload a file
nxupload 10.0.0.5 test_script.sh

# Upload to specific destination path
nxupload -d /opt/netxms/scripts/myscript.sh 10.0.0.5 myscript.sh

# Upload and install package
nxupload -i 10.0.0.5 nxagentd-5.0.0.deb

# Upload with compression
nxupload -z 10.0.0.5 large_file.tar.gz

# Upload agent upgrade package
nxupload -u 10.0.0.5 nxagentd-5.0.0-linux-amd64.tar.gz

nxdownload

Download files from a NetXMS agent. Accepts the common agent options, including -A for connecting over a TLS tunnel.

nxaevent

Send events to NetXMS server via the local agent. Unlike nxevent, this tool communicates through the locally running agent rather than directly to the server.

Usage:

nxaevent [OPTIONS] event_code [parameters]
nxaevent [OPTIONS] -n event_code [name=parameter ...]

Options

Option Description

-h, --help

Display help message

-n, --named-parameters

Parameters in named format (name=value)

-o, --object <id>

Send event on behalf of object with given ID

-q, --quiet

Suppress all messages

-t, --timestamp-unix <time>

Specify timestamp as UNIX timestamp

-T, --timestamp-text <time>

Specify timestamp as YYYYMMDDhhmmss

-v, --verbose

Enable verbose messages (add twice for debug)

-V, --version

Display version information

Examples
# Send simple event
nxaevent MY_APP_EVENT

# Send event with named parameters
nxaevent -n MY_APP_EVENT state=UP desc="Application started"

# Send event on behalf of specific object
nxaevent -o 150 MY_APP_EVENT

# Send event with custom timestamp
nxaevent -t 1672531200 MY_APP_EVENT

nxapush

Push data values to NetXMS DCIs through the local agent. The tool sends data to the locally running agent, which forwards it to the server. Requires DCIs configured with Push origin type on the target node.

Usage:

nxapush [OPTIONS] [@batch_file] [values]
nxapush [OPTIONS] -

Options

Option Description

-h, --help

Display help message

-l, --local-cache

Push to agent’s local cache

-o, --object <id>

Push data on behalf of object with given ID

-q, --quiet

Suppress all messages

-s, --statsite

Use statsite sink format (dci|value|timestamp)

-t, --timestamp-unix <time>

Specify timestamp as UNIX timestamp

-T, --timestamp-text <time>

Specify timestamp as YYYYMMDDhhmmss

-v, --verbose

Enable verbose messages (add twice for debug)

-V, --version

Display version information

Values are specified as dci=value. Use @batch_file to read values from a file, or - to read from standard input.

The batch file name cannot contain the = character.
Examples
# Push single value
nxapush PushParam1=42

# Push multiple values
nxapush PushParam1=1 PushParam2=4

# Push from batch file
nxapush @/tmp/metrics.txt

# Push from stdin
echo "PushParam1=42" | nxapush -

# Push to local cache
nxapush -l PushParam1=42

See External Tools Integration for usage details.

nxpush

Push data values to NetXMS DCIs from the server side using the client protocol. Unlike nxapush (which runs on the agent side), nxpush sends data directly to the server from any host with network access.

Usage:

nxpush [OPTIONS] [server] [@batch_file] [values]

Options

Option Description

-b, --batchsize <size>

Batch size (default: send all in one batch)

-c, --codepage <page>

Character codepage (default: ISO8859-1)

-e, --encrypt

Encrypt session (always encrypted, kept for compatibility)

-h, --help

Display help message

-H, --host <host>

Server address

-P, --password <password>

User password (default: empty)

-q, --quiet

Suppress all messages

-S, --skip-version-check

Skip protocol version check (use with care)

-t, --timestamp-unix <time>

Specify timestamp as UNIX timestamp

-T, --timestamp-text <time>

Specify timestamp as YYYYMMDDhhmmss

-u, --user <user>

Login user name (default: "guest")

-v, --verbose

Enable verbose messages (add twice for debug)

-V, --version

Display version information

Values are specified as node:dci=value. Node and DCI can be referenced by ID, object name, DNS name, or IP address. Prefix DNS names and IP addresses with @.

Examples
# Push by node ID and DCI ID
nxpush -H 10.0.0.1 -u sender -P passwd 104:4567=1

# Push by node ID and DCI name
nxpush -H 10.0.0.1 -u sender -P passwd 104:PushParam=4

# Push using node IP
nxpush -H 10.0.0.1 -u sender -P passwd @10.0.0.50:PushParam=42

# Push from batch file
nxpush -H 10.0.0.1 -u sender -P passwd @metrics.txt

See Data Collection Concepts for push DCI configuration.

nxagentd

The NetXMS agent daemon. Normally started as a system service, but supports various command-line options for configuration, diagnostics, and service management.

Usage:

nxagentd [options]

Options

Option Description

-B <uin>

Set zone UIN for this agent

-c <file>

Use specified configuration file

-C

Load configuration, dump parsed values, and exit

-d

Run as daemon (service)

-D <level>

Set debug level (0..9)

-e <name>

Windows event source name (Windows only)

-E

Install Windows event source (Windows only)

-f

Run in foreground (do not daemonize)

-F

Force creation of the configuration file

-g <gid>

Change group ID after start (UNIX only)

-G <name>

Use alternate global section name in configuration file

-h

Display help and exit

-H

Hide window (Windows standalone mode)

-i

Windows service must be interactive

-I

Install as Windows service

-k

Delayed restart of external subagents and session agents

-K

Shut down all connected external sub-agents

-l

Show log file location

-M <addr>

Download configuration from management server at given address

-n <name>

Windows service name

-N <name>

Windows service display name

-O <option>

Set configuration option (format: name=value)

-p <path>

PID file path (UNIX, default: /var/run/nxagentd.pid)

-P <text>

Platform suffix for version reporting

-Q <entry>

Query configuration values and exit

-r <addr>

Register agent on management server

-R

Remove Windows service

-s

Start Windows service

-S

Stop Windows service, or run as systemd daemon (Linux)

-t <tag>:<level>

Set debug level for a specific debug tag

-T

Reset agent identity

-u <uid>

Change user ID after start (UNIX only)

-U

Remove Windows event source (Windows only)

-v

Display version and exit

-W <pid>

Run as watchdog process for agent with given PID

-X <pid>

PID of the agent being restarted (used internally during restart)

-z <values>

Extra configuration parameters

-Z <file>

Create configuration file

Examples
# Run in daemon mode
nxagentd -d

# Run in foreground with debug level 5
nxagentd -f -D 5

# Use alternate configuration file
nxagentd -c /opt/netxms/etc/nxagentd.conf

# Show log file location
nxagentd -l

# Dump parsed configuration and exit
nxagentd -C

# Download configuration from server
nxagentd -M 10.0.0.1

# Register agent on server
nxagentd -r 10.0.0.1

# Install as Windows service
nxagentd -I

# Install as Windows service with custom name
nxagentd -I -n NetXMSAgent -N "NetXMS Monitoring Agent"

# Set zone UIN
nxagentd -B 5

See Agent Configuration for full agent configuration documentation.

SNMP Tools

nxsnmpget

Query SNMP metrics from network devices.

Usage:

nxsnmpget [<options>] <host> <variables>

Options

Option Description

-a <method>

Authentication method for SNMPv3 USM: none, MD5, SHA1, SHA224, SHA256, SHA384, SHA512

-A <passwd>

Authentication password for SNMPv3 USM

-c <string>

Community string (default: "public")

-C <codepage>

Codepage for remote system

-e <method>

Encryption method for SNMPv3 USM: none, DES, AES, AES-128, AES-192, AES-256

-E <passwd>

Encryption password for SNMPv3 USM

-h

Display help and exit

-i <seconds>

Repeat request with given interval

-m <path>

Path to compiled MIB file

-M

Do not load MIB tree

-n

Show numeric OIDs only

-p <port>

SNMP agent port (default: 161)

-R

Raw output (disable display hints)

-u <user>

User name for SNMPv3 USM

-v <version>

SNMP version: 1, 2c, or 3

-w <seconds>

Request timeout (default: 3 seconds)

-x

Show raw value in hex

Examples
# Get sysDescr using SNMPv2c
nxsnmpget -c public -v 2c 127.0.0.1 .1.3.6.1.2.1.1.1.0

# Get multiple OIDs
nxsnmpget -c public -v 2c 10.0.0.1 sysDescr.0 sysUpTime.0

# SNMPv3 with authentication and encryption
nxsnmpget -v 3 -u snmpuser -a SHA256 -A authpass -e AES -E privpass 10.0.0.1 sysDescr.0

# Monitor value every 10 seconds
nxsnmpget -i 10 -c public -v 2c 10.0.0.1 ifInOctets.1

# Show raw hex value
nxsnmpget -x -c public -v 2c 10.0.0.1 .1.3.6.1.2.1.1.1.0

nxsnmpset

Set SNMP variables on network devices.

Usage:

nxsnmpset [<options>] <host> <variable>[@<type>] <value>

Options

Option Description

-a <method>

Authentication method for SNMPv3 USM: none, MD5, SHA1, SHA224, SHA256, SHA384, SHA512

-A <passwd>

Authentication password for SNMPv3 USM

-B

Provided value is Base64-encoded raw value

-c <string>

Community string (default: "public")

-e <method>

Encryption method for SNMPv3 USM: none, DES, AES, AES-128, AES-192, AES-256

-E <passwd>

Encryption password for SNMPv3 USM

-h

Display help and exit

-H

Provided value is raw value encoded as hexadecimal string

-p <port>

SNMP agent port (default: 161)

-t <type>

Variable data type (default: STRING)

-u <user>

User name for SNMPv3 USM

-v <version>

SNMP version: 1, 2c, or 3

-w <seconds>

Request timeout (default: 3 seconds)

Data Types

The data type can be specified with the -t option or appended to the OID with @type:

INTEGER

32-bit signed integer

STRING

Octet string (default)

OID

Object identifier

IPADDR

IP address

COUNTER32

32-bit counter

GAUGE32

32-bit gauge

TIMETICKS

Time ticks (hundredths of a second)

COUNTER64

64-bit counter

UINT32

32-bit unsigned integer

Examples
# Set a string value
nxsnmpset -c private -v 2c 10.0.0.1 sysContact.0 "[email protected]"

# Set an integer value
nxsnmpset -c private -v 2c 10.0.0.1 .1.3.6.1.2.1.2.2.1.7.1@INTEGER 2

# Set using explicit type
nxsnmpset -t INTEGER -c private -v 2c 10.0.0.1 ifAdminStatus.1 2

nxsnmpwalk

Walk an SNMP MIB subtree on a network device.

Usage:

nxsnmpwalk [<options>] <host> <start_oid>

Options

Option Description

-a <method>

Authentication method for SNMPv3 USM: none, MD5, SHA1, SHA224, SHA256, SHA384, SHA512

-A <passwd>

Authentication password for SNMPv3 USM

-c <string>

Community string (default: "public")

-C <codepage>

Codepage for remote system

-e <method>

Encryption method for SNMPv3 USM: none, DES, AES, AES-128, AES-192, AES-256

-E <passwd>

Encryption password for SNMPv3 USM

-h

Display help and exit

-m <path>

Path to compiled MIB file

-M

Do not load MIB tree

-n <name>

SNMPv3 context name

-N

Show numeric OIDs only

-p <port>

SNMP agent port (default: 161)

-R

Raw output (disable display hints)

-u <user>

User name for SNMPv3 USM

-v <version>

SNMP version: 1, 2c, or 3

-w <seconds>

Request timeout (default: 3 seconds)

Examples
# Walk the system subtree
nxsnmpwalk -c public -v 2c 127.0.0.1 .1.3.6.1.2.1.1

# Walk interface table
nxsnmpwalk -c public -v 2c 10.0.0.1 ifTable

# Walk with SNMPv3
nxsnmpwalk -v 3 -u snmpuser -a SHA256 -A authpass -e AES -E privpass 10.0.0.1 .1.3.6.1.2.1.1

# Walk with numeric OIDs only
nxsnmpwalk -N -c public -v 2c 10.0.0.1 .1.3.6.1.2.1.2.2

Utility Tools

nxencpasswd

Obfuscate passwords for use in NetXMS server and agent configuration files. The obfuscated password can be placed in configuration files instead of plaintext passwords.

Usage:

nxencpasswd [<options>] <login> [<password>]
nxencpasswd [<options>] -a [<password>]

Options

Option Description

-a

Obfuscate agent’s shared secret (no login required)

-h

Display help and exit

-v

Display version and exit

If the password is not provided on the command line, it will be prompted from the terminal (more secure, avoids shell history).
Examples
# Obfuscate database password
nxencpasswd netxms mydbpassword

# Obfuscate agent secret (prompted)
nxencpasswd -a

nxmibc

MIB file compiler. Compiles MIB source files into the binary format used by NetXMS server. Normally MIBs are managed via the management client, but nxmibc can be used for batch operations.

Usage:

nxmibc [options] source1 ... sourceN

Options

Option Description

-a

Compile all input files (continue processing after errors)

-d <dir>

Include all MIB files from directory

-e <ext>

Specify file extensions to process (default: "mib")

-h

Display help and exit

-m

Produce machine-readable output

-o <file>

Set output file name (default: netxms.cmib)

-P

Pause before exit

-r

Recursively scan subdirectories

-s

Strip descriptions from MIB objects (smaller output)

-u

Do not compress output file

-z

Compress output file (default behavior)

Examples
# Compile all MIBs in a directory
nxmibc -d /usr/share/netxms/mibs -o /var/lib/netxms/netxms.cmib

# Compile specific MIB files
nxmibc -o custom.cmib MY-MIB.mib MY-OTHER-MIB.mib

# Compile with subdirectory scanning
nxmibc -r -d /usr/share/snmp/mibs -o netxms.cmib

# Compile all files, ignoring errors
nxmibc -a -d /usr/share/snmp/mibs -o netxms.cmib

nxscript

Standalone NXSL script interpreter. Executes NXSL scripts outside of the NetXMS server context. Useful for testing and developing NXSL scripts, and for converting scripts to the NXSL version 5 syntax.

Usage:

nxscript [options] script [arg1 [... argN]]

Options

Option Description

-5

Convert script to NXSL version 5 syntax

-b

Input is a binary (compiled) file

-c

Compile only (do not execute)

-C <count>

Run script multiple times

-d

Dump compiled script code

-e <name>

Entry point function name

-E

Show expression variables on exit

-m

Show memory usage information

-M

Show program metadata

-o <file>

Write compiled script to file

-r

Print script return value

-R

Show list of required modules

-t

Enable instruction trace

Examples
# Run a script
nxscript myscript.nxsl

# Convert script to NXSL v5 syntax
nxscript -5 old_script.nxsl

# Compile and dump bytecode
nxscript -c -d myscript.nxsl

# Run with arguments and print return value
nxscript -r myscript.nxsl arg1 arg2

# Compile to binary
nxscript -c -o myscript.nxslc myscript.nxsl

nxwsget

Query web services via a NetXMS agent. The agent must have EnableWebServiceProxy=yes configured. Supports JSON (jq), XML (XPath), and text (regex) extraction from HTTP responses.

Usage:

nxwsget [<options>] <host> <URL> <path> [<path> ...]

Options

In addition to the common agent options:

Option Description

-a <auth>

HTTP authentication type: none (default), basic, digest, ntlm, bearer, any, anysafe

-c

Do not verify service certificate

-C

Do not verify certificate’s name against host

-d <data>

Request body data

-F

Follow location header in 3xx redirect responses

-H <header>

HTTP header (can be used multiple times)

-i <seconds>

Query service continuously with given interval

-l

Requested parameter is a list

-L <login>

Web service login name

-m <method>

HTTP request method: GET (default), POST, PUT, PATCH, DELETE

-P <password>

Web service password

-r <seconds>

Cache retention time

-t

Use text parsing (regex) instead of JSON/XML

Examples
# Query JSON API and extract a field
nxwsget 127.0.0.1 "http://api.open-notify.org/astros.json" .number

# Query with authentication
nxwsget -a basic -L user -P pass 127.0.0.1 "https://api.example.com/status" .status

# Query with custom headers
nxwsget -H "Authorization: Bearer token123" 127.0.0.1 "https://api.example.com/data" .result

# POST request with data
nxwsget -m POST -d '{"key":"value"}' -H "Content-Type: application/json" 127.0.0.1 "https://api.example.com/submit" .id

# Monitor continuously every 30 seconds
nxwsget -i 30 127.0.0.1 "https://api.example.com/status" .health

# Skip certificate verification
nxwsget -c 127.0.0.1 "https://self-signed.example.com/api" .data

Other Tools

nxai

Command-line client for the NetXMS AI assistant. See AI Assistant Reference.

nxshell

Command-line tool for scripting NetXMS server operations using Python (Jython). See NXShell.