Which NetWorker enabler codes are installed on my backup server?

The aim of this document is to assist system and storage administrators or auditors who need to obtain a list of current enabler codes (license keys) installed on a Legato NetWorker server.

This information can be used to provide a safe copy of the operational functionality of a backup server in the event of a failure or DR exercise, for legal/auditing purposes, or simply to determine the future expandability of an existing configuration.

This document does not discuss the various types of licenses available for use on a NetWorker server or the functionality of these enabler codes.

Currently there are 5 methods of displaying enabler codes on Legato NetWorker server, these methods include:

  1. via the GUI,
  2. using the command line while the server daemons are active,
  3. using the command line when server daemons are not running,
  4. via a script,
  5. or utilising standard Solaris utilities.

The remainder of this documentation describes the steps necessary to achieve results using the all above methods:

Viewing enabler codes from the GUI.

By far the simplest method of viewing installed enabler codes is via
the graphical administration interface (nwadmin):

# /usr/bin/nsr/nwadmin
  1. Select Registration... from the Server pull-down menu ...
  2. Use the Up and Down arrow keys to step between each enalber code installed.
  3. If you wish to generate a user readable hard copy of license keys installed, additionally perform:
    • Select Tabular from the View pull-down menu ...
    • Select Save from the File pull-down menu ...

Viewing enabler codes via the command line while the server daemons are running.

If you do not have the capability of running the graphical interface, use the following steps to achieve the same results via the NetWorker command-line administration tool (nsradmin):

# /usr/sbin/nsr/nsradmin
  1. At the nsradmin> prompt, type print type: nsr license
  2. Simplifing the output to display only the license type, the enabler code, it's authorisation code and expiry date, enter:
  3. nsradmin> show name; enabler code; expiration date; auth code
    nsradmin> print type: nsr license
  4. enter 'quit' to exit nsradmin

Viewing enabler codes via the command line whilst no server daemons running.

Gaining access to the enabler codes (license keys) from a Legato NetWorker server when the daemons are not running is a little different from the previous example as you must direct the administration tool to the location of the resource files.

For NetWorker (versions 4.x, 5.x and 6.x), start nsradmin with:

# /usr/sbin/nsr/nsradmin -f /nsr/res/nsr.res

For NetWorker version 7.x and later, start nsradmin with:

# /usr/sbin/nsr/nsradmin -d /nsr/res/nsrdb

At the nsradmin> prompt, enter:

nsradmin> print type: nsr license

As in the previous example, to reduce the output to display only the license type, the enabler code, it's authorisation code and expiry date, enter:

nsradmin> show name; enabler code; expiration date; auth code
nsradmin> print type: nsr license

enter quit to exit nsradmin

Extracting NetWorker license keys via a script.

If you periodically need to review or audit license keys installed on a NetWorker server, writing a simple shell script will assist in achieving this functionality quickly across multiple servers rather than keying the same commands on each system.

# /usr/sbin/nsr/nsradmin -i get_enabler_codes.txt

where the get_enabler_codes.txt file contains:

show name; enabler code; expiration date; auth code
print type: nsr license

An alternate method is not to rely on a text file, but to apply all on the command line:

# echo "show name;enabler code;expiration date;auth code\nprint type: nsr license" | /usr/sbin/nsr/nsradmin -i -

NOTE: The above two examples assume that the NetWorker daemons are up and running.

A simple but affective expansion on the above, is to determine which NetWorker feature is licensed, and extract the license information whether or not the backup server daemons are running:

# ./get_enabler_codes
Legato NetWorker Installed License Keys

Hostname: sunhost1, Date: 03-May-2004.

Enabler code License feature AuthCode Expires
==================== =================================== ======== ============
7bf8fd-3cafc0-024097 Archive support; 3429329c never
4fd4d1-1483d8-86e643 BusinesSuite Module for Oracle; 77cb1d38 never
8abb0c-4c76d0-52e6d0 DiskBackup Tier 1; demo key Jul 12, 2004
cc494e-872811-52f796 NetWorker Module for Informix, UNIX demo key Jul 18, 2004
75f2f7-1e8188-6b1d3f ClientPaks for LINUX/1; fd0635ec never
130c95-dc577e-2fdb87 NetWorker for UNIX, Power Edition ( 1edcb64c never
2128dc-1b6540-0dc8b5 Autochanger Module, Unlimited Slots 265ab28a never

The script (for a Solaris system) that produced the above output, looks like:

if [[ -d /nsr/res/nsrdb ]]
   CMD_ARGS="-d /nsr/res/nsrdb" # EBS
   CMD_ARGS="-f /nsr/res/nsr.res" # SBU

echo "print type: nsr license" | \
/usr/sbin/nsr/nsradmin $CMD_ARGS -i - | \
/usr/bin/nawk -F\: '
   "date '+%d-%b-%Y'" | getline current_time ; close ("date") ;
   "uname -n" | getline current_host ; close ("uname") ;
   print "Legato NetWorker Installed License Keys\n"
   print "Hostname: " current_host ", Date: " current_time ".\n"
   print "Enabler code License feature AuthCode Expires"
   print "==================== =================================== ======== ============"

/auth code/ {
   if ( $2 ~ /^ ;$/ ) {
      authcode= "demo key"
   } else {
      authcode= substr($2,2,8)

/enabler code/ { enabler= substr($2,2,20) } ; /expiration date/ { if ( substr($2,2,1) ~ /A/ ) { expire="never" } else { expire= substr($2,3,12) } }; /name/ { name= substr($2,2,1); if ( name ~ /\\/ ) { name= "onnextline" } else { if ( name ~ /"/ ) { name= substr($2,3,35) } else { name= substr($2,2,35) } } };
/^"/ { if ( name = "onnextline" ) { name= substr($1,2,35) } };
/^$/ {
printf("%-20s %-35s %-8s %-12s\n", enabler, name, authcode, expire)
}; '

Extracting enabler codes using standard Solaris[tm] commands.

While this final method may be crude and not recommended, at times using simple Solaris commands to extract license keys can save time for a system administrator.

For Legato NetWorker versions 4.x, 5.x and 6.x, perform the following on your Solaris/UNIX system:

# /usr/bin/grep "^enabler code:" /nsr/res/nsr.res

For the Legato NetWorker 7.x and later, perform:

# /usr/bin/grep "^enabler code:" /nsr/res/nsrdb/??/*

The output generated from the above commands only provides the enabler codes themselves and does not show the license functionality. If this information is required, use the nsrcap(1m) with the desired enabler code to view it's license functionality:

# /usr/sbin/nsr/nsrcap -cvn <enabler-code>