Find # of User Licenses
Fairlight
fairlite at fairlite.com
Mon Sep 23 11:46:06 PDT 2019
That's going to be very, very rough and sketchy on a busy system,
especially if it's involving thousands of transient CGI requests. On a
system like that, you can see multiple twitches of the active count inside
1/10 of a second.
It'll "work", but it's prone to be inaccurate in heavy churn, and it's also
a -lot- of overhead to impose on the system, when you understand what `ps`
has to actually do to give you that.
Looking at the raw shmem segment is a lot more efficient, and can be done
a lot more granularly. It's also very accurate, if you're comfortable
with an expensive polling loop. (And yet, it makes more sense to sink the
CPU into granular certainty, rather than the overhead of loading shared
libraries over and over for every program run, let alone having `ps`
combing through all of proc a zillion times.)
There seems to be some discrepancy between readers as to what the OP wanted
in the first place. Did they want to know the license capacity, as Nancy
seemed to think, or the actual license use, as you and I think? :)
m->
On Mon, Sep 23, 2019 at 01:33:03PM -0500, Richard D. Williams via Filepro-list thus spoke:
> This is not exact accurate but I will give you some idea;
>
> count_clerk+=`ps -ef | grep clerk | wc -l`
> count_report+=`ps -ef | grep report | wc -l`
> num=$((num1 + num2))
> count=$((count_clerk + count_report))
> FPUSERS=$count export FPUSERS
>
>
> You could also run this as a user program inside filepro.
>
> Create a script as /usr/local/bin/FP_USERS;
>
> count_clerk+=`ps -ef | grep clerk | wc -l`
> count_report+=`ps -ef | grep report | wc -l`
> num=$((num1 + num2))
> count=$((count_clerk + count_report))
> echo $count
>
> Then inside a filepro processing table write;
>
> user fpusers = /usr/local/bin/FP_USERS;n(4,.0)=fpusers;close
> fpusers;msgbox n
>
> Hope this helps,
>
> Richard D. Williams
>
>
>
>
> On 9/23/2019 8:39 AM, Cindy Youngman via Filepro-list wrote:
> >Hi all,
> >
> >Is there a environment variable or command I can run to determine the user
> >count for filePro? I've PFVER but it only gives me the version not the
> >user count.
> >
> >Thanks,
> >Cindy Youngman
> >FutureSoft Tech
> >-------------- next part --------------
> >An HTML attachment was scrubbed...
> >URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20190923/cda5da08/attachment.html>
> >_______________________________________________
> >Filepro-list mailing list
> >Filepro-list at lists.celestial.com
> >Subscribe/Unsubscribe/Subscription Changes
> >http://mailman.celestial.com/mailman/listinfo/filepro-list
> >
> >
>
>
>
> ---
> This email has been checked for viruses by AVG.
> https://www.avg.com
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20190923/50f35b66/attachment.html>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
--
Audio panton, cogito singularis.
More information about the Filepro-list
mailing list