- Publicity: Public Only All
throttle_mod-procs.tcl
This file defines the following Objects and Classes: ::Counter
, ::Users
- Location:
- packages/xotcl-request-monitor/tcl/throttle_mod-procs.tcl
Procedures in this file
- ::throttle ::Counter proc set_in_all_instances (public)
- ::throttle ::Users proc active (public)
- ::throttle ::Users proc hits (public)
- ::throttle ::Users proc last_pa (public)
- ::throttle ::Users proc nr_active (public)
- ::throttle ::Users proc nr_authenticated (public)
- ::throttle ::Users proc nr_users_time_window (public)
- ::throttle ::Users proc user_is_active (public)
- ::throttle Class ::Counter (public)
- ::throttle Class ::Users (public)
- throttle_mod::unmap_pool (private)
- xo::pool_remap_watchdog (private)
- xo::remap_pool (private)
- xo::request_monitor_user_info (private)
- xo::unmap_pool (private)
Detailed information
::Counter proc set_in_all_instances (public)
::Counterset_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)
::Usersactive [ -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)
::Usershits 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)
::Userslast_pa uid
- Parameters:
- uid (required)
- request key
- Returns:
- last peer address of the specified users
- Testcases:
- No testcase defined.
::Users proc nr_active (public)
::Usersnr_active
- Returns:
- number of active users (in time window)
- Testcases:
- No testcase defined.
::Users proc nr_authenticated (public)
::Usersnr_authenticated
- Returns:
- number of authenticated users (in time window)
- Testcases:
- No testcase defined.
::Users proc nr_users_time_window (public)
::Usersnr_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)
::Usersuser_is_active uid
- Parameters:
- uid (required)
- Returns:
- boolean value whether user is active
- Testcases:
- No testcase defined.
throttle_mod::unmap_pool (private)
throttle_mod::unmap_pool [ -pool pool ] [ -ms ms ] method url
Function within throttle monitor thread for registering pool unmapping requests after a specified time. This function has to run in this thread to be able to use "::after".
- Switches:
- -pool (optional, defaults to
"slow")- -ms (optional)
- Parameters:
- method (required)
- url (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xo::pool_remap_watchdog (private)
xo::pool_remap_watchdog [ -maxWaiting maxWaiting ] \
[ -maxRunning maxRunning ]Watchdoc function to ensure liveliness of the server. This watchdog checks every minute the running jobs and maps very slow requests to the slow pool (if configured) to avoid that the default pool is getting filled up with more stuck requests. The watchdog is managed via an ad_schedule_proc started from the init-procs.
- Switches:
- -maxWaiting (optional, defaults to
"10")- -maxRunning (optional, defaults to
"100")- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xo::remap_pool (private)
xo::remap_pool [ -threshold threshold ] [ -except except ] \
[ -pool pool ] [ -runtime runtime ] method urlFunction for dynamically managing connection pool mappings. When a connection pool "slow", is defined, and the query took longer than "threshold" seconds, and the URL is not 'except' list, then move this request to the "slow" pool.
- Switches:
- -threshold (optional, defaults to
"3.0")- -except (optional, defaults to
"/ /dotlrn/ /dotlrn")- -pool (optional, defaults to
"slow")- -runtime (optional)
- Parameters:
- method (required)
- url (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xo::request_monitor_user_info (private)
xo::request_monitor_user_info key
- Parameters:
- key (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xo::unmap_pool (private)
xo::unmap_pool [ -pool pool ] method url
- Switches:
- -pool (optional, defaults to
"slow")- Parameters:
- method (required)
- url (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
![[i]](/resources/acs-subsite/ZoomIn16.gif)