Intro

Use of a terminal emulation programs such as SecureCRT to connect to network equipment is pretty common for networking professionals. One of the advantages of using a terminal emulation program is that they usually have some sort of logging capability.

This will be a quick post to document my SecureCRT logging setup for future Brads benefit. Feel free to borrow and customise to your liking.

Logging Setup

Navigate to the log file settings.

Log File Name

Enter the log file location.

text
C:\logfiles\%Y-%M-%D–-%h-%m-%s--%S--%H.txt

This generates logfiles named with the following structure 2021-04-29–-17-14-00--ubuntu2004--192.168.95.101.txt making them easily sortable and searchable.

Options

Enable the following options:

  • Start log upon connect
  • Append to file
  • Start new log at midnight

Custom Log Data

Upon connect - Places a banner at the top of the logfile.

text
##### START LOG %S %H %Y-%M-%D %h:%m:%s #####

Upon disconnect - Places a banner at the end of the logfile.

text
##### STOP LOG %S %H %Y-%M-%D %h:%m:%s #####

On each line - Prefixes each line with a timestamp followed by a hash rocket.

text
%Y-%M-%D %h:%m:%s => 
Note
There is a blank space ( ) after the hash rocket (=>).

Once this is completed, press OK and change all sessions at the prompt.

Log File Example

file
# 2021-04-29–-17-14-00--ubuntu2004--192.168.95.101.txt
2021:04:29.17:14:00 => ##### START LOG ubuntu2004 192.168.95.101 2021-04-29 17:14:00 #####
2021-04-29 17:14:00 => Welcome to Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-70-generic x86_64)
2021-04-29 17:14:00 => 
2021-04-29 17:14:00 =>  * Documentation:  https://help.ubuntu.com
2021-04-29 17:14:00 =>  * Management:     https://landscape.canonical.com
2021-04-29 17:14:00 =>  * Support:        https://ubuntu.com/advantage
2021-04-29 17:14:00 => 
2021-04-29 17:14:00 =>   System information as of Thu 29 Apr 2021 07:13:59 AM UTC
2021-04-29 17:14:00 => 
2021-04-29 17:14:00 =>   System load:  0.04               Processes:              242
2021-04-29 17:14:00 =>   Usage of /:   17.5% of 48.47GB   Users logged in:        1
2021-04-29 17:14:00 =>   Memory usage: 20%                IPv4 address for ens33: 192.168.95.101
2021-04-29 17:14:00 =>   Swap usage:   0%                 IPv4 address for ens34: 192.168.226.130
2021-04-29 17:14:00 => 
2021-04-29 17:14:00 => 
2021-04-29 17:14:00 => 52 updates can be installed immediately.
2021-04-29 17:14:00 => 0 of these updates are security updates.
2021-04-29 17:14:00 => To see these additional updates run: apt list --upgradable
2021-04-29 17:14:00 => 
2021-04-29 17:14:00 => 
2021-04-29 17:14:00 => *** System restart required ***
2021-04-29 17:14:00 => Last login: Thu Apr 29 07:12:01 2021 from 192.168.95.1
2021-04-29 17:14:01 => 
2021-04-29 17:14:01 => ubuntu2004 ❯ ~ 
2021-04-29 17:14:02 => at 2021-04-29 17:14:00 ❯❯ 
2021:04:29.17:14:10 => ##### STOP LOG ubuntu2004 192.168.95.101 2021-04-29 17:14:10 #####

Outro

Thats it, thats the post.