The latest FPCs that can only run on vmhost based RE generally have its base OS, such as MPC7E , LC9600, LC4800 and MPC10E on MX or FPC3 on PTX. When those FPCs get an error, the message logs on its base OS might need further troubleshooting.
This article explains how to gather the /var/log/* from FPC based-OS.
1a. Enter the RE shell using root, and then rsh to the fpc shell. This example is for MPC8, MPC9:
> start shell user root <enter root password> # rsh -Ji fpc3 root@fpc3:~#
1b. For Unified Line Cards (ULCs) like MPC10, MPC11, LC9600 and successors, 'rsh' is not supported. Instead use 'ssh', however the hostname "fpc3" may not resolve, so its better to use the IP, for example: "ssh -Ji [email protected]" . To find the IP, use 128.0.0.X - where X equals "16 + fpc slot number", so 128.0.0.19 is fpc3 here. Example:
user1@MX2010> start shell user root Password:root@MX2010:/var/home/user1 # ssh -Ji [email protected]--- JUNOS 20.3<build>-EVO Linux ...root@MX2010-fpc3:/#
1c. Here is another way to get into the FPC OS: user1@MX960> start shell user root Password:root@MX960-re0:/var/home/labroot # cliroot@MX960-re0> start shell pfe network base-os fpc10 Last login: Thu Jan 22 12:51:01 PST 2026 from re0 on pts/0root@MX960-re0-fpc10:~#
2. Archive /var/log/* to /var/tmp under FPC OS:
root@fpc3:~# cd /var/tmp root@fpc3:/var/tmp# tar -zcf ./var-log-fpc3.tgz /var/log/* root@fpc3:/var/tmp# ls -Fl var-log* -rw-r--r-- 1 root root 69147 Jul 4 14:22 var-log-fpc3.tgz
3. Copy archived file back to RE:
root@fpc3:/var/tmp# scp var-log-fpc3.tgz 128.0.0.1:/var/tmp/<enter the root password again>
root@fpc3:/var/tmp# rm var-log-fpc3.tgz root@fpc3:/var/tmp# exit <back to CLI mode> > file list /var/tmp/ detail -rw-r--r-- 1 root wheel 69147 Jul 4 14:25 var-log-fpc3.tgz
> file list /var/tmp/ detail -rw-r--r-- 1 root wheel 69147 Jul 4 14:25 var-log-fpc3.tgz
If the ssh root-login deny is configured or even ssh is not enabled, the scp command listed above may fail.
services { ssh { root-login deny; } }
Then we can use below two methods to copy the files under FPC to RE (the latter method is preferable as it can be used even ssh is not enabled)
root@fpc3:/var/tmp# rcp var-log-fpc3.tgz 128.0.0.1:/var/tmp/
This method below is another way to copy varlogs from Yocto Linux based FPCs, without storing anything on them (even temporarily) and aslo without the need for reverse SSH connections to RE.
For example, it can use the following approach to collect data from LC9600,LC4800 and MPC10E cards:
% ssh -Ji [email protected] tar -cf - /var/log | gzip > /var/tmp/varlogs-260-FPC1-20260505.tgz
By this way, the tar is executed remotely and passes the archived data to local gzip process via the SSH connection, and the local gzip process compresses the data stream ,the stores it locally.
Another similar approach can also be used with LC2100/MPC7E cards which use Wind River Linux:
# rsh -Ji 128.0.0.16 tar -cf - /var/log/ | gzip > /var/tmp/varlogs-260-FPC0-20241224.tgz
Notes: if the compression is not necessary, 'gzip' can be replaced with 'cat'.
2025-03-10 added LC4800
2024-12-28: Added more hits for LC9600.
2024-06-13: Added note about LC9600.
2023-07-03: Version 2.0 Update two methods can be used when ssh root-login deny is configured or even ssh is not enabled