How Date and Time Stamp is Saved in newnslog File and Interpreted by nsconmsg Utility of NetScaler

How Date and Time Stamp is Saved in newnslog File and Interpreted by nsconmsg Utility of NetScaler

book

Article ID: CTX121292

calendar_today

Updated On:

Description

This article contains information about the time operations related to the newnslog and nsconmsg files in the NetScaler appliance.

Background

A computer stores its current time as the number of time units that have elapsed after a specified epoch or the reference date. The UNIX epoch of 01/01/1970:0:0 UTC is the most commonly used epoch in the modern computers.

For example, consider a computer that has clock circuit oscillating approximately once per second. Each time the clock circuit oscillates, an interrupter handler is run and a kernel variable is incremented by one. When the computer is switched off, the battery of the computer powers the similar operations.

When a user runs commands such as the date command, a human readable date and time stamp, such as Tue May 19 19:51:37 GMT 2009, is printed based on calculation of the value of the kernel variable and the time zone setting of the system.

It must be noted that when time information is printed in human readable ASCII version, the time zone information must be kept to ensure that the time stamp is meaningful. For example, the May 19 19:51:37 2009 date and time stamp does not uniquely map to a specific time. However, the May 19 19:51:37 GMT 2009 date and time stamp maps to the GMT time zone.

The newnslog Time Information

When a NetScaler appliance saves the performance change record, such as a counter or an audited command, the corresponding time information is saved as number of time units elapsed after epoch. This information is stored as a binary integer based on the clock of the NetScaler appliance.

When you run the nsconmsg utility to display the change record either from a newnslog file or the kernel buffer of appliance on which the command is run, the nsconmsg utility reads the binary time stamp of the record and converts the value to ASCII version. The converted time is based on the time zone settings of the appliance on which you run the nsconmsg utility.

The following example displays the time zone setting of an appliance on which the nsconmsg utility is run. The sample displays only changes in the interpretation of time stamps saved in the newnslog file. Notice the date and time highlighted in bold face for your reference.

# date
Tue May 19 13:21:29 PDT 2009

# nsconmsg80 -K newnslog -d auditedcmd

Command 'NSAPI_SETRACEBUFS' executed on Wed Apr 29 14:17:28 2009

# rm /etc/localtime

# date
Tue May 19 20:22:20 GMT 2009
 

# nsconmsg80 -K newnslog -d auditedcmd

Command 'NSAPI_SETRACEBUFS' executed on Wed Apr 29 21:17:28 2009

Additional Resources

Refer to the Computing section of the Epoch Wiki page for more information.

Issue/Introduction

This article contains information about the time operations related to the newnslog and nsconmsg files in the NetScaler appliance.