how many users?
Richard D. Williams
richard at appgrp.net
Mon Dec 2 09:29:44 PST 2013
Ernie,
What a simple solution.
I do not know if it is "exactly" how fp does it, but it would give me a
very close number.
Here is the script:
rm -f /tmp/fpnum.txt
ps -ef | grep dclerk >> /tmp/fpnum.txt
ps -ef | grep rclerk >> /tmp/fpnum.txt
ps -ef | grep rreport >> /tmp/fpnum.txt
ps -e f | grep dreport >> /tmp/fpmun.txt
wc -l /tmp/fpnum.txt | awk {' print $1 }'
This can now be set into a script /usr/local/bin/count_fpusers and used
inside a filepro program as a user command.
user uniq = /usr/local/bin/count_fpusers;n(4,.0)=uniq;close uniq;msgbox n
Wow. Senior moment. I went to write this script and found I had already
figured this out years ago.
Here is the script:
DATE="`date '+%m/%d/%y|%H:%M:%S'`"
ps -ef | grep clerk > /tmp/FPUSERS.txt
ps -ef | grep report >> /tmp/FPUSERS.txt
FPUSERS="`cat /tmp/FPUSERS.txt | wc -l`"
echo "$DATE|$FPUSERS|" >> /appl/LOG_FPUSERS
I use this to keep a running log of the number of users every 10 mins..
The new script above still will work as needed within any filepro program.
Thanks for the help.
Richard D. Williams
ps -ef |grep rclerk
On 12/2/2013 10:53 AM, ernieb59 wrote:
> Richard,
> ps -ef |grep rclerk
> will show how many instances of 'rclerk' are running.
> Same for any filePro executable.
>
> Ernie
>
>
> -----Original Message-----
> From: filepro-list-bounces+ernieb59=gmail.com at lists.celestial.com
> [mailto:filepro-list-bounces+ernieb59=gmail.com at lists.celestial.com] On
> Behalf Of Richard D. Williams
> Sent: Monday, December 02, 2013 9:18 AM
> To: filepro-list at lists.celestial.com
> Subject: how many users?
>
> Is there a way to determine the number of filepro users from the command
> line in a linux system?
>
> Richard
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2014.0.4259 / Virus Database: 3629/6884 - Release Date: 12/02/13
>
>
>
>
More information about the Filepro-list
mailing list