I run Prism on a network. How can I determine how often all licenses are in use, so I know whether we need more licenses? How can I tell which users are using a Prism license right now?
Whenever Prism (version 3 or 4 or 5) locks out a user because all licenses are in use, it adds a line with date and time to the lockout.txt file in the licenses folder. Periodically inspect that file to see how often your licenses are all in use.
GraphPad does not provide a means to find out which network users are currently using Prism (so are, in effect, 'checking out' a license). But one of our customers has provided the Perl program below, which creates this list. Basically it looks at all the open .lic files, and finds out which computer has permission for each file. You are welcome to adapt this program to your own uses. No one at GraphPad has ever tried this program, so we are not able to help you adapt it.
---
# Programmed by David Shivak, Jun 28 / 2005
# For use under IIS, tested on Windows 2003
# ActivePerl must be installed and a script web site must be created
# Remember to enable perl in Web server extensions
# Tested as a .pl file, did not test as .plx file
use strict;
use CGI qw(:standard);
use Win32::FileSecurity qw(Get EnumerateRights);
my %perms;
my $licensedir = "D:\\Graphpad\\Prism\ 4\\licenses\\";
my $domain = "MY_DOMAIN";
# Read directory, select only .lic files, and append the full directory onto the filenames
opendir DIR, $licensedir;
my @files = map {"$licensedir$_"} grep {/\.lic$/} readdir DIR;
closedir DIR;
# Start web display code
print header();
print start_html("Current Prism Licenses in Use");
# Place whatever css link you want here, or do it the official cgi way
print "<link href='http://sample/standards.css' rel='stylesheet' type='text/css'>\n";
# Make a table of the users; add other stats/columns as needed
# $tablecontent is a variable that will hold the table text contents until rendered
my $tablecontent = th("Current Prism Users");
# if we have .lic files created, there are users. See who they are
# by testing who has permissions on those files.
# Open filehandles would be more reliable but that requires admin
# perms for the IIS application pool this will run under, which is a
# security hazard
if (scalar(@files))
{
foreach my $file (@files)
{
Get($file, \%perms);
# Loop through users
foreach my $user (sort keys %perms)
{
# Skip all non-domain accounts which have permission to this folder, e.g. services, etc.
# May have to customize depending on access to licenses folder
next unless $user =~ /^$domain\\/;
$tablecontent .= Tr(td($user));
}
}
}
# If no .lic files, exist, licenses should be free, tell the users
else {
$tablecontent .= Tr(td("No licenses in use"));
}
print table($tablecontent);
print end_html();
Keywords: concurrent simultaneous lisence lisences licence licences lisense lisenses networks limits maximum run out exceed