in reply to help need with flexlm
so... what have you tried? Are you concerned about total number of licenses of all products or each product? Either way it is a fairly straight forward detection of what lines you are on
and tallying the user's product usageif ( $line =~ m@Users of Product@ ) { $line =~ m@Product(\d+):@; # match and capture product number $product = $1l
Once you have your counts I'm sure you can work out how to calculate percentages. As far as making your script send email there are plenty of articles on that on PM (try a super search) and my own blog has examples of how to do that (offsite link) here.$line = s/\s+//; #get rid of the leading spaces my @f=split(/[\s\t]+/,$line); my $user=$f[0]; # if our hash does not contain an entry for our user $counter{$user} = [] if ( ! defined($counter{$user}) ) ; $counter{$user}->{$product}++;
Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: help need with flexlm
by vkknava (Novice) on May 04, 2013 at 13:16 UTC | |
by vkknava (Novice) on May 04, 2013 at 14:56 UTC |
In Section
Seekers of Perl Wisdom