User Tools

Site Tools


ruijie:switch:copying_log_to_flash

COPYING LOG TO FLASH

I. Requirements

1. Copy logs with a severity higher than debugging in the flash ,then set size of each log file to 128Kbytes.

2. Set size of log buffer to 128Kbytes.

3. Record action when user logs in and operates.

4. Add system name , sequence number and time stamps to each log entry.

II. Network Topology

III. Configuration Tips

System doesn't copy logs from buffer to flash once finishing configuration, and it costs about half an hour to copy logs from buffer to flash , or the log buffer exceeds.

IV. Configuration Steps

Ruijie>enable

Ruijie#configure terminal

Ruijie(config)#logging file flash:syslog 6 ——>set log file name to “syslog” and system copies all

                                                           logs with severity from 0 to 6 to flash

Ruijie(config)#logging file flash:syslog 131072 ——>set size of each log file in flash to 128K

Ruijie(config)#logging buffered 131072 ——>set log buffer size to 128K

Ruijie(config)#logging userinfo ——>record actions when user logs in

Ruijie(config)#logging userinfo command-log ——>record actions when user operates commands

Ruijie(config)#service sysname ——>add system name to each log entry

Ruijie(config)#service sequence-numbers ——>add sequence number to each log entry

Ruijie(config)#service timestamps ——>add time stamps to each log entry

Ruijie#wr

Note:We suggest you to set log buffer size to 128K because the buffer size is too small by defaut.

If the 1st log file is full , system copies logs to 2nd log file , then the 3th log file ……there're 16 log files at most in the same time , and if all 16 log files are full ,the new log entry overwrites the old one , so Log file never takes up the whole flash room.

Enter “more flash:xxx” privilege EXEC command to display log entries and “delete flash:xxx” privilege EXEC command to delete log file in flash.

v. Verification

1. This example shows how to display logs in buffer

2. Enter “dir” privilege EXEC command to check log files in flash

3. This example shows how to display logs in flash

4. Enter “clear logging” privilege EXEC command to clear logs in buffer

ruijie/switch/copying_log_to_flash.txt · Last modified: 2020/09/17 21:39 by aperez

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki