Netskope LogoNetskope Logo
  • Security Services
  • AI Services
  • Networking Services
  • Analytics Services
  • Integrations
  • getting-started.svgGetting Started
    • Support
    • Community
    • Netskope.com
    © 2026 All Rights Reserved. Netskope Inc.
    Home
    Netskope Client
    Netskope Client Command Reference

    Netskope Client Command Reference

    The Netskope Client nsdiag utility is a diagnostic and troubleshooting tool installed on end-user devices alongside Netskope Client.  This section lists the available  nsdiag commands.

    Diagnostics Commands (Windows, macOS, and Linux)

    The diagnostics command is available using the nsdiag command in Microsoft Windows, macOS, and Linux devices. The command is located in the Client installation directory:

    Operating SystemLocationExample
    Windows32-bit: C:\Program Files (x86)\Netskope\stagent

    64-bit: C:\Program Files\Netskope\stagent
    C:\Program Files (x86)\netskope\stagent\nsdiag -n
    macOS/Library/Application Support/Netskope/STAgent/$ /Library/Application\ Support/Netskope/STAgent/nsdiag -n
    Linux/opt/netskope/stagent//opt/netskope/stagent/nsdiag -n

    Command example: nsdiag [options]

    Command options are case-sensitive.
           nsdiag -o <file>.zip
           nsdiag -c start [-o <filename>.pcap] [-f <total packet size>] [-s <snap length>]
           nsdiag -c stop
           nsdiag -p start [-o <filename>.pcap] [-f <total packet size>] [-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 -r <URL> 
           nsdiag -g download -s [1mb | 10mb | 100mb]
           nsdiag -l [dump | debug | info | warning | error | critical]
           nsdiag -m 
           nsdiag -n 
           nsdiag -t enable  
           nsdiag -t disable [--password <password>]  
           nsdiag -x <regular expression> <string to match>
           nsdiag -b [start | stop | status | cleanup] -l [ dump | debug | info | warning | error | critical] -s <snap length> -m <max debug log files> -i [disable | maxInnerPcapTotalSize in MB] -e [disable | maxOuterPcapTotalSize in MB] -c [disable | CPU sample interval in second] -d [enable | disable sysdiagnose log] -t [duration of time in minutes] -o <output archive path>
           nsdiag [-h | -v]
           nsdiag --pin [country=US|IN|...] [pop=xyz]
           nsdiag --unpin
           nsdiag --check-dc
    • There are minor differences in the commands displayed for Mac and Linux. For example,
      • The command to capture the outer packet: nsdiag -p start [-o <filename>.pcap] [-s <file size>]
      • The command to start capturing driver logs: nsdiag -d start [-o <filename>.log]
    Command OptionDescription
    -o <file>.zipSave logs and diagnostics to output <file>.zip.
    -c start [-o <filename>.pcap] [-s ]Start capturing inner packet dump to <filename>.pcap.
    -p start [-o <filename>.etl] [-s <file size>]Start capturing outer packet dump to <filename>.etl.
    -d start [-o <filename>.etl]Start capturing driver logs in <filename>.etl.
    -o <filename>.<extension>In Windows
    Output will be created in default directory "C:/ProgramData/Netskope/stagent/Logs"
    • If filename is not specified then default filename will be used

    • Filename should NOT be a path as output will always be created in default directory


    In macOS
    Output will be created in default directory "/Library/Logs/Netskope"
    • If filename is not specified then default filename will be used

    • Filename should NOT be a path as output will always be created in default directory


    In Linux
    Output will be created in default directory "/opt/netskope/stagent/logs"
    • If filename is not specified then default filename will be used

    • Filename should NOT be a path as output will always be created in default directory



    -s <snap length>If snap length is not specified, entire packet will be captured.
    -m <file size>Set the maximum file size number. The file size (in MB) must be less than 1024 MB and a non-zero number.

    Usage: nsdiag -m <filesize>

    Example: nsdiag -m 100

    This modifies the nsdebug.log file size to 100 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.
    -rShow time values of website access.
    For example,
    ./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

    - t enable/disable
    Enables or disables the Netskope Client.
    --password Enter the master password required to disable Netskope Client.

    For example, nsdiag -t disable --password < master password in plain-text >
    -g download -s [1mb | 10mb | 100mb]Perform Speed Test operation, supports [upload | download] operation.

    Supported file sizes are 1mb, 10mb, 100mb and should be provided by -s. File size is mandatory.
    -g uploadPerforms upload Speed Test for specified size.

    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.
    -g downloadPerforms download Speed Test for specified size.

    Download test example: nsdiag -g download -s 10mb
    -l [dump | 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.
    -xTest if string will match regular expression.
    -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
    Orgname:: Netskope Corp.
    Config:: Default tenant config.
    Steering Config:: All Users.
    Email:: xxxx@xxxxxx.com.
    Peruser config:: FALSE.
    Tunnel status:: NSTUNNEL_CONNECTED.
    Client status:: enable.
    Gateway:: gateway-maa1.goskope.com.
    Dynamic Steering:: FALSE.
    OnPremDetection:: Not Configured.
    Explicit Proxy:: false.
    Gateway IP:: 198.168.1.1
    Tunnel Protocol:: DTLS.
    SNI Enable:: FALSE.
    Traffic Mode:: All Traffic.
    -bSet the Client debug mode
    --check-dcCheck device classification and send current status immediately to the backend.
    --pin
    Pin Netskope Client to a desired POP for connectivity.
    --unpin
    Unpin Netskope Client and revert to automatic POP selection.
    In this Topic
    • Netskope Client Command Reference