Adding Comments to Log Files

Top  Previous  Next

In some cases it may be helpful to have comments interleaved into the detailed trace log file.  For example, during lab testing, you may be sending many commands to a device and plan to review the detailed log file after the script completes.  However, the exact output your expecting to see from each of the commands you are sending may not be clear.  This is accomplished by putting the keyword COMMENT (ALL CAPS) followed by your comment, in the command file.  There MUST NOT be any spaces before the word COMMENT.  The following scripts support this feature:

 

cisco_send_cmds

cisco_send_cmds_rcf

pix_send_cmds

catos_send_cmds

generic_send_cmds

nxos_send_cmds

 

 

Below is a sample command file (used for the cisco_send_cmds script) showing the COMMENT feature as well as the SLEEP feature.

 

clear log
 
COMMENT: Baseline Commands before any clears
show ip eigrp neighbors
show ip eigrp neighbors detail
COMMENT: End of Baseline Commands
 
COMMENT: Start Command Test
clear ip eigrp neighbors 10.1.1.1
show ip eigrp neighbors
COMMENT: Wait 30 seconds
SLEEP 30
COMMENT: Only neighbor 10.1.1.1 should be reset with an new uptime
show ip eigrp neighbors
 
COMMENT: Start Command Test
clear ip eigrp neighbors
show ip eigrp neighbors
COMMENT: Wait 30 seconds
SLEEP 30
COMMENT: All neighbors should be up with a new uptime
show ip eigrp neighbors