Home
The Toolkit for Online Communities
15896 Community Members, 0 members online, 2310 visitors today
Log In Register

throttle_mod-procs.tcl

OpenACS Home : ACS API Browser : XOTcl Request Monitor 0.42 : throttle_mod-procs.tcl
Publicity:
[Public Only | All]

throttle_mod-procs.tcl

This file defines the following Objects and Classes: ::throttle[i], ::Counter[i], ::Users[i]

Location:
packages/xotcl-request-monitor/tcl/throttle_mod-procs.tcl

Procedures in this file

Detailed information

::throttle ::Counter proc set_in_all_instances (public)

::throttle do ::Counter[i] set_in_all_instances var value
A helper function to set in all (direct or indirect) instances an instance variable to the same value. This is used here in combination with changing parameters

Parameters:
var
value
 

::throttle ::Users proc active (public)

::throttle do ::Users[i] active [ -full ]
Return a list of lists containing information about current users. If the switch 'full' is used this list contains these users who have used the server within the monitoring time window (per default: 10 minutes). Otherwise, just a list of requestors (user_ids or peer addresses for unauthenticated requests) is returned.

If -full is used for each requestor the last peer address, the last timestamp, the number of hits, a list of values for the activity calculations and the number of ip-switches the user is returned.

The activity calculations are performed on base of an exponential smoothing algorithm which is calculated through an aggregated value, a timestamp (in minutes) and the number of hits in the monitored time window.

Switches:
-full (defaults to "false") (optional)
Returns:
list with detailed user info
 

::throttle ::Users proc hits (public)

::throttle do ::Users[i] hits uid

Parameters:
uid - request key
Returns:
Number of hits by this user (in time window)
 

::throttle ::Users proc last_pa (public)

::throttle do ::Users[i] last_pa uid

Parameters:
uid - request key
Returns:
last peer address of the specified users
 

::throttle ::Users proc nr_active (public)

::throttle do ::Users[i] nr_active

Returns:
number of active users (in time window)
 

::throttle ::Users proc nr_users_time_window (public)

::throttle do ::Users[i] nr_users_time_window

Returns:
number of different ip addresses and authenticated users (in time window)
 

::throttle proc check (public)

::throttle[i] check
This method should be called once per request that is monitored. It should be called after authentication shuch we have already the userid if the user is authenticated

 

string_truncate_middle (public)

string_truncate_middle [ -ellipsis ellipsis ] [ -len len ] string
cut middle part of a string in case it is to long

Switches:
-ellipsis (defaults to "...") (optional)
-len (defaults to "100") (optional)
Parameters:
string