userstats - get user statistics

SYNOPSIS

<userstats $REMOTE_ADDR [license|user]>


DESCRIPTION
Returns access statistics for the user $REMOTE_ADDR, a dotted-decimal IPv4 address.

The first argument is normally $REMOTE_ADDR, i.e. the current remote host. In this case, the average number of accesses per minute by that user is returned; this count is reset if the user is idle more than a minute. If the first argument is the empty string, then the number of users in the last minute is returned. If the first argument is "high", then the highest number of users ever seen, since initialization (machine boot), is returned.

The optional second argument determines which set of statistics are queried: "user" (the default) queries hits logged with loguser. "license" queries the license statistics, i.e. every Vortex usage.


DIAGNOSTICS
userstats returns the (integer) number of accesses by the given user in the last minute, or the current or highest number of active users. license gives builtin stats, user gives stats logged by <loguser>.


EXAMPLE

<loguser $REMOTE_ADDR>
<userstats $REMOTE_ADDR>
<IF $ret gt 20>
  You're accessing this server too fast.  Please slow down. <BR>
  <flush><sleep 10>    <!-- slow 'em down -->
</IF>


CAVEATS
The userstats function was added Oct. 10 1996. In version 2.1.882170000 19971215 and later the first parameter is required to be an IPv4 address, and the second argument is accepted.


SEE ALSO
loguser, resetstats


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.