Advice on rationing software licenses (August 1996)

Garry Perrat (Phillips), offers the following advice to those who are trying to optimize software licenses and use.

'I have been asked to find out whether people are monitoring usage of licenses and/or monitoring processes for idle sessions and, if so, how they are doing it. I have a script which looks for idle sessions (basically looks every half hour and checks whether or not the process has used any cpu since the previous check) but doesn't automatically terminate them - it just logs them so people who are looking for a license can identify users hogging them. (Of course, this wouldn't be necessary if FlexLM's TIMEOUT feature was implemented by the applications, but then I guess this sort of thing isn't in a vendor's interest.) Monitoring license utilization is quite easy to program and Panther's AppTrack does quite a nice job with some pretty graphs. It can help to determine how many licenses you actually need. (It is quite wasteful to buy enough licenses so that no one is ever unable to get one - the trick is determining the frequency of 'lock out' which is an acceptable compromise between users' ability to get their jobs done and keeping maintenance costs down.)

Application Tracking Code

#!/bin/sh

# seismon - monitor SeisWorks processes for

# inactivity since SeisWorks doesn't support

# FlexLMs TIMEOUT facility

# run by cron every half hour

# Put a blank line and the date into the log file

echo "" >> $HOME/lmk/seismon.out

date >> $HOME/lmk/seismon.out

 

# Define temporary work area - not /tmp since this is cleared

# on reboot and we need to hold on to the files..

TMPDIR=$HOME/lmk/seismon.tmpdir;export TMPDIR

 

# Specify the list of servers to monitor

serverlist="lnst0aa lnst1a lnst2a lnst3a lnst4a lnst5a lnlm06a lnlm08"

 

# Loop through all servers

for server in $serverlist; do

 

# check that the server is alive

# If it is not then continue with the next one

/usr/etc/ping $server >/dev/null

[ $? -ne 0 ] && continue

# Th server is alive so find all relevant processes running

# on it and print out a sorted list of pid, uid, cpu_time

# and process_name

rsh $server ps -axuww|nawk '$0~/Seis.d$/ \

{print substr($0,10,5), substr($0,1,9), \

substr($0,50,6),$NF}' | \

sort > $TEMPDIR/seismon.$server.new

 

# Join the old and new lists and print out uid and \

# process_name if there is no change in cpu time

join $TMPDIR/seismon.$server.old $TMPDIR/seismon.$server.new \

| nawk '$3==$6 {print "'$server'",$2,$4}'>> \

$HOME/lmk/seismon.out

 

# Rename new output to old

mv $TMPDIR/seismon.$server.new $TMPDIR.seismon.$server.old

 

done

Click here to comment on this article

If your browser does not work with the MailTo button, send mail to pdm@the-data-room.com with PDM_V_1.0_199608_14 as the subject.

© Oil IT Journal - all rights reserved.