1 About This Document
During maintenance and troubleshooting on the live network, information that should have been obtained is not obtained or incorrect information is obtained because, frontline engineers do not know log files on routers and how to obtain log information, especially diagnostic logs. The diagnostic log information is often incorrectly taken as the output of the display diagnostic-information command, which reduces locating efficiency to some extent. This document describes how to obtain log information on routers running common versions.
2 Log File Description
2.1 V600R00X version:
2.1.1 Location of Logs
Default: cfcard2:/log/
Backup: cfcard:/log/
Run the display logfile-path Command to Check the Location of Log
<R12> display logfile-path
Info: Current log file path is "cfcard2:/log".
Logs are classified into system logs and diagnostic logs.
<R12>cd cfcard2:/log
<R12>dir
Directory of cfcard2:/log/
Idx Attr Size(Byte) Date Time FileName
0 -rw- 7,022,635 Aug 01 2017 12:15:50 log.log
1 -rw- 6,029,339 Aug 01 2017 12:15:50 log.dblg
2 -rw- 262,144 Jul 31 2017 06:17:32 logfilebuf.dat
3 -rw- 375,993 Dec 05 2016 01:35:22 2016-12-05.01-35-08.log.zip
4 -rw- 554,364 Nov 24 2016 08:11:32 2016-11-24.08-11-15.log.zip
5 -rw- 181,259 Jul 03 2017 06:46:22 scene.dblg
6 -rw- 1,119,463 Nov 19 2016 19:58:24 2016-11-19.19-58-02.dblg.zip
7 -rw- 461,126 Nov 20 2016 13:58:18 2016-11-20.13-58-02.log.zip
8 -rw- 470,947 Nov 22 2016 14:06:46 2016-11-22.14-06-30.log.zip
2.1.2 System Logs
System logs are log files ended with log.log or log.zip.
l A file ended with log.log records the latest logs generated on a device. If the size of the logs increases to a specified value, the log file is automatically saved as another file (*.log.zip).
l A file ended with log.zip has its name contain the date and time when the log file was created. The .zip file contains log information generated before the date and time.
File name examples:
l log.log
l 2016-12-05.01-35-08.log.zip
2.1.3 Diagnostic Logs (.dblg)
Diagnostic log files are ended with log.dblg or dblg.zip.
A log.dblg file records the latest logs generated on a device. If the size of the logs increases to a specified value, the log file is automatically saved as another file (*.dblg.zip). A file ended with log.zip has its name contain the date and time when the log file was created.
File name examples:
l log.dblg
l 2016-11-19.19-58-02.dblg.zip
3 KPI File Description
Routers running mainstream versions are capable of recording KPIs. This function enables a router to record packet loss information and KPI changes. During troubleshooting, the KPI files must be also collected.
3.1 KPI File Name Description
Existing file: lpustat.dat
Historical compressed file: yyyy-mm-dd.hh.mm.ss.dat.zip
The date contained in the file name of the compressed file indicates when the last record was generated. Note that the date of the KPI file is not computed within a specific time zone and may differ from your local time.
3.2 Directories for Storing KPI Files in V600R00X
KPI files are saved in one of the following directories:
Default: slave#cfcard2:/LPUSTAT/
Alternate 1: slave#cfcard:/LPUSTAT/
Alternate 2: cfcard2:/LPUSTAT/
Alternate 3: cfcard:/LPUSTAT/
If the default directory does not exist, access alternative 1. If alternative 1does not exist, access alternative 2. Repeat this step until you access a valid directory. (Note that the default directory is on cfcard2 of the slave main control board.)
4 Obtaining Operation Logs
4.1 Before Obtaining Logs, Saving Them to Ensure that Existing Information Is Saved on a CF Card
4.2 Confirming the Range of Logs to Be Obtained
1. If a master/slave main control board switchover occurs or a device restarts, obtain the log and KPI files on both the master and slave main control boards.
2. If the log, diagnostic log, and KPI files are compressed and stored, obtain the files whose names contain the date later than or equal to the date when the latest logs to be collected were generated. To avoid missing some log information, collect the compressed files contain the dates later than that you need.
Run the dir command to query which compressed files need to be obtained using the wildcard. For example, to view all files compressed in July 2017, run the dir 2017-07-*.zip command:
<R12>cd cfcard2:/log
<R12>dir 2017-07-*.zip
Directory of cfcard2:/log/
Idx Attr Size(Byte) Date Time FileName
0 -rw- 564,625 Jul 03 2017 06:48:48 2017-07-03.06-48-32.log.zip
1 -rw- 600,105 Jul 10 2017 06:31:04 2017-07-10.06-30-49.log.zip
2 -rw- 594,247 Jul 17 2017 06:29:18 2017-07-17.06-28-43.log.zip
3 -rw- 1,257,102 Jul 18 2017 23:56:00 2017-07-18.23-55-35.dblg.zip
4 -rw- 582,794 Jul 24 2017 06:23:22 2017-07-24.06-22-46.log.zip
5 -rw- 582,304 Jul 31 2017 08:16:42 2017-07-31.06-18-32.log.zip
2,000,640 KB total (1,870,304 KB free)
3. System logs, diagnostic logs, and KPI files are mandatory and cannot be missing.
4.3 Obtaining Files
Use FTP obtain logs, diagnostic logs, and KPI files from a local PC.
Run the binary command in the FTP client view to set the transmission mode to binary mode. Otherwise, obtained files fail to be parsed.
<R12>cd cfcard2:/log
<R12>ftp 128.3.162.172
Trying 128.3.162.172 ...
Press CTRL+K to abort
Connected to 128.3.162.172.
220 FTP Server ready.
User(128.3.162.172:(none)):8090
331 Password required for 8090.
Enter password:
230 User 8090 logged in.
[ftp]binary
200 Type set to I.
[ftp]put log.log
200 Port command successful.
150 Opening data connection for log.log.
226 File received ok
FTP: 7073168 byte(s) sent in 11.841 second(s) 597.34Kbyte(s)/sec.
[ftp]put log.dblg
200 Port command successful.
150 Opening data connection for log.dblg.
226 File received ok
FTP: 6053735 byte(s) sent in 10.077 second(s) 600.74Kbyte(s)/sec.
[ftp]lcd cfcard2:/lpustat/
The current local directory is cfcard:/lpustat.
[ftp]put lpustat.dat
200 Port command successful.
150 Opening data connection for lpustat.dat.
226 File received ok
FTP: 3390469 byte(s) sent in 6.988 second(s) 485.18Kbyte(s)/sec.
[ftp]bye
221 Goodbye.
You must obtain the log.log, log.dblg, and lpustat.dat files for all problems and files that contain the dates both earlier and later than the date when a fault occurs.
4.4 Checking Whether the Obtained Files Are Correct
1. If a compressed file is obtained, decompress the file locally and check whether an error occurs during the FTP process.
2. Check whether the obtained log.log file can be opened.