From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,da7d16c9ac4e94b8 X-Google-Attributes: gid1164f8,public From: sysmark@helios.physics.utoronto.ca (Mark Bartelt) Subject: Re: OSF/1 License PAK checker Date: 1995/12/21 Message-ID: #1/1 X-Deja-AN: 122480976 sender: news@info.physics.utoronto.ca (System Administrator) references: <4baaof$4lq@nntp5.u.washington.edu> organization: Canadian Institute for Theoretical Astrophysics reply-to: mark@cita.toronto.edu newsgroups: comp.sys.dec [ Jeff Scheib ] | Any utilities out there which can warn of pending license PAK expiration for | OSF/1? Well, it's rather trivial to use existing tools. It took less than five minutes to cook up the following shell script; some minor variant of it could be invoked by cron on the first day of each month ... --------------- #!/bin/sh set `date` mon_year=`echo $2-$6|tr '[a-z]' '[A-Z]'` paklist=` lmf list full | egrep 'Product Name:|Key Termination Date:' | sed 's/.*: *//' | awk ' (NR%2) == 1 { prodname = $1 } (NR%2) == 0 && NF != 0 { termdate = $1; printf "%11s %s\n", termdate, prodname } ' | sed 's/...//' | awk ' $1 == "'$mon_year'" { print $2 }' ` if test -n "$paklist"; then echo "The following PAKs expire this month: $paklist" | Mail -s "PAK expiry alert!" your_sysadmin fi --------------- Mark Bartelt 416/978-5619 Canadian Institute for mark@cita.toronto.edu Theoretical Astrophysics mark@cita.utoronto.ca "Sheep not busy being shorn are busy frying" - Dylan, at a NZ lamb barbecue [ singing "It's all right, ma (I'm only bleating)" ]