6 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.
Command line
The easiest way to obtain hostname
and hostid
is to open the shell, go to the directory with MOSEK binaries (<MSKHOME>/mosek/10.0/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]
Python
If you only installed MOSEK in Python (via Conda, Pip or otherwise) then you can get the same output by running the following code. Note, however, that for floating licenses you will still have to download the full MOSEK distribution package to obtain the license server binaries.
import mosek, sys
env = mosek.Env()
env.set_Stream(mosek.streamtype.log, sys.stdout.write)
env.echointro(1)
Other ways
If you cannot run MOSEK at this point, other methods to obtain the hostname
and hostid
are outlined below.
6.1 The Hostname¶
To obtain the host name open a shell and execute the command:
hostname
6.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
.
6.2.1 Windows: How to get the Host ID¶
In the Start Menu under All Programs select Mosek Optimization Tools 10.0 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

Please provide the hostid.txt
file whenever the host ID is requested.
6.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/10.0/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.
6.2.3 macOS: How to get the Host ID¶
The host ID is obtained as follows:
<MSKHOME>/mosek/10.0/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
.