5 Hostname and Hostid

The hostname and hostid are the two basic computer identifiers used in MOSEK license files. The hostname is just the standard host name and hostid is usually identical to the MAC address of a network card.

The easiest way to obtain hostname and hostid is to open the shell, go to the directory with MOSEK binaries (<MSKHOME>/mosek/8/tools/platform/<PLATFORM>/bin/) and run the command

mosek -f

It will produce output similar to

MOSEK Version 8.1.0.23 (Build date: 2017-8-24 15:37:04)
Copyright (c) MOSEK ApS, Denmark. WWW: mosek.com
Platform: Linux/64-X86

FlexLM
 Version                  : 11.14
 Hostname                 : myoptserver
 Host ID                  : "b083fa34ad2c"
 License path             : /home/mosekuser/mosek/mosek.lic

Operating system variables
 LD_LIBRARY_PATH          :

*** No input file specfied. No optimization is performed.

Return code - 0  [MSK_RES_OK]

If this is not possible, other methods to obtain the hostname and hostid are outlined below.

5.1 The Hostname

To obtain the host name open a shell and execute the command:

hostname

5.2 The Host ID

A purchased MOSEK license is tied to a particular computer via a unique identifier called a host ID. Usually the host ID is identical to the MAC address of a network card. Therefore, the machine needs to be equipped with a network card. However, an actual network connection is not needed as the licensing system requires only the number encoded in the network card.

Important

Please follow the instructions below, and NOT use the shell command hostid.

5.2.1 Windows: How to get the Host ID

In the Start Menu under All Programs select Mosek Optimization Tools 8.1 and click on Generate HOSTID. MOSEK will display the hostname and the host ID and generate a file named hostid.txt in the user’s home directory e.g

%UserProfile%\hostid.txt
_images/generate_hostid.png

Please provide the hostid.txt file whenever the host ID is requested.

5.2.2 Linux: How to get the Host ID

To use the license manager the Linux standard base 3.0 must be installed. This package is called lsb-base or lsb in most Linux distributions.

The host ID is obtained as follows:

<MSKHOME>/mosek/8/tools/platform/<PLATFORM>/bin/lmutil lmhostid

An example output is

lmutil - Copyright (c) 1989-2006 Macrovision Europe Ltd.
and/or Macrovision Corporation. All Rights Reserved.
The FLEXnet host ID of this computer is "00001a1a5a6a";

In this case hostid is 00001a1a5a6a.

Troubleshooting

If you get an error similar to:

./lmutil: No such file or directory

then most likely the Linux Standard Base lsb package is not installed.

5.2.3 Mac OS: How to get the Host ID

The host ID is obtained as follows:

<MSKHOME>/mosek/8/tools/platform/<PLATFORM>/bin/lmutil lmhostid

An example output is

lmutil - Copyright (c) 1989-2006 Macrovision Europe Ltd.
and/or Macrovision Corporation. All Rights Reserved.
The FLEXnet host ID of this computer is "00001a1a5a6a";

In this case hostid is 00001a1a5a6a.