Saturday, October 24, 2020

Netscaler Troubleshooting using command line

 

Netscaler Troubleshooting using command line

Credit: https://c4rm0.wordpress.com/netscaler-troubleshooting-using-command-line/

In this blog i will go through some Netscaler CLI/Shell commands i use for troubleshooting Netscaler issues and commands i use to test and gather information about the configuration on the Netscaler  

First of all download and open up putty and connect to the NSIP using the nsroot credentials

putty

 

putty1

Show Commands – are useful for gathering information such as which features and modes are enabled and things such as  Netscaler IP’s, static routes, VLANS and interfaces. Below is a list of show commands i typically use

show ns info

shell2shell3

Show version

shell4

Show interface

shell5

show ns ip

show route

shell7

show vlan

shell45

show hardware

shell8

show lb vserver

show persistentsessions

show ha node

shell12

show vpn vserver

shell13

show aaa stats

shell14

REPORT THIS AD

show aaa session

shell15

show service

shell16

show running | more

REPORT THIS AD
REPORT THIS AD

show connectiontable | grep IPaddresss

shell22

Troubleshooting commands – are useful when troubleshooting issues such as connectivity and performance issues as well as authentication issues and configuration issues

Ping

shell18

traceroute

shell19

Telnet

shell20

Show techsupport (The capture can be pulled off the netscaler using Winscp and uploaded to Citrix Insight Service / Citrix smart check for Analysis)

REPORT THIS AD

cat /var/log/ns.log (read the ns.log file)

shell39

nsconmsg -K newnslog -d event (view the newnslog file)

nsconmsg -K newnslog -d consmsg (view the console messages)

REPORT THIS AD
REPORT THIS AD

nsconmsg -d current -g pol_hits (View the policy hits for a user logging in and connecting)shell36

cd /tmp cat aaad.debug (View authentication information)

shell34shell35

REPORT THIS AD

Network Packet captures – Are usefull when you are troubleshooting connectivity problems such as firewalls between your Netscalers and backend VDA’s

nstcpdump.sh host 192.168.3.219 and port 2598

start nstrace -size 0 -filter “connection.ip.ne(127.0.0.1) && connection.ip.eq(192.168.3.210)”

shell32

packet captures can be found in cd /var/nstrace and pulled off with winscp

shell33

Important  locations on the Netscaler

cd /var/log

cd /var/nslog

cd /var/crash

shell26

cd /var/core

shell27

cd /nsconfig

REPORT THIS AD

cd /nsconfig/ssl

cd /nsconfig/license

Other Commands

save c or save config

shell44

set ha node -hastatus stayprimary/staysecondary

shell42shell43

stat aaa

shell46

stat lb vserver

shell47

stat ssl

shell48

All done 🙂

No comments:

Post a Comment