Contents

Introduction

Prerequisites

Requirements

Components Used

Background Information

Log Command Outputs

PuTTY

SecureCRT

Save Commands Locally

Capture Show Techs

Show Tech Commands

*NCS1004 One Showtech

Capture Show Tech Outputs on the Console

Extract the Showtech

Extract the Showtech Files

Read the Showtech Files

Collect Files in Linux Shell

Transfer Files

Copy Files Between Contexts

Copy from Admin to XR

Copy from Sysadmin to XR

Copy from Host to Admin

Copy Files to an External Location

Copy Files to USB

Clean Up Files

Introduction

This document describes the process to gather information from the NCS 1000 series including the NCS1001, NCS1002, NCS1004, NCS1010, and NCS1014.

Prerequisites

Requirements

There are no specific requirements for this document.

Components Used

This document is not restricted to specific software and hardware versions.

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.

Background Information

The NCS1001, NCS1002, and NCS1004 have multiple contexts in order to gather logs and files. The graphic describes how to navigate between these contexts. The NCS1010 and NCS1014 have only the run (XR Linux shell) as they run XR7. Capturing information from a context other than XR requires you to copy files between different locations.

NCS1K Command Line Contexts

Log Command Outputs

PuTTY

Capture session output under Session > Logging.

PuTTY command logging

SecureCRT

Navigate to File > Log Session in order to save the CLI outputs.

Save Commands Locally

In order to save the output of a command with a large amount of information directly to the NCS1K, pipe the output to a file.

Note: Debug commands with verbose output can quickly fill the device storage when piped to a file.

RP/0/RP0/CPU0:NCS1002_1# show inventory | file harddisk:/inventory.txt

Wed Aug 30 15:35:51.322 UTC

[OK]

Confirm the file saved to the hard disk.

RP/0/RP0/CPU0:NCS1002_1# dir harddisk:/inventory.txt

Wed Aug 30 15:37:29.941 UTC

Directory of harddisk:

48 -rwxr--r--. 1 1128 Aug 30 15:35 inventory.txt

Capture Show Techs

A show tech-support command gathers the output of many commands and collects them in one or more files, typically in harddisk:/showtech. The specific show tech command required depends on the current issue. The admin context has a separate set of show tech commands.

RP/0/RP0/CPU0:NCS1002_1# show tech ncs1k detail

Wed Aug 30 16:23:20.995 UTC

++ Show tech start time: 2023-Aug-30.162321.UTC ++

Wed Aug 30 16:23:24 UTC 2023 Waiting for gathering to complete

...........................................................................................................................................................................................................................

Wed Aug 30 16:35:30 UTC 2023 Compressing show tech output

Show tech output available at 0/RP0/CPU0 : /harddisk:/showtech/showtech-NCS1002_1-ncs1k-2023-Aug-30.162321.UTC.tgz

++ Show tech end time: 2023-Aug-30.163534.UTC ++

Show Tech Commands

This table describes the recommended tech support commands in order to run for each platform.

Platform

XR Command

Admin

NCS1001

show tech-support ncs1001 detail

show tech-support ncs1001-admin

NCS1002

show tech-support ncs1k detail

show tech-support ncs1k-admin

NCS1004*

show tech-support ncs1004 detail

show tech-support ncs1004-admin

NCS1010

show tech-support ncs1010 detail

--

NCS1014

show tech-support ncs1014 detail

--

*NCS1004 One Showtech

Software versions 7.3.1 and higher for the NCS1004 allow you to capture the XR and admin show tech simultaneously, eliminating the need to copy between contexts. Use the command show tech-support ncs1004 one-showtech in order to collect both in a single file.

Capture Show Tech Outputs on the Console

When the NCS1K does not have IP connectivity but has a working console connection, you can display the output of show tech files to the console and log to a file as described earlier. This example uses the NCS1001 show tech ncs1001 detail on version 7.3.1.

RP/0/RP0/CPU0:NCS1001-1# terminal length 0

RP/0/RP0/CPU0:NCS1001-1# show tech ncs1001 detail

Tue Jan 7 00:12:52.099 GMT-5

++ Show tech start time: 2025-Jan-07.001252.GMT-5 ++

Tue Jan 7 00:12:55 GMT-5 2025 Waiting for gathering to complete

....................................................................................................................................................................................................................................

Tue Jan 7 00:25:31 GMT-5 2025 Compressing show tech output

Show tech output available at 0/RP0/CPU0 : /harddisk:/showtech/showtech-NCS1001-1-ncs1001-2025-Jan-07.001252.GMT-5.tgz

++ Show tech end time: 2025-Jan-07.002532.GMT-5 ++

Extract the Showtech

RP/0/RP0/CPU0:NCS1001-1# run

[xr-vm_node0_RP0_CPU0:~]$ cd /misc/disk1/showtech

[xr-vm_node0_RP0_CPU0:/misc/disk1/showtech]$ tar xvf /misc/disk1/showtech/showtech-NCS1001-1-ncs1001-2025-Jan-07.001328.GMT-5.tgz

showtech-NCS1001-1-ncs1001-2025-Jan-07.001328.GMT-5/

showtech-NCS1001-1-ncs1001-2025-Jan-07.001328.GMT-5/node0_RP0_CPU0.tech.gz

showtech-NCS1001-1-ncs1001-2025-Jan-07.001328.GMT-5/system.tech.gz

[xr-vm_node0_RP0_CPU0:/misc/disk1/showtech]$ cd /misc/disk1/showtech/showtech-NCS1001-1-ncs1001-2025-Jan-07.001328.GMT-5

Extract the Showtech Files

[xr-vm_node0_RP0_CPU0:/misc/disk1/showtech/showtech-NCS1001-1-ncs1001-2025-Jan-07.001328.GMT-5]$ gzip -d system.tech.gz

[xr-vm_node0_RP0_CPU0:/misc/disk1/showtech/showtech-NCS1001-1-ncs1001-2025-Jan-07.001328.GMT-5]$ gzip -d node0_RP0_CPU0.tech.gz

[xr-vm_node0_RP0_CPU0:/misc/disk1/showtech/showtech-NCS1001-1-ncs1001-2025-Jan-07.001328.GMT-5]$ ls -lrt

total 146688

-rw-r--r--. 1 root root 21014395 Jan 7 00:15 system.tech

-rw-r--r--. 1 root root 129189505 Jan 7 00:26 node0_RP0_CPU0.tech

Read the Showtech Files

[xr-vm_node0_RP0_CPU0:/misc/disk1/showtech/showtech-NCS1001-1-ncs1001-2025-Jan-07.001328.GMT-5]$ cat system.tech node0_RP0_CPU0.tech

Collect Files in Linux Shell

The contents of the /var/log directory contain a large number of files useful for diagnosing a wide variety of issues. Gather these only when requested by Cisco as the various show tech files are typically sufficient. In order to collect all of these files, use the tar command. This example uses the sysadmin context of the NCS1002.

First, move to the root directory and confirm that /misc/disk1 has sufficient free space to store the tar file.

[sysadmin-vm:0_RP0:~]$ cd /

[sysadmin-vm:0_RP0:/]$ df -a

...

/dev/mapper/panini_vol_grp-ssd_disk1_calvados_1         3997376  172592   3598688   5% /misc/disk1

/dev/mapper/panini_vol_grp-ssd_disk1_calvados_swtam_1     47472     264     43484   1% /misc/swtam

/dev/loop1                                              1015700  197972    748916  21% /var/log

/dev/loop2                                               469636    4500    430020   2% /misc/config

/dev/loop3                                              1020456    1804    948768   1% /misc/scratch

none                                                        512       0       512   0% /mnt

debugfs                                                       0       0         0    - /sys/kernel/debug

/dev/loop4                                              3860988 1720220   1924924  48% /install_repo

tmpfs                                                     10240       0     10240   0% /media/install_tmpfs

Compress the contents of the /var/log folder and verify the new file exists.

[sysadmin-vm:0_RP0:/]$ tar -czf /misc/disk1/admin_var_logs.tgz /var/log

[sysadmin-vm:0_RP0:/]$ ls -lrt /misc/disk1

Copy the file to the XR context in order to allow transfer to another location.

Transfer Files

Copy Files Between Contexts

Only the XR context connects to an external server, so all files must be present there before copying off of the device.

Copy from Admin to XR

sysadmin-vm:0_RP0# dir harddisk:/showtech/

sysadmin-vm:0_RP0# copy harddisk:/showtech/admin_var_logs.tgz harddisk:/showtech location 0/RP0/CPU0/VM1

Copy from Sysadmin to XR

[sysadmin-vm:0_RP0:/]$ scp /misc/disk1/showtech/admin_var_logs.tgz root@10.11.12.14:/harddisk:/showtech

admin_var_logs.tgz

The sysadmin /misc/disk1 location is equivalent to the admin harddisk: location. Likewise, files saved to xr-vm /misc/disk1 appear in the XR harddisk: location. All NCS 1000 devices use this convention.

Copy from Host to Admin

[sysadmin-vm:0_RP0:~]$ scp root@10.0.2.16:/host_var_logs.tgz /misc/disk1/showtech

Copy Files to an External Location

The NCS 1000 supports several different file transfer methods. This example uses File Transfer Protocol (FTP) to copy a file from a harddisk to an external FTP server.

RP/0/RP0/CPU0:NCS1002_1# copy harddisk:/showtech/admin_var_logs.tgz ftp://root@[ ip_address ]:/

Wed Aug 30 13:52:30.655 CDT

Destination password:

Destination filename admin_var_logs.tgz?

Writing ftp://root:*@ip_address:/admin_var_logs.tgz

CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC

23862281 bytes copied in 8 sec ( 2982785)bytes/sec

Copy operation success

This example initiates the copy using Secure Copy Protocol (SCP) on an Ubuntu server.

admin@ubuntu:~$ sudo scp root@[ ip_address ]:/harddisk:/showtech/admin_var_logs.tgz ./

(root@ip_address) Password:

admin_var_logs.tgz

100% 1191 743.0KB/s 00:00

Copy Files to USB

When you insert a USB drive into a device supporting USB auto-mount, the system labels the drive as disk2. Use the copy command to transfer files from the harddisk to USB.

Clean Up Files

In order to save space on device storage, remove the show techs and log files after confirming a successful transfer to external storage.

RP/0/RP0/CPU0:NCS1002_1# delete harddisk:/showtech/admin_var_logs.tar.gz

Wed Aug 30 19:37:41.739 UTC

Delete harddisk:/showtech/host_var_logs_host.tar.gz[confirm]

In order to remove all show tech files, use the wildcard *.tgz.

RP/0/RP0/CPU0:NCS1002_1# delete harddisk:/showtech/*.tgz

Wed Aug 30 19:39:16.864 UTC

Delete harddisk:/showtech/*.tgz[confirm]

Use 'rm' in order to remove files from the Linux shell.

[sysadmin-vm:0_RP0:/]$ rm -v /misc/disk1/admin_var_logs.tar.gz

removed '/misc/disk1/admin_var_logs.tar.gz'