Skip to content
Was this article helpful?


Configuration for nstrace operations resource.


(click to see Operations)

Name Data Type PermissionsDescription
nf<Double>Read-writeNumber of files to be generated in cycle.<br>Default value: 24<br>Minimum value = 1<br>Maximum value = 100
time<Double>Read-writeTime per file (sec).<br>Default value: 3600<br>Minimum value = 1
size<Double>Read-writeSize of the captured data. Set 0 for full packet trace.<br>Default value: 164<br>Minimum value = 0<br>Maximum value = 1514
mode<String[]>Read-writeCapturing mode for trace. Mode can be any of the following values or combination of these values:<br> RX Received packets before NIC pipelining (Filter does not work when RX capturing mode is ON)<br> NEW_RX Received packets after NIC pipelining<br> TX Transmitted packets<br> TXB Packets buffered for transmission<br> IPV6 Translated IPv6 packets<br> C2C Capture C2C message<br> NS_FR_TX TX/TXB packets are not captured in flow receiver.<br> MPTCP MPTCP master flow<br> Default mode: NEW_RX TXB .<br>Default value: DEFAULT_MODE<br>Possible values = TX, TXB, RX, IPV6, NEW_RX, C2C, NS_FR_TX, APPFW, MPTCP
pernic<String>Read-writeUse separate trace files for each interface. Works only with tcpdump format.<br>Default value: DISABLED<br>Possible values = ENABLED, DISABLED
filename<String>Read-writeName of the trace file.
fileid<String>Read-writeID for the trace file name for uniqueness. Should be used only with -name option.
filter<String>Read-writeFilter expression for nstrace. Maximum length of filter is 255 and it can be of following format:<br> ;lt;expression;gt; [;lt;relop;gt; ;lt;expression;gt;]<br><br> ;lt;relop;gt; = ( ;amp;;amp; | || )<br><br> ;lt;expression;gt; =:<br> CONNECTION.;lt;qualifier;gt;.;lt;qualifier-method;gt;.(;lt;qualifier-value;gt;)<br><br> ;lt;qualifier;gt; = SRCIP<br> ;lt;qualifier-method;gt; = [ EQ | NE ]<br> ;lt;qualifier-value;gt; = A valid IPv4 address.<br> example = CONNECTION.SRCIP.EQ(<br><br> ;lt;qualifier;gt; = DSTIP<br> ;lt;qualifier-method;gt; = [ EQ | NE ]<br> ;lt;qualifier-value;gt; = A valid IPv4 address.<br> example = CONNECTION.DSTIP.EQ(<br><br> ;lt;qualifier;gt; = IP<br> ;lt;qualifier-method;gt; = [ EQ | NE ]<br> ;lt;qualifier-value;gt; = A valid IPv4 address.<br> example = CONNECTION.IP.EQ(<br><br> ;lt;qualifier;gt; = SRCIPv6<br> ;lt;qualifier-method;gt; = [ EQ | NE ]<br> ;lt;qualifier-value;gt; = A valid IPv6 address.<br> example = CONNECTION.SRCIPv6.EQ(2001:db8:0:0:1::1)<br><br> ;lt;qualifier;gt; = DSTIPv6<br> ;lt;qualifier-method;gt; = [ EQ | NE ]<br> ;lt;qualifier-value;gt; = A valid IPv6 address.<br> example = CONNECTION.DSTIPv6.EQ(2001:db8:0:0:1::1)<br><br> ;lt;qualifier;gt; = IPv6<br> ;lt;qualifier-method;gt; = [ EQ | NE ]<br> ;lt;qualifier-value;gt; = A valid IPv6 address.<br> example = CONNECTION.IPv6.EQ(2001:db8:0:0:1::1)<br><br> ;lt;qualifier;gt; = SRCPORT<br> ;lt;qualifier-method;gt; = [ EQ | NE | GT | GE | LT | LE<br> | BETWEEN ]<br> ;lt;qualifier-value;gt; = A valid port number.<br> example = CONNECTION.SRCPORT.EQ(80)<br><br> ;lt;qualifier;gt; = DSTPORT<br> ;lt;qualifier-method;gt; = [ EQ | NE | GT | GE | LT | LE<br> | BETWEEN ]<br> ;lt;qualifier-value;gt; = A valid port number.<br> example = CONNECTION.DSTPORT.EQ(80)<br><br> ;lt;qualifier;gt; = PORT<br> ;lt;qualifier-method;gt; = [ EQ | NE | GT | GE | LT | LE<br> | BETWEEN ]<br> ;lt;qualifier-value;gt; = A valid port number.<br> example = CONNECTION.PORT.EQ(80)<br><br> ;lt;qualifier;gt; = VLANID<br> ;lt;qualifier-method;gt; = [ EQ | NE | GT | GE | LT | LE<br> | BETWEEN ]<br> ;lt;qualifier-value;gt; = A valid VLAN ID.<br> example = CONNECTION.VLANID.EQ(0)<br><br> ;lt;qualifier;gt; = CONNID<br> ;lt;qualifier-method;gt; = [ EQ | NE | GT | GE | LT | LE<br> | BETWEEN ]<br> ;lt;qualifier-value;gt; = A valid PCB dev number.<br> example = CONNECTION.CONNID.EQ(0)<br><br> ;lt;qualifier;gt; = PPEID<br> ;lt;qualifier-method;gt; = [ EQ | NE | GT | GE | LT | LE<br> | BETWEEN ]<br> ;lt;qualifier-value;gt; = A valid core ID.<br> example = CONNECTION.PPEID.EQ(0) <br><br> ;lt;qualifier;gt; = SVCNAME<br> ;lt;qualifier-method;gt; = [ EQ | NE | CONTAINS | STARTSWITH <br> | ENDSWITH ] <br> ;lt;qualifier-value;gt; = A valid text string.<br> example = CONNECTION.SVCNAME.EQ("name")<br><br> ;lt;qualifier;gt; = LB_VSERVER.NAME<br> ;lt;qualifier-method;gt; = [ EQ | NE | CONTAINS | STARTSWITH<br> | ENDSWITH ]<br> ;lt;qualifier-value;gt; = LB vserver name.<br> example = CONNECTION.LB_VSERVER.NAME.EQ("name")<br><br> ;lt;qualifier;gt; = CS_VSERVER.NAME<br> ;lt;qualifier-method;gt; = [ EQ | NE | CONTAINS | STARTSWITH<br> | ENDSWITH ]<br> ;lt;qualifier-value;gt; = CS vserver name.<br> example = CONNECTION.CS_VSERVER.NAME.EQ("name")<br><br> ;lt;qualifier;gt; = INTF<br> ;lt;qualifier-method;gt; = [ EQ | NE ]<br> ;lt;qualifier-value;gt; = A valid interface id in the<br> form of x/y.<br> example = CONNECTION.INTF.EQ("x/y")<br><br> ;lt;qualifier;gt; = SERVICE_TYPE<br> ;lt;qualifier-method;gt; = [ EQ | NE ]<br> ;lt;qualifier-value;gt; = ( SVC_HTTP | FTP | TCP | UDP | SSL |<br> SSL_BRIDGE | SSL_TCP | NNTP | RPCSVR | RPCSVRS |<br> RPCCLNT | SVC_DNS | ADNS | SNMP | RTSP | DHCPRA | ANY|<br> MONITOR | MONITOR_UDP | MONITOR_PING | SIP_UDP |<br> SVC_MYSQL | SVC_MSSQL | SERVICE_UNKNOWN )<br> example = CONNECTION.SERVICE_TYPE.EQ(ANY)<br><br> ;lt;qualifier;gt; = TRAFFIC_DOMAIN_ID<br> ;lt;qualifier-method;gt; = [ EQ | NE | GT | GE | LT | LE<br> | BETWEEN ]<br> ;lt;qualifier-value;gt; = A valid traffic domain ID.<br> example = CONNECTION.TRAFFIC_DOMAIN_ID.EQ(0)<br><br> eg: start nstrace -filter "CONNECTION.SRCIP.EQ( || (CONNECTION.SVCNAME.NE("s1") ;amp;;amp; CONNECTION.SRCPORT.EQ(80))"<br> The filter expression should be given in double quotes. <br><br>common use cases:<br><br>Trace capturing full sized traffic from/to ip, excluding loopback traffic<br>start nstrace -size 0 -filter "CONNECTION.IP.NE( ;amp;;amp; CONNECTION.IP.EQ("<br><br>Trace capturing all traffic to (terminating at) port 80 or 443 <br>start nstrace -size 0 -filter "CONNECTION.DSTPORT.EQ(443) || CONNECTION.DSTPORT.EQ(80)"<br><br>Trace capturing all backend traffic specific to service service1 along with corresponding client side traffic<br>start nstrace -size 0 -filter "CONNECTION.SVCNAME.EQ("service1")" -link ENABLED<br><br>Trace capturing all traffic through NS interface 1/1<br>start nstrace -filter "CONNECTION.INTF.EQ("1/1")"<br><br>Trace capturing all traffic specific through vlan 2<br>start nstrace -filter "CONNECTION.VLANID.EQ(2)"<br><br>Trace capturing all frontend (client side) traffic specific to lb vserver vserver1 along with corresponding server side traffic<br>start nstrace -size 0 -filter "CONNECTION.LB_VSERVER.NAME.EQ("vserver1")" -link ENABLED .
link<String>Read-writeIncludes filtered connections peer traffic.<br>Default value: DISABLED<br>Possible values = ENABLED, DISABLED
nodes<Double[]>Read-writeNodes on which tracing is started.<br><br>Minimum value = 0<br>Maximum value = 32
filesize<Double>Read-writeFile size, in MB, treshold for rollover.<br><br>Default value: 0<br>Minimum value = 0<br>Maximum value = 65536
traceformat<String>Read-writeFormat in which trace will be generated<br>.<br>Default value: 0<br>Possible values = NSCAP, PCAP
merge<String>Read-writeSpecify how traces across PEs are merged<br>.<br>Default value: 0<br>Possible values = ONSTOP, ONTHEFLY, NOMERGE
doruntimecleanup<String>Read-writeEnable or disable runtime temp file cleanup.<br>Default value: ENABLED<br>Possible values = ENABLED, DISABLED
tracebuffers<Double>Read-writeNumber of 16KB trace buffers.<br>Default value: 5000<br>Minimum value = 1000
skiprpc<String>Read-writeskip RPC packets.<br>Default value: DISABLED<br>Possible values = ENABLED, DISABLED
skiplocalssh<String>Read-writeskip local SSH packets.<br>Default value: DISABLED<br>Possible values = ENABLED, DISABLED
capsslkeys<String>Read-writeCapture SSL Master keys. Master keys will not be captured on FIPS machine.<br> Warning: The captured keys can be used to decrypt information that may be confidential. The captured key files have to be stored in a secure environment.<br>Default value: DISABLED<br>Possible values = ENABLED, DISABLED
inmemorytrace<String>Read-writeLogs packets in appliances memory and dumps the trace file on stopping the nstrace operation.<br>Default value: DISABLED<br>Possible values = ENABLED, DISABLED
nodeid<Double>Read-writeUnique number that identifies the cluster node.<br>Minimum value = 0<br>Maximum value = 31
state<String>Read-onlyCurrent running state of trace.<br>Default value: 0<br>Possible values = RUNNING, STOPPED
scope<String>Read-onlyScope of started trace, local or cluster level.<br>Default value: 0<br>Possible values = CLUSTER, LOCAL
tracelocation<String>Read-onlyDirectory where current trace files are saved.


(click to see Properties)


Some options that you can use for each operations:

  • Getting warnings in response: NITRO allows you to get warnings in an operation by specifying the "warning" query parameter as "yes". For example, to get warnings while connecting to the NetScaler appliance, the URL is as follows:


    If any, the warnings are displayed in the response payload with the HTTP code "209 X-NITRO-WARNING".

  • Authenticated access for individual NITRO operations: NITRO allows you to logon to the NetScaler appliance to perform individual operations. You can use this option instead of creating a NITRO session (using the login object) and then using that session to perform all operations,

    To do this, you must specify the username and password in the request header of the NITRO request as follows:



    Note: In such cases, make sure that the request header DOES not include the following:



Mandatory parameters are marked in red and placeholder content is marked in <green>.

get (all)

URL: http://<netscaler-ip-address>/nitro/v1/config/nstrace




Use this query-parameter to get nstrace resources based on additional properties.

HTTP Method: GET

Request Headers:

Cookie:NITRO_AUTH_TOKEN=<tokenvalue> Accept:application/json


HTTP Status Code on Success: 200 OK HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the errorResponse Headers:


Response Payload:

{ "nstrace": [ {
nodeid:<Double_value>      "state":<String_value>,
Was this article helpful?