Chapter 1. SGI LK License Facility

SGI Foundation 1 software contains a licensing mechanism called LK. LK was developed by SGI for SGI products only. LK and the LK floating licenses facilities are described in this chapter.

Overview

The lkd program is the SGI LK license manager. It serves counted licenses for use by localhost and remotehost. Applications linked with LK and using counted licenses use the local lkd daemon to proxy requests out to the final daemon. Counted licenses are known by the ssn (system serial number) serving that key. The daemon maintains an [ssn,ip or name,port] pair so it can process LKN (LK network) requests with the remote daemon. The applications never talk to the remote daemon; they only send requests to the local daemon via a UNIX socket. The request is processed locally by the local daemon if it is its own ssn or proxy sent out by the request to the remote daemon. For usage information, see the lkd(8) man page.

This chapter covers the following topics:

LK License Considerations

The LK licensing daemon (lkd) manages counted licenses. Therefore, it manages licenses with a count value greater than or equal to one (1). The LK license references the server serial number (ssn) of the server; this is the lk_hostid of the LK license manager. See the lk(5) man page for more information. For example:

# A counted ( 5 seats ) nodeless license served by ssn 0011432bc7b3
product=acme, version=1.0, \
   count=5@0011432bc7b3, begDate=0, \
   expDate=0, licenseID=0, \
   key=0iKOmyC0F9vFgVJqJBsIBBU/ZpwTYIoG

From an application license perspective using managed licenses, can run on the following:

  • Every host

    This is called a nodeless managed license. This is the most commonly issued license.

  • One host

    This is called a nodelock managed license.

In all cases, the server is locked to a specific ssn as indicated by the count=xxx@ssn notation.

Obtaining Host Information

When you order SGI Foundation 1 software, you will receive an entitlement ID. You must submit the system host ID, host name, and entitlement ID when requesting your permanent LK license key.

To obtain the host information for a server-capable administration node, execute the following command (you must have the lkSGI RPM from the SGI Foundation 1 Software installed):

/usr/sbin/lk_hostid

For example, the following shows that the serial number is N0000302 and the license ID is e000012e:

server-admin % /usr/sbin/lk_hostid
N0000302 e000012e socket=8 core=16 processor=16

Obtaining the License Keys from SGI

To obtain your license keys, see information provided in your customer letter and the following web page:

http://www.sgi.com/support/licensing

Installing the License Keys

To install the license keys, copy them into the /etc/lk/keys.dat file. A sample keys.dat file is, as follows:

server-admin% cat keys.dat
product=XVM_PLEX_LINUX, version=5.000, count=0, \
begDate=1216648987, expDate=0, licenseID=e000012e, \
key=Ea5Yc+1vxqykBXc931CGMHv5cmOCSfns, \
info='XVM PLEX STD 5 M',attr='16 CPU', \
vendor='Silicon Graphics, Inc.',ref_id='070706'

Verifying the License Keys

You can use the lk_verify -A command to verify LK licenses. To see more output, use the -v option. For example:

server-admin% lk_verify -A -vvv
lk_check        All     All : total found=1

  1 /etc/lk/keys.dat:005        product=XVM_PLEX_LINUX, version=5.000, count=0, begDate=1216648987, \
         expDate=0, licenseID=e000012e, key=Ea5Yc+1vxqykBXc931CGMHv5cmOCSfns, \
         info='XVM PLEX STD 5 M',attr='16 CPU', vendor='Silicon Graphics, Inc.', \
        ref_id='070706'
                Verdict:         SUCCESS. Nodelock.
                                 Available since 372 days on 21-Jul-2008 09:03:07.
                                 No End Date.
                Attribute 1 of 4 : info=XVM PLEX STD 5 M
                Attribute 2 of 4 : attr=16 CPU
                Attribute 3 of 4 : vendor=Silicon Graphics, Inc.
                Attribute 4 of 4 : ref_id=070706

lk_check        All     All : total matched=1

Setting Up the LK Floating Licenses lkd Daemon

In order for the LK floating licenses facilities to operate correctly, both the client and server need to have this common setup:

  • The following configuration setting: chkconfig lkd on

  • Share the same /etc/lk/keys.dat (or equivalent) either via distribution mechanism (rsync) or NFS, or similar

  • Allow TCP/IP port 11106 traffic between the server and client hosts

The client must also define the license server “ssn host_or_ip” pair in either one of these locations:

  • /etc/lkd.map (see lkd.map(5)

  • And/or embedded in the license file itself in the form of:

    #! 080069010203 192.168.1.1

  • And/or an NIS lkd.map. See /usr/share/doc/lk-2.0/nis/readme.txt for how to setup this map. For more information, see lkd.map(5) for more information.

Using the LK Floating Licenses Facilities

In order to use LK floating licenses facilities, the lkd daemon has to run in two places:

  • The license server

    The host acting as the license server

  • The license client(s)

    All the hosts where applications utilizing LK floating licenses capabilities

Upon start-up, lkd determines the licenses to serve by using the standard lookup LK mechanism, as described in lk(5) man page. The daemon will only serve licenses belonging to its local hostid as determined by lk_hostid(1) program. LK client applications use the same mechanism. However, the daemon does not monitor license file changes. This means lkd need to be restarted to account for license file changes. Also, note that the license file may contain floating licenses for several server. For example:

# floating license server by ssn=00a0d1e4071d for product 'a'
product=a, version=1, count=5@00a0d1e4071d, begDate=0, expDate=0, \
     licenseID=0, key=/sHK7L45x8aiHy9VRt+YWx/c8KTYxWgd, \
     vendor="Silicon Graphics, Inc.",info="vendor_info"

# floating license server by ssn=00a0d1e4080b for product 'b'
product=b, version=1, count=5@00a0d1e4080b, begDate=0, expDate=0, \
     licenseID=0, key=fs5rUFeD3nBdzAGw6UDsmb5yw2wioNOh, \
      vendor="Silicon Graphics, Inc.",info="vendor_info"

# a nodeless license for product 'c'
product=c, version=1, count=5, begDate=0, expDate=0, licenseID=0, \
      key=Pl8UFMVeNBo/SiiG6cbBb4CDchO5R2z8, \
      vendor="Silicon Graphics, Inc.",info="vendor_info"

# a nodelock license for product 'd'
product=d, version=1, count=, begDate=1248886680, \
	 expDate=0, licenseID=d1e4071d, \
	 key=f5DvhYYFuvHoX2FVoI/ixvcBITbnE9pn

The LK licensing daemon (lkd) exchanges LK license requests of clients using TCP/IP official sgi-lk port 11106. You can use the -L option to specify a different port. When using this option, make sure this is reflected in the ssn mapping. See the lkd.map(5) man page for more information. The lkd daemon also satisfies local LK license request using a UNIX TCP socket file in /var/run/lkd/socket.SGI.server. Client applications never talk to remote license server via TCP/IP. Instead, all requests are made though the local daemon who will either satisfy the request locally or act as a proxy, and handle the request to the remote license server via TCP/IP. Consequently, it means there are no direct LK exchange between the application and remote LK daemon over TCP/IP.

When an LK request is granted to a client application via a lk_get(3) call, the daemon decrements the count for the granted key. The license server then starts monitoring (pings), at periodic interval (-P option), the client daemon to make sure the client process ID (PID) is still present and not a "zombie" process. See the lkdc(8) man page for more information.

Similarly, when the application release the key using lk_free(3), the daemon increments the original granted count for the application. Should a client application hang or crash, the license server acts as if the application crashed, hence "taking back" the granted count.

The lkd daemon can also report information about granted keys, and so on. This is enabled by the -c option. This is normally specified (by default) in /etc/sysconfig/lkd file. See the lkdc(8) man page for more information.

The lkd daemon also maintains a journal of license activities (-j option). This file should be cleaned and/or rotated appropriately from time to time. To turn off the journal option, just specify -j /dev/null.