The info-center timestamp command sets the timestamp format for output information.
The undo info-center timestamp command restores the default timestamp format for output information.
The date format is used as the timestamp format for output information by default.
info-center timestamp log boot [ without-timezone ]
info-center timestamp trap boot [ without-timezone ]
info-center timestamp debugging boot [ without-timezone ]
info-center timestamp log date [ precision-time second ] [ without-timezone ]
info-center timestamp log date precision-time tenth-second [ without-timezone ]
info-center timestamp log date precision-time millisecond [ without-timezone ]
info-center timestamp log short-date [ precision-time second ] [ without-timezone ]
info-center timestamp log short-date precision-time tenth-second [ without-timezone ]
info-center timestamp log short-date precision-time millisecond [ without-timezone ]
info-center timestamp log format-date [ precision-time second ] [ without-timezone ]
info-center timestamp log format-date precision-time tenth-second [ without-timezone ]
info-center timestamp log format-date precision-time millisecond [ without-timezone ]
info-center timestamp debugging date precision-time second [ without-timezone ]
info-center timestamp debugging date precision-time tenth-second [ without-timezone ]
info-center timestamp debugging date [ precision-time millisecond ] [ without-timezone ]
info-center timestamp debugging short-date precision-time second [ without-timezone ]
info-center timestamp debugging short-date precision-time tenth-second [ without-timezone ]
info-center timestamp debugging short-date [ precision-time millisecond ] [ without-timezone ]
info-center timestamp debugging format-date precision-time second [ without-timezone ]
info-center timestamp debugging format-date precision-time tenth-second [ without-timezone ]
info-center timestamp debugging format-date [ precision-time millisecond ] [ without-timezone ]
info-center timestamp trap date [ precision-time second ] [ without-timezone ]
info-center timestamp trap date precision-time tenth-second [ without-timezone ]
info-center timestamp trap date precision-time millisecond [ without-timezone ]
info-center timestamp trap short-date [ precision-time second ] [ without-timezone ]
info-center timestamp trap short-date precision-time tenth-second [ without-timezone ]
info-center timestamp trap short-date precision-time millisecond [ without-timezone ]
info-center timestamp trap format-date [ precision-time second ] [ without-timezone ]
info-center timestamp trap format-date precision-time tenth-second [ without-timezone ]
info-center timestamp trap format-date precision-time millisecond [ without-timezone ]
undo info-center timestamp log
undo info-center timestamp debugging
undo info-center timestamp trap
Parameter | Description | Value |
---|---|---|
without-timezone |
The time zone information is not included. |
- |
log |
Indicates logs. |
- |
boot |
Uses relative time (the time elapsed since system startup) as the timestamp. The format is xxxxxx.yyyyyy. xxxxxx is the higher order 32 bits of the milliseconds elapsed since system startup; yyyyyy is the lower order 32 bits of the milliseconds elapsed since system startup. |
- |
trap |
Indicates traps. |
- |
debugging |
Indicates debugging information. |
- |
date |
Uses the current system date and time as the timestamp. The format is mm dd yyyy hh:mm:ss. |
- |
precision-time |
Sets the timestamp precision. |
- |
second |
Sets the precision of the timestamp to seconds. |
- |
tenth-second |
Sets the precision of the timestamp to 0.1 second. |
- |
millisecond |
Sets the timestamp precision to milliseconds. |
- |
short-date |
Uses the short date format. The short date format is almost the same as the date format, except that the year is not displayed in the short date format. |
- |
format-date |
Uses the full timestamp format. The format is YYYY-MM-DD hh:mm:ss. |
- |
Usage Scenario
To meet different time habits in various places, set the timestamp format in the information. For example, you can set the timestamp format properly, so that the year is not displayed, or the timestamp is displayed as the time elapsed since the system starts.
Precautions
When the precision of the timestamp precision is 0.1 second or a matter of milliseconds, timestamps are added to the information generated at a time in the information generation sequence.
<HUAWEI> system-view [~HUAWEI] info-center timestamp trap boot
<HUAWEI> system-view [~HUAWEI] info-center timestamp log date precision-time millisecond [~HUAWEI] info-center timestamp debugging date precision-time tenth-second [~HUAWEI] info-center timestamp trap date precision-time millisecond