07-09-2019 10:19 PM
Is there an equivalent of 'exec prompt timestamp' on terminal in NX-OS?
Solved! Go to Solution.
07-11-2019 10:29 AM - edited 07-11-2019 10:32 AM
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.
07-11-2019 10:29 AM - edited 07-11-2019 10:32 AM
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.
07-11-2019 05:54 PM - edited 07-11-2019 05:55 PM
Oh, There is not...
OK! Thank you.
04-11-2020 12:24 AM
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#
04-11-2020 03:10 AM
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
04-11-2020 07:03 AM
04-11-2020 10:37 AM - edited 04-11-2020 10:39 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide