Back to Knowledege base

Installing an Emergency Seven-Day Licence on Xi-Batch

Recovering a system whose licence has been lost or damaged with xb-emerglic, and replacing it with a permanent licence

What the emergency licence tool is

Xi-Batch ships a program, xb-emerglic, that writes a seven-day emergency licence into the product's licence file, /usr/libexec/xi/.xibatch.lic. It exists for one situation: the machine's licence has been lost or damaged, the scheduler will not start, and a permanent licence cannot be obtained in time to keep the site's work running.

Every packaging format - RPM, Debian package and portable archive - installs the command on the PATH, in /usr/local/bin on a packaged system. There is no need to hunt for it in a distribution directory.

An emergency licence is a real licence record in the same format as any other. It is bound to the machine in the same way: the record is checksummed against the hardware address of the network interface carrying the most traffic. It cannot be copied to another machine, and it is superseded simply by installing a permanent licence over it.

When to use it

  • The licence file was lost or damaged by a restore or a disc recovery, and the scheduler will not start.
  • Production work must run now, and a permanent licence cannot be obtained and installed in time.

What it is not for. A new installation from an RPM or Debian package already carries a 30-day trial licence, installed automatically at install time; a portable-archive installation carries a 45-day trial. A test or development machine should be licensed the same way as any other machine. Use the emergency licence only to recover a system that has lost its licence, and replace it with a permanent licence as the first available action afterwards.

What it requires before it will run

The program checks three things and refuses on any of them.

  1. You must be root. The command is not installed set-user-id, so it needs a genuine root shell or sudo. Otherwise it prints You have to be superuser to run this and exits 10.
  2. The scheduler must be stopped. Otherwise it prints It looks like the scheduler is running, please stop first and exits 10.
  3. The licence file must be readable, or absent. If it is absent the program creates it, so no previous licence is needed. If it exists but is too short to hold a complete licence record, the program prints Cannot read val code??? and exits 4 without writing anything.

A stopped scheduler is detected by the absence of its request socket, not by looking for a process. After a crash or a SIGKILL the socket file can be left behind, and the program will then refuse even though nothing is running. Clear the leftover socket and shared memory with xb-ripc -d first, then run the command again.

Running it

Stop the product:

btquit -y

Write the emergency licence:

# Non-networked
xb-emerglic -L

# Networked
xb-emerglic -N

The command prints the period it has written:

Your copy is licensed from 12/08/2026 to 20/08/2026

With no option, the program guesses whether a network licence is needed and asks you to confirm. It answers "yes" only if /etc/xi/batch-hosts exists and all four of the Xi-Batch service entries - xibatch, btq, xbnetsrv and xbapi - are present in the system services database. Any one missing and it defaults to "no".

xb-emerglic

Network licence required? [N]

If the existing licence is still valid, the program will not silently replace it. It asks, and the default answer is no:

Licence seems to be valid - continue? [N]

Answering N (or pressing return) leaves the licence untouched and exits 100.

Restart the product the way your system normally starts it. The shipped service unit runs:

btstart -j 2000 -v 500 -l 10000

Options, exactly as the program accepts them

OptionMeaning
-LLocal licence - no network use
-NNetwork licence
noneGuess, and prompt for confirmation

There are no other options, and one thing about the usage line is misleading. xb-emerglic prints a usage line reading xb-emerglic [-L/N] [days], but no day count is read. A second argument is accepted and then ignored; the period is always seven days. Three or more arguments produce the usage line and exit 1.

So xb-emerglic -N 30 is accepted, does not fail, and gives you seven days rather than thirty. An argument that does not begin with a hyphen is ignored without comment, and you are prompted instead.

The period is exactly seven days, and cannot be varied

The end date is set seven days ahead of midday UTC on the day you run the command; the start date is set to midday UTC on the previous day, so a clock that is slightly out cannot leave the licence not yet valid. The seven days are compiled in. No option, environment variable or configuration setting changes them.

Verifying it

xb-checklic

A successful check prints, with the fields separated by tabs:

Licensed to:    Emergency Licence of Xi-Batch
Serial is:      4173
Start time:     11/08/2026
End time:       20/08/2026
Validated for networks
***Emergency licence***

The ***Emergency licence*** line is what identifies it. The site name is fixed text, and the serial number is generated locally and has no meaning outside the machine - it is not a serial you can quote to Xi Software. Validated for networks appears only if -N was used or the prompt was answered yes.

From four days before the end date, the check adds:

*** NOTE: Licence about to expire ***

What warns you, and what does not

The only warning the product displays is in the interactive queue manager, btq, and its X11 equivalent. It appears once when the program starts, and needs a keystroke to clear:

*** WARNING - You have an emergency licence which ***
***          which will expire in 5 days          ***
***************Please type any character to continue**************

It is shown only between 10:00 and 18:00 UTC, Monday to Friday - deliberately, so that it does not block an unattended overnight or weekend session. Nothing else warns: no message is written to the report file, no mail is sent, and jobs and command-line programs run without comment. If nobody at your site uses btq during working hours, the expiry will arrive with no notice at all. Put the end date in a diary.

What happens if it expires

An expired licence is not a degraded mode. The licence check returns "expired", and the scheduler exits instead of starting. A machine whose emergency licence has run out is a machine with no batch scheduling at all, from the next restart onwards, and a running scheduler will not survive its next restart either.

Plan to have the permanent licence installed and verified with several days in hand.

Replacing it with a permanent licence

A permanent licence is issued against your serial number through the Xi Software customer portal, and installed with xb-vwrite. Installing it overwrites the emergency licence in the same file; there is nothing to remove first.

btquit -y
xb-vwrite
btstart -j 2000 -v 500 -l 10000
xb-checklic

Check that the output of the verification step names your organisation rather than Emergency Licence of…, and that the ***Emergency licence*** line has gone.

Licence codes issued by the portal expire twelve hours after they are generated, so obtain the code at the time you intend to install it. xb-vwrite refuses to run while the product is up, and exits 10 if it finds the scheduler running.

If the permanent licence has not arrived in time

The emergency licence is a bridge to a permanent licence, and it is not a licensing route in its own right. If the seven days are running out and the permanent licence is still not available, contact Xi Software and say so - the recovery is not finished until the machine holds the licence it is entitled to.

Exit codes

CodeMeaning
0Emergency licence written
1Too many arguments
4Existing licence file too short to read
10Not root, scheduler running, or the licence file could not be opened or created
100Existing licence is valid and you declined to replace it

Common mistakes

Running it with the product still up. The command refuses and exits 10. Stop the product first.

# Refused
xb-emerglic -N
It looks like the scheduler is running, please stop first

# Correct
btquit -y
xb-emerglic -N
btstart -j 2000 -v 500 -l 10000

Using the other product's command. On a machine running both products, xb-emerglic licences Xi-Batch and xt-emerglic licences Xi-Text. Running the wrong one leaves the product you meant to fix exactly as it was.

Forgetting to restart. The command writes a file; the licence is read when the scheduler starts. Until you restart, nothing has changed for the running system.

Passing a day count. It is accepted and ignored. You get seven days.

Summary

  1. Stop the product - btquit -y.
  2. As root, run xb-emerglic, with -N for a networked machine or -L for a standalone one.
  3. Restart the product with btstart -j 2000 -v 500 -l 10000, or however your system starts it.
  4. Confirm with xb-checklic and write down the end date.
  5. Contact Xi Software the same day and obtain a permanent licence.
  6. Install it with xb-vwrite with days in hand, and confirm the emergency line has gone.
Sizing the Xi-Text Shared Memory Queue
What the start-up numbers allocate, when the segments grow, and what happens when they cannot