Life of a Sysadmin

The occassional trials and tribulations of a jack of all tr ades sysadmin in a startup in Silicon Valley

December 2006

lmcheck.sh, or a script to warn you of license expirations

I needed a way to know when our various flexlm licenses would expire. I suppose I could have simply added the dates to my calendar whenever I added/updated the license files. But since I am not the only one to update the license files (and since sometimes the licenses are updated before the actual expiration), I figured a script that checked for soon to expiring licenses would be the correct solution.

Some experimentation with lmstat and some clarifications from the FlexLM Manual led to the creation of lmcheck.sh. The script should work on any unix system with a modern sh.

The output looks like;

/opt/lmgrd/bin/lmcheck.sh running on hostname at Tue 12 Dec 2006 06:53:16PM EST

The following licenses have expired or are expiring within 7 days

VENDOR      FEATURE                       VERSION             DATE                
------      -------                       -------             ----                
VENDORNAME  FeatureFoo                    1.2.3               4-dec-2006          


The following configs could not be tested
----------
27001@hostname

Cron runs this daily with the command lmcheck.sh | mail -S "lmcheck on hostname" email@example.com

[2006/12/15 | /software | permanent link]