Netskope Client Command Reference

Netskope Client Command Reference

This section lists the various nsdiag commands used in the installation of the Netskope Client.

Diagnostics Commands (Windows and macOS)

The diagnostics command is available via the nsdiag command in both Microsoft Windows and macOS devices. The command is located in the Client installation directory:

  • In Windows: C:Program Files (x86)netskopestagent

    Example: C:Program Files (x86)netskopestagentnsdiag -n

  • In macOS: /Library/Application Support/Netskope/STAgent/

    Example:$ /Library/Application Support/Netskope/STAgent/nsdiag -n

Command example: nsdiag [options]


  • Command options are case-sensitive.
  • The -f, -m, and -r options are available only from version 90.
  • The -x command is available only from version 95.1.2.
nsdiag -c start [-o <filename>.pcap] [-s <snap length>]
nsdiag -c stop
nsdiag -p start [-o <filename>.pcap] [-s <file size>]
nsdiag -p stop
nsdiag -d start [-o <filename>.log]
nsdiag -d stop
nsdiag -u
nsdiag -g upload -s [1mb | 10mb | 100mb]
nsdiag -g download -s [1mb | 10mb | 100mb]
nsdiag -l [debug | info | warning | error | critical]
nsdiag -n
nsdiag -x <regular expression> <string to match>
nsdiag [-h | -v]
nsdiag -m
nsdiag -r
nsdiag -f
Command OptionDescription
-o <filename>.<extension>Save logs and diagnostics to output a file.
-c start [-o <filename>.pcap] [-s <snap length>] | [stop]Start or stop capturing inner packet dump. The pack dump can be written to <filename>.pcap specified via the -o command.
-p start [-o <filename>.pcap] [-s <file size>]Start capturing outer packet dump to <filename>.pcap
-d start [-o <filename>.log]Start capturing driver logs in <filename>.log
-o <filename>.<extension>The output will be created in the default directory: /Library/Logs/Netskope.

If the filename is not specified then the default filename (nsouterpkt.pcap)will be used. The filename should NOT be a path as the output will always be created in the default directory.

-s <snap length>If snap length is not specified, the entire packet will be captured
-s <file size>If the file size is not specified, the default file size will be 10 MB.
-c stopStop capturing inner packet dump
-p stopStop capturing outer packet dump
-d stopStop capturing driver logs.
-uUpdate configuration
-hShow this help
-vShow Netskope Client version
-g [upload | download] -s [1mb | 10mb | 100mb]Perform Speed Test operation, supports [upload | download] operation. Supported payload size are 1mb, 10mb, 100mb and to be used with the -s option. File size is mandatory.
  • Upload test example: nsdiag -g upload -s 10mb
  • Download test example:nsdiag -g download -s 10mb
-l [debug | info | warning | error | critical]Set the Netskope client log level
-nGet NPA status.

Example: $/Library/Application Support/Netskope/STAgent/nsdiag -n

NPA status is Connected.

-xUse this option to verify if the string matches the regular expressions.
-rThis option shows URL performance stats like connect time, look-up time etc as shown below.
./nsdiag -r
NameLookupTime: 0.1
ConnectTime: 0.2
AppConnectTime: 0.0
PretransferTime: 0.2
StarttransferTime: 0.7
TotalTime: 0.9
RedirectTime: 0.0
DownloadSpeed: 19669 bytes/sec
-mUse this option to change the default size of the log file. The default size is 5 MB, using this command you can specify the log file size upto 1 GB.
Usage: nsdiag -m <filesize>

e.g nsdiag -m 5

This will change the nsdebug.log file to 5 MB.

-fUse this command to display the client details such as client status, tunnel status, Gateway, On-PremStatus, Gateway IP, Tunnel Protocol, Explicit Proxy.
>.nsdiag.exe -f
Client status:: enable.
OnPremDetection:: On-Premises.
Explicit Proxy:: false.
Gateway IP::
Tunnel Protocol:: TLS.
Share this Doc
In this topic ...