Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: sysmark@helios.physics.utoronto.ca (Mark Bartelt)
Subject: Re: OSF/1 License PAK checker
Date: 1995/12/21	[thread overview]
Message-ID: <DJyAoz.L8G@info.physics.utoronto.ca> (raw)
In-Reply-To: 4baaof$4lq@nntp5.u.washington.edu

[ 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)" ]



      reply	other threads:[~1995-12-21  5:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-12-21  5:00 OSF/1 License PAK checker Jeff Scheib
1995-12-21  5:00 ` Mark Bartelt [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox