It becomes necessary sometimes to collect the logs from the SPC card for analysis depending on the problem being faced. Engineering might request these logs or JTAC can pro-actively request /var/log/ from the SPC card
Use Cases
Some of the situations where logs from the SPC3 card are necessary:
SPC3 card stuck in Present State
SPC3 card offline
SPC3 Card comes online in Slot 1 but not Slot 0
root@JTAC-1> show chassis fpc node0: -------------------------------------------------------------------------- Temp CPU Utilization (%) CPU Utilization (%) Memory Utilization (%) Slot State (C) Total Interrupt 1min 5min 15min DRAM (MB) Heap Buffer 0 Offline ---Chassis connection dropped--- 1 Empty 2 Empty 3 Online 31 17 0 17 17 16 2048 20 18 4 Empty 5 Empty root@root@JTAC-1> show chassis fpc detail no-forwarding Slot 0 information: State Offline Reason Chassis connection dropped Temperature 37 degrees C / 98 degrees F FIPS Capable False FIPS Mode False Max power consumption 650 Watts Slot 3 information: State Online Temperature 46 degrees C / 114 degrees F Total CPU DRAM 2048 MB Total RLDRAM 1036 MB Total DDR DRAM 6656 MB FIPS Capable False FIPS Mode False Start time 2023-10-23 04:01:22 +03 Uptime 29 minutes, 52 seconds Max power consumption 570 Watts
Caveats:
In order to access the console of SPC3 card we have two UART ports available:
$ cty fpcx picy cty -0 fpcx picy, or cty -1 fpcx picy Ctrl + / : To send Ctrl + C within cty Ctrl + ^ : To send break within cty Ctrl + C : To exit cty
$ /var/re/ directory in SPC3 card is /tmp/ directory on the RE
Step 1: From the shell issue cty fpc0 pic0
labroot@JTAC-1> start shell user root root@JTAC-1:/var/home # root@JTAC-1:/var/home # cty fpc0 pic0
Step 2: Archive the log files in /var/log/ using following command and save it in /var/re/ directory
root@b06-25-fpc0:~# tar -cvzf /var/re/fpc0pic0.logs.tar.gz /var/log/* tar: Removing leading `/' from member names /var/log/auth.log /var/log/boot /var/log/boot_history /var/log/cron.log /var/log/daemon.log /var/log/daemon.log.1 /var/log/daemon.log.2.gz /var/log/debug /var/log/debug.1 /var/log/debug.2.gz /var/log/dmesg /var/log/kern.log /var/log/lastlog /var/log/linux_error.log /var/log/messages /var/log/pfe-app-spc3.log.latest /var/log/pfe.log /var/log/rsh_failures /var/log/sensord.log /var/log/snmpd.log /var/log/syslog /var/log/syslog.1 /var/log/syslog.2.gz /var/log/user.log /var/log/wtmp
root@b06-25-fpc0:~# ls -l /var/re/ | grep -i fpc0 -rw-r--r-- 1 nobody root 4193546 Nov 8 14:38 fpc0pic0.logs.tar.gz root@b06-25-fpc0:~#
Step 3: Exit and login to pic 1, cty fpc0 pic1 and repeat Step 2 for pic 1,
root@b06-25-fpc0:~# tar -cvzf /var/re/fpc0pic1.logs.tar.gz /var/log/* tar: Removing leading `/' from member names /var/log/auth.log /var/log/boot /var/log/boot_history /var/log/cron.log /var/log/daemon.log /var/log/daemon.log.1 /var/log/daemon.log.2.gz /var/log/debug /var/log/debug.1 /var/log/debug.2.gz /var/log/dmesg /var/log/kern.log /var/log/lastlog /var/log/linux_error.log /var/log/messages /var/log/pfe-app-spc3.log.latest /var/log/pfe.log /var/log/rsh_failures /var/log/sensord.log /var/log/snmpd.log /var/log/syslog /var/log/syslog.1 /var/log/syslog.2.gz /var/log/user.log /var/log/wtmp root@b06-25-fpc0:~# ls -lrth //var/re/ | grep fpc -rw-r--r-- 1 nobody root 4193546 Nov 8 14:38 fpc0pic0.logs.tar.gz -rw-r--r-- 1 nobody wheel 4196263 Nov 8 14:42 fpc0pic1.logs.tar.gz root@b06-25-fpc0:~#
Step 4: Exit from the SPC card and verify the files are existent in /tmp/folder
root@JTAC-1:/var/tmp # ls -l | grep fpc -rw-r--r-- 1 nobody root 4193546 Nov 8 14:38 fpc0pic0.logs.tar.gz -rw-r--r-- 1 nobody wheel 4196263 Nov 8 14:42 fpc0pic1.logs.tar.gz
Step 6: SCP the files out of the device