Licensing

This chapter covers the following topics:

Operating system licensing

QNX must be licensed for each computer it runs on. This is true whether you're using 10 standalone machines or 10 networked machines.

In a network, each machine is referred to as a “node” and each node is assigned a “logical” node ID. Logical node IDs range from 1 to the number of nodes in the network. For example, a network licensed for three nodes would support logical node IDs 1, 2, and 3.

The number of nodes in your network is determined by the number of licenses you've installed. You install old style licenses by running the license utility or new style licenses by adding them to the /.licenses file (see the “Adding licenses” section).

For licensing to work across a network, the boot server (the machine with the licenses) must be running the nameloc utility. If a machine boots from local hard disk (with licenses) but isn't on a network — a portable, for example — it must also run nameloc for licensing to work.

Old and new style licenses

QNX 4.23 supports two licensing schemes concurrently: the old style (earlier than QNX 4.23) and the new style (QNX 4.23 and later). All QNX 4 products released prior to QNX 4.23 use the old style licensing scheme.

Old style licenses are kept in the /etc/licenses directory. There's one file per license, and they're always distributed on disk. Old style licenses can only be installed and transferred from disk to disk using the license utility.

New style licenses are kept in the /.licenses file. They can be distributed on disk, but in most cases the license numbers are recorded on paper as a license certificate. New style licenses on disk must be installed using the license utility, which appends them to the /.licenses file. You may add new style licenses on certificate to the /.licenses file using any text editor. The /.licenses file can transferred from disk to disk using the cp command.

The /.licenses file

New style licenses are maintained in the file /.licenses. The following shows the contents of a sample /.licenses file. It contains licenses for six products, including the QNX OS:

  qnx.00090209-02lg-0947-48g2-00p7-0044 (4 node)
  qnx.00035882-02lg-0947-48g2-00p7-0044 (4 node)
  wcc.00375634-0l04-4k0l-0x6l-6112-5409 (4 node)
 phab.00006233-0040-0527-00l4-ji3g-1130 (4 node)
 phrt.00006932-007l-8070-g140-l410-84n3 (4 node)
 xrun.00004746-0l04-4l0k-0x7o-5514-8609 (4 node)
motif.00053489-00lk-0245-44e9-04i4-0004 (4 node)

The product_name.nnnnnnnn item at the beginning of each line represents the serial number that belongs to the specified product.

All QNX licensing is done on a per-node basis. In the example above, two QNX licenses are installed, and four concurrent QNX sessions can be run from each. This means that a maximum of eight copies of QNX can be running concurrently. A four-node QNX license allows a maximum of four QNX nodes to be running concurrently. If you try to run a fifth node, the message “No license” will be displayed.

The etc/licenses directory

Old style licenses are kept in the etc/licenses directory. Each license is an individual disk file whose contents can be viewed using the ls command:

ls /etc/licenses

QNX reports old style license information in the following format:

qnx0000178n004

where “qnx” is the name of the product, “0000178” is the serial number, “n” is the license type (a one-node license in this case), and “004” means that the file is for four nodes. If you installed other QNX applications (e.g. Watcom C), their licenses will also be displayed.

Verifying your licenses

The licinfo utility lists all licenses that have been installed. You can specify command-line options to display information by node or by a particular product:

licinfo (lists all licenses in use in the network)

licinfo -a (lists all licenses whether they're in use or not)

licinfo -l wcc (lists all C compiler licenses)

licinfo -N 1 (lists all licenses on node one)

Adding licenses

In a network, the licenses must be installed on the boot server. If you wish to boot workstations from their own hard disks, you must install all licenses on all machines that will boot from hard disk. The newly installed licenses must be activated afterwards in order for QNX to honor them (see “Activating licenses” below).

New style licenses

When you buy new software, your license(s) are supplied either on the distribution media or on a license certificate. Licenses on diskette are added to the /.licenses file automatically during the installation process. If you received a certificate, it will have new license number(s) on it. You'll need to add these license numbers to the /.licenses file manually using a text editor.

Don't forget to activate the licenses on your boot server and on all workstations that boot from that server using license -r.

Old style licenses

The following command installs the license from floppy drive 0 to your hard disk. Note that the floppy driver (Fsys.floppy) must be running:

license

Activating licenses

After you install a license (typically on the boot server), you must activate it. To do so, run license -r on the node (or boot server), which reads all licenses from /.licenses and /etc/licenses (if it exists) and places them in the machine's in-memory license database.

Workstations that boot over the network will inherit the licensing database from their boot server. You can run the following command to refresh a workstation's license information from the boot server's in-memory license database:

license -R boot_server_node_ID workstation_node_ID

Transferring a license to another node

Old style licenses can be transferred from one location (or node) to another using the license command. For example, the following command would transfer all licenses from /etc/licenses on node 61 to /etc/licenses on node 71:

license //61/etc/licenses //79/etc/licenses

New style licenses are kept in the /.licenses file. This file can be copied from node to node using the cp command.