counting concurrent users...need advice.

Fairlight fairlite at fairlite.com
Fri Aug 27 14:44:06 PDT 2004


When asked his whereabouts on Fri, Aug 27, 2004 at 11:34:05AM -0400,
Bob Stockler took the fifth, drank it, and then slurred:
> On Fri, Aug 27, 2004 at 09:24:41AM -0400, Mark Luljak wrote:
> | 
> | Basically, I need a way to chart usage of fP in a concurrent user count
> | sense.  That's the short story.
> [snip]
> 
> How about a script that periodically pipes the output of 'ps'
> (with the arguments appropriate to the OS) into programming that
> counts the instances of [dr]clerk or [dr]report executing, and
> keeps track of the maximum?

That would be fine if not for granularity issues.  You could have two long
jobs that take a minute and a half each, and you poll once a minute, so
you'd always see those two, but you're only getting a snapshot.  Inside
that minute of granularity, another ten 5-second instances could have hit
the system at the same time dead in the middle of your non-polling time,
and you'd never know you'd hit 12 instead of 2.

It really wants internal tracking that's externally accessible.

Anything else, from using ps to /proc, would end up being a non-sleeping
polling loop that would eat CPU practically in realtime and degrade system
performance--while -still- having the potential for missing instances if
they were brief enough.  Not good.

mark->
-- 
Bring the web-enabling power of OneGate to -your- filePro applications today!

Try the live filePro-based, OneGate-enabled demo at the following URL:
               http://www2.onnik.com/~fairlite/flfssindex.html


More information about the Filepro-list mailing list