Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

How to collect logs from each member of an EX8200 virtual-chassis (XRE200)

0

0

Article ID: KB23584 KB Last Updated: 17 Mar 2021Version: 2.0
Summary:
This article explains one of the ways to collect logs from each member of the EX8200 Virtual Chassis; primary/backup XRE and Routing-Engine/(s) of member switches (EX8200 with single/dual routing-engines)
Symptoms:
Typically it would be sufficient to collect logs from the following members on an EX8200 Virtual Chassis setup.  However, this article includes how to log into the line cards of member switches (EX82XX) if required. 

1. Primary XRE
2. Backup XRE
3. Primary routing-engine of EX82XX
4. Backup routing-engine of EX82XX 
Solution:
1. Log into the primary XRE and check the virtual-chassis topology to identify each member and its member ID. 
‚Äč{master:8}
root@XRE200-LC-DC-XRE1> show virtual-chassis

Preprovisioned Virtual Chassis
Virtual Chassis ID: 5f3d.2290.b587
Virtual Chassis Mode: Enabled

                                                      Mastership     Neighbor     List
Member ID       Status  Serial No      Model     priority   Role        ID      Interface
0 (FPC 0-15)    Prsnt   BA0911152292   ex8216    0          Linecard    8       vcp-0/0
                                                                        1       vcp-14/0/6
                                                                        1       vcp-14/0/7
                                                                        1       vcp-6/0/6
                                                                        1       vcp-6/0/7
1 (FPC 16-31)   Prsnt   BA0909250255   ex8216    0          Linecard    9       vcp-0/0
                                                                        8       vcp-0/1
                                                                        0       vcp-14/0/6
                                                                        0       vcp-14/0/7
                                                                        0       vcp-6/0/6
                                                                        0       vcp-6/0/7
8 (FPC 128-143) Prsnt   122010000100   ex-xre    129        Master*     0       vcp-0/0
                                                                        9       vcp-1/0
                                                                        1       vcp-1/1
9 (FPC 144-159) Prsnt   122010000078   ex-xre    129        Backup      1       vcp-0/0
                                                                        8       vcp-1/0

2. Enter the following command to archive the /var/log directory of primary XRE.
  • In this example member 8 is the primary XRE. The following command will zip (tar) the folder "/var/log" and name the file (LOGS-MASTER-XRE.tar). It also pushes the zipped file to the primary XRE's destination folder "/var/tmp".
{master:8}
root@XRE200-LC-DC-XRE1>file archive source /var/log destination member8:/var/tmp/LOGS-MASTER-XRE

3. Log into the Backup XRE
 
In this example member 9 is a backup XRE. 
{master:8}
root@XRE200-LC-DC-XRE1> request session member 9 

root@XRE200-LC-NC-XRE1:BK:9% cli
warning: This chassis is operating in a non-master role as part of a virtual-chassis (VC) system.
warning: Use of interactive commands should be limited to debugging and VC Port operations.
warning: Full CLI access is provided by the Virtual Chassis Master (VC-M) chassis.
warning: The VC-M can be identified through the show virtual-chassis status command executed at this console.
warning: Please logout and log into the VC-M to use CLI.

4. Enter the following command to archive the /var/log directory of the backup XRE.
 
The following command will zip (tar) the folder "/var/log" and name the file (LOGS-BACKUP-XRE.tar). It also pushes the zipped file to the primary XRE's destination folder "/var/tmp". 
{backup:9}
root@XRE200-LC-NC-XRE1>file archive source /var/log destination member8:/var/tmp/LOGS-BACKUP-XRE

5. Type 'exit' to close the backup XRE (member 9) session and go back to primary XRE (member 8).
{backup:9}
root@XRE200-LC-NC-XRE1> exit 

root@XRE200-LC-NC-XRE1:BK:9% exit
rlogin: connection closed

{master:8}
root@XRE200-LC-DC-XRE1>  

6. Login to member 0 from primary XRE and collect logs from member0-re0.
 
The contents of the entire /var/log folder of member 0's primary routing-engine will be zipped and pushed to primary XRE's /var/tmp folder.
{master:8}
root@XRE200-LC-DC-XRE1> request session member 0 
root@:RE:1% cli
warning: This chassis is operating in a non-master role as part of a virtual-chassis (VC) system.
warning: Use of interactive commands should be limited to debugging and VC Port operations.
warning: Full CLI access is provided by the Virtual Chassis Master (VC-M) chassis.
warning: The VC-M can be identified through the show virtual-chassis status command executed at this console.
warning: Please logout and log into the VC-M to use CLI.
{master:1}
root> file archive source /var/log destination member8:/var/tmp/LOGS-MEM0-RE0

7. Login to backup RE of member 0. 
 
The contents of the entire /var/log folder of member 0's backup routing-engine will be zipped and pushed to primary XRE's /var/tmp folder.
root> request routing-engine login backup
root@:BK:0% cli
warning: This chassis is operating in a non-master role as part of a virtual-chassis (VC) system.
warning: Use of interactive commands should be limited to debugging and VC Port operations.
warning: Full CLI access is provided by the Virtual Chassis Master (VC-M) chassis.
warning: The VC-M can be identified through the show virtual-chassis status command executed at this console.
warning: Please logout and log into the VC-M to use CLI.
{backup:0}
root> file archive source /var/log destination member8:/var/tmp/LOGS-MEM0-RE1
8. Repeat steps 6 & 7 for other members of the FIXX.
 
This way you will have all the logs copied to the primary XRE /var/tmp folder.
master:8}
root@XRE200-LC-DC-XRE1> file list /var/tmp/ 

/var/tmp/:
.snap/
LOGS-BACKUP-XRE.tar
LOGS-MASTER-XRE.tar
LOGS-MEM0-RE0.tar
LOGS-MEM1-RE0.tar
LOGS-MEM1-RE1.tar
LOGs-MEM0-RE1.tar

9. You can run the following command from any member in case you are required to login to the individual FPCs of the EX8200s.
 
In this example, we are logging into fpc2 of member 0 from primary XRE. 
root@XRE200-LC-DC-XRE1:RE:8% rlogin -Ji member0-fpc2
root@fpc2%

10. You can run the following command to copy any file from the line card's FPC to primary XRE.

In this example we are copying a file named 'test1.txt' from member 0 - FPC2 - to the primary XRE /var/tmp folder.  
root@fpc2% rcp -Ji /var/tmp/test1.txt member8:/var/tmp/

11. Copy all the archived logs from primary XRE's /var/tmp folder to your PC or another source.

For more details on this check out the 'Export the Archive Logs' section from KB20569 - Collecting Logs from EX series devices using the 'file archive' command
Modification History:
2021-02-18: minor non-technical edits.

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search