Using Junos Snapshot Administrator
You can use Junos Snapshot Administrator on a device running Junos OS to capture and save a runtime environment snapshot, compare two snapshots, or capture a snapshot and immediately evaluate it.
When you take a snapshot, you provide a snapshot name.
Junos Snapshot Administrator uses the snapshot name, target device
name, and configuration file test section strings to generate output
filenames that uniquely identify that data. For example, say you are
collecting data from device ABC, you define the snapshot name s1
, and your configuration file has three test sections
named ospf-checks
, bgp-checks
, and version-check
. When you take a snapshot,
Junos Snapshot Administrator creates the following output files:
ABC__ospf-checks__s1.xml
ABC__bgp-checks__s1.xml
ABC__version-check__s1.xml
The following sections outline the Junos Snapshot Administrator commands:
Taking a Snapshot
To take a snapshot of a device, enter the following on the remote server’s command line:
The command parameters are:
snapshot-name—String used in the output filenames to uniquely identify that snapshot.
username—Username used to access the device running Junos OS.
device-name—Name or IP address of the device you are accessing.
configuration-filename—Snapshot configuration filename.
For example, the user bsmith has an login account on
router ABC. Prior to a maintenance upgrade, user bsmith takes a snapshot
of the device. The snapshot name is preupgrade
and the configuration filename is ABCsnapshot.conf
. Upon connecting, the device prompts for the user’s password.
bsmith password: Connecting to bsmith@ABC ... CONNECTED. EXEC: 'show chassis alarms' ... SAVE: 'ABC__alarm-checks__preugrade.xml' ... EXEC: 'show ospf interface' ... SAVE: 'ABC__ospf-int-checks__preugrade.xml' ...
Additionally, you can take a snapshot using only a single
test section from the configuration file. To take a snapshot of a
device using only a single test section, include the -s section-name
argument, and
specify the test section name.
Comparing Two Snapshots
To compare two existing snapshot collections, enter the following on the remote server’s command line:
The command parameters are:
snapshot1–String used in the output filename to uniquely identify the first snapshot.
snapshot2—String used in the output filename to uniquely identify the second snapshot.
device-name—Name or IP address of the device.
configuration-filename–Snapshot configuration filename.
For example, the user bsmith has an login account on
router ABC. Prior to and immediately following a maintenance upgrade,
user bsmith takes a snapshot of the device. The snapshot names are preupgrade
and postupgrade
. To compare these two snapshots using the criteria defined in the
configuration file ABCsnapshot.conf
, bsmith issues the following command:
The Junos Snapshot Administrator output displays the target router and the test results for each of the active test sections in the configuration file. Sample output is shown here:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! >>> >>> TARGET: ABC >>> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --------------------------------------------------------------------------- CHECKING SECTION: alarm-checks --------------------------------------------------------------------------- - TEST FAILED: No chassis alarms There are 1 chassis alarms - TEST FAILED: 1 Alarm Description: Management Ethernet Link Down + TEST PASSED: Alarm Gone Missing - TEST FAILED: Alarm Got More +Alarm: Management Ethernet Link Down --------------------------------------------------------------------------- CHECKING SECTION: ospf-int-checks --------------------------------------------------------------------------- + TEST PASSED: OSPF interfaces must have at least 1 neighbor
Additionally, you can compare two snapshots using only
a single test section from the configuration file. To compare two
snapshots using only a single test section, include the -s section-name
argument, and
specify the test section name.
Taking and Evaluating a Snapshot
To take a snapshot and immediately evaluate it based on a pre-defined set of criteria, enter the following on the remote server’s command line:
The command parameters are:
snapshot-name—String used in the output filenames to uniquely identify that snapshot.
username—Username used to access the device running Junos OS.
device-name—Name or IP address of the device you are accessing.
configuration-filename—Snapshot configuration filename.