cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3059
Views
0
Helpful
6
Replies

Is there an equivalent of 'exec prompt timestamp' on terminal in NX-OS?

HITOSHIYAMADA8041
Spotlight
Spotlight

Is there an equivalent of 'exec prompt timestamp' on terminal in NX-OS?

1 Accepted Solution

Accepted Solutions

Unfortunately, there is not equivalent of that command in NX-OS, but you can concatenate the execution of commands in NX-OS as follows:

#show clock ; show processes cpu sort ; show <COMMAND>

Cheers.

View solution in original post

6 Replies 6

Unfortunately, there is not equivalent of that command in NX-OS, but you can concatenate the execution of commands in NX-OS as follows:

#show clock ; show processes cpu sort ; show <COMMAND>

Cheers.

Oh, There is not...

OK! Thank you.

Then you should add this feature to NX OS as fast as possible, concatenation is just a dirty workaround and also you have no command termination and the help feature (?)  after the ;

 

host001# show clock ; show ptp ?
^
% Invalid parameter detected at '^' marker.
host001# show clock ; show ptp int eth 1/52
09:23:39.295 CST Sat Apr 11 2020
Time source is NTP
^
% Invalid command at '^' marker.
host001# show clock ; show ptp coun int eth 1/52
09:23:50.556 CST Sat Apr 11 2020
Time source is NTP

PTP Packet Counters of Interface Eth1/52:
----------------------------------------------------------------
Packet Type TX RX
---------------- -------------------- --------------------
Announce 685676 0
Sync 10900569 0
FollowUp 10900569 0
Delay Request 0 10612532
Delay Response 10612532 0
PDelay Request 0 0
PDelay Response 0 0
PDelay Followup 0 0
Management 1371785 0
----------------------------------------------------------------
host001#

Hi,

 

Not sure if it matches with what you want to achieve, but you can check watch command.

Example:

N9K# watch show processes cpu sort
Every 2.0s:  vsh -c "show processes cpu sort "                             N9K: Sat Apr 11 10:07:55 2020



PID    Runtime(ms)  Invoked   uSecs  1Sec    Process
-----  -----------  --------  -----  ------  -----------
 2716      9087033  49583293    183   1.04%  tahusd

Regards,

Sergiu

That's actually not the intention of the "exec prompt timestamp". This configuration command is very handy as it prints a timestamp to every command you enter before the output is displayed. The advantage is you cannot forget it and applys to all commands not only to "watching" something. Timestamps are extremely useful in debugging and trouble shooting, especially when you are under pressure.






Hello,

I fully agree about the importance of timestamps ^_^

If you need timestamps for all your commands (config, exec or show commands), you have two options:

1. Enable terminal log-all and use show accounting log for tracking all commands

conf t
terminal log-all show accounting log

Pros: you have a very long history of all commands, timestamp and user who performed the command. The logs are saved in NVRAM, so the history is preserved even after reload

Cons: if you want to reuse the commands, you will need to filter them manually.

2. Use "show cli history"

show cli history
show cli history exec-mode
show cli history config-mode
show cli history unformatted

Pros: you have the time for all commands performed in the current session, along with the timestamp. You can filter them by exec/config mode, and even use 'unformatted' option to display the commands copy-paste ready.

Cons: command will only show the cmds performed in current session. 

 

Hope it helps,

Sergiu

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: