Skip to main content

Netskope Help

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)\netskope\stagent

    Example: C:\Program Files (x86)\netskope\stagent\nsdiag -n

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

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

Command example: nsdiag [options]

Important

  • 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 Option

Description

-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 stop

Stop capturing inner packet dump

-p stop

Stop capturing outer packet dump

-d stop

Stop capturing driver logs.

-u

Update configuration

-h

Show this help

-v

Show 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

-n

Get NPA status.

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

NPA status is Connected.

-x

Use this option to verify if the string matches the regular expressions.

-r

This option shows URL performance stats like connect time, look-up time etc as shown below.

./nsdiag -r www.google.com
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

-m

Use 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.

-f

Use 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
Tunnel status:: NSTUNNEL_CONNECTING.
Client status:: enable.
Gateway:: gateway-mycorp.goskope.com.
OnPremDetection:: On-Premises.
Explicit Proxy:: false.
Gateway IP:: 198.168.1.1.
Tunnel Protocol:: TLS.