The info-center timestamp command sets the time stamp format in the output debugging, alarm or log information.
The undo info-center timestamp command restores the current configuration.
By default, the date timestamp is used in alarm, log and debugging information. Debugging information is accurate to milliseconds, and alarm and log information is accurate to seconds.
info-center timestamp { log | trap | debugging } { boot | { date | short-date | format-date } [ precision-time { tenth-second | millisecond | second } ] } [ without-timezone ]
undo info-center timestamp { debugging | log | trap }
| Parameter | Description | Value |
|---|---|---|
| debugging | Indicates the debugging information. | - |
| log | Indicates the log information. | - |
| trap | Indicates the alarm information. | - |
| boot | Indicates the time passed since the system starts. It is a relative time period. The format is xxxxxx.yyyyyy. xxxxxx is the high 32 bits of the milliseconds passed since the system starts while yyyyyy is the low 32 bits of the milliseconds passed since the system starts. | - |
| date | Indicates the date and time of the system. In the format of mm dd yyyy hh:mm:ss. | - |
| short-date | Indicates the date and time in a short-date format, mm dd hh:mm:ss. | - |
| format-date | Indicates the other format of the current system date and time. The date is displayed in the format of YYYY-MM-DD hh:mm:ss, that is, year-month-day-hour-minute-second. | - |
| precision-time | Indicates the accuracy of the timestamp. | - |
| second | Indicates that the accuracy of the timestamp is second. | - |
| tenth-second | Indicates that the accuracy of the timestamp is 0.1 second. | - |
| millisecond | Indicates that the accuracy of the timestamp is millisecond. | - |
| without-timezone | Specifies a timestamp to filter timezone information. | - |
When date is used, the following table describes each field.
Field |
Description |
Value |
|---|---|---|
yyyy |
Year |
Four numbers. |
mm |
Month |
Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov or Dec. |
dd |
Day |
If the day is before 10, insert a space before the day. For example, " 7". |
hh:mm:ss |
Detailed local time |
hh is in 24-hour format and ranges from 00 to 23. mm and ss are in the range of 00 to 59. |
When the precision of time stamp is tenth-second or millisecond, the log generated at the same time will be recorded by sequence.
# Set the time stamp format of alarm information as boot.
<sysname> system-view [sysname] info-center timestamp trap boot
# Set the timestamp accuracy of the log, alarm, and debugging information.
<sysname> system-view [sysname] info-center timestamp log date precision-time millisecond [sysname] info-center timestamp debugging date precision-time tenth-second [sysname] info-center timestamp trap date precision-time millisecond