LM_HOSTTYPE(3)

NAME
lm_hosttype - returns information about the type of the host machine

SYNOPSIS
#include "lm_client.h"

HOSTTYPE *lm_hosttype(run_benchmark)
int run_benchmark;

typedef struct hosttype {
	int code; 	/* machine type (see lm_hosttype.h) */
	char *name; 	/* Machine name, eg. sun 3/50 */
	int flexlm_speed; /* Speed determined at run time */
	int vendor_speed; /* Speed claim by vendor */
} HOSTTYPE;

DESCRIPTION
lm_hosttype() returns information about the host machine on which it is run.

RETURN VALUE
lm_userlist() returns a pointer to a HOSTTYPE structure which contains the information. This structure belongs to lm_hosttype, and must not be modified by the caller.

The code field indicates what type of machine the software is running on. There are a large number of possible host types. These are defined in lm_hosttype.h.

The name field gives the manufacturers model name for the machine.

The number in the flexlm_speed field is the result of a small benchmark that is run at the time of the lm_hosttype() call. These numbers should be treated as repeatable to approximately +/- 30%. The benchmark that is run is a simple loop that increments a register int variable for approximately .5 seconds. The result is the number of iterations per 50 microseconds. If the result is 0, this indicates that the benchmark was not run. If the run_benchmark parameter is set to zero, the benchmark will not be run. This could be useful to save execution time. Also, the benchmark uses the virtual timer (SIGVTALRM) which could intefere with the application.

Some typical results:
Sun 3/50, OS 3.5: 28
Sun Sparcstation 1+, OS 4.0.3: 101
Next OS V1: 68

The number in the vendor_speed field is the manufacturer's stated
integer MIP performance (or 0, if no value is available).