• Publicity: Public Only All

throttle_mod-procs.tcl

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

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

Procedures in this file

Detailed information

::Counter proc set_in_all_instances (public)

 ::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 (required)
value (required)

Testcases:
No testcase defined.

::Users proc active (public)

 ::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 requesters (user_ids or peer addresses for unauthenticated requests) is returned. If "-full" is used for each requester 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 (optional)
Returns:
list with detailed user info

Testcases:
No testcase defined.

::Users proc hits (public)

 ::Users[i] hits uid
Parameters:
uid (required)
request key
Returns:
Number of hits by this user (in time window)

Testcases:
No testcase defined.

::Users proc last_pa (public)

 ::Users[i] last_pa uid
Parameters:
uid (required)
request key
Returns:
last peer address of the specified users

Testcases:
No testcase defined.

::Users proc nr_active (public)

 ::Users[i] nr_active
Returns:
number of active users (in time window)

Testcases:
No testcase defined.

::Users proc nr_authenticated (public)

 ::Users[i] nr_authenticated
Returns:
number of authenticated users (in time window)

Testcases:
No testcase defined.

::Users proc nr_users_time_window (public)

 ::Users[i] nr_users_time_window
Returns:
number of different IP addresses and authenticated users (in time window)

Testcases:
No testcase defined.

::Users proc user_is_active (public)

 ::Users[i] user_is_active uid
Parameters:
uid (required)
Returns:
boolean value whether user is active

Testcases:
No testcase defined.

::throttle Class ::Counter (public)

 ::xotcl::Class Class[i]

Testcases:
No testcase defined.

::throttle Class ::Users (public)

 ::xotcl::Class Class[i]

Testcases:
No testcase defined.
[ show source ]