How to Determine the Time Since Last High Availability Node State Change from a NetScaler newnslog File

How to Determine the Time Since Last High Availability Node State Change from a NetScaler newnslog File

book

Article ID: CTX121847

calendar_today

Updated On:

Description

This article details how to determine the time since last high availability node state change from a NetScaler newnslog file.


Instructions

To determine the state of the last High Availability (HA) state change on the NetScaler, you can use the CLI command stat ha node. However, if you do not have access to the running NetScaler, or you want to know about previous HA state changes, you can find this information in the newnslog file by using nsconmsg from the shell:
nsconmsg -K /var/nslog/newnslog -s time=<time> -T 1 -g activemode -d current
Note: The time switch will not work if you use -s time=5Mar2015, the day needs to be 2 digits, that is, 05Mar2015.

Example 1

User-added image

As you can see by the existence of the activemode counter, this NetScaler is in Primary state (if this NetScaler is configured as a stand-alone unit, then this counter indicates the duration of NetScaler being active).

In this example, referring to the time recorded in the line beginning with "reltime:mili" as the actual time this data was sampled, and "totalcount-val" column for the duration that the NetScaler has been in the current HA state, you can see that on June 23, 2009 at 21:29:08, this NetScaler had been primary for 0 days, 01 hours, 14 minutes, and 02 seconds. Subtracting the sys_cur_activemode_duration from the data sample time, you can see that the last HA state change for this NetScaler occurred on June 23, 2009 at 20:15:06.

Example 2

User-added image

As you can see by the existence of the inactivemode counter, this NetScaler is in the Secondary state (this counter also exists and increments if the NetScaler is in the "NOT UP" state).

In this example, referring to the time recorded in the line beginning with "reltime:mili" as the actual time this data was sampled, and "totalcount-val" column for the duration that the NetScaler has been in the current state, you can see that on June 23, 2009 at 21:29:12, this NetScaler had been secondary for 0 days, 01 hours, 04 minutes, and 40 seconds. Subtracting the sys_cur_inactivemode_duration from the data sample time, you can see that the last HA state change for this NetScaler occurred on June 23, 2009 at 20:24:32.

If you do not know, or do not want to specify the time in the nsconmsg command, you can use the following command:
nsconmsg -K /var/nslog/newnslog -g activemode -s disptime=1 -d current

Example 3

User-added image

In this example, you have many lines of output but you only need to reference one. Referring to the time recorded at the end of the line as the actual time this data was sampled, and "totalcount-val" column for the duration that the NetScaler has been in the current state, you can see that on June 23, 2009 at 22:43:49, this NetScaler had been Primary for 0 days, 02 hours, 28 minutes, and 44 seconds. Subtracting the sys_cur_activemode_duration from the data sample time, you can see that the last HA state change for this NetScaler occurred on June 23, 2009 at 20:15:05.

Issue/Introduction

This article details how to determine the time since last high availability node state change from a NetScaler newnslog file.