22 #ifndef APACHE_SCOREBOARD_H
23 #define APACHE_SCOREBOARD_H
29 #if APR_HAVE_SYS_TIME_H
31 #include <sys/times.h>
42 #ifndef DEFAULT_SCOREBOARD
43 #define DEFAULT_SCOREBOARD "apache_runtime_status"
57 #define SERVER_STARTING 1
58 #define SERVER_READY 2
59 #define SERVER_BUSY_READ 3
60 #define SERVER_BUSY_WRITE 4
61 #define SERVER_BUSY_KEEPALIVE 5
62 #define SERVER_BUSY_LOG 6
63 #define SERVER_BUSY_DNS 7
64 #define SERVER_CLOSING 8
65 #define SERVER_GRACEFUL 9
66 #define SERVER_IDLE_KILL 10
67 #define SERVER_NUM_STATUS 11
183 int child_num,
int thread_num);
185 int child_num,
int thread_num);
187 int *pchild_num,
int *pthread_num);
220 int child_num,
int thread_num);
248 #define START_PREQUEST 1
249 #define STOP_PREQUEST 2
Symbol export macros and hook functions.
#define AP_DECLARE_HOOK(ret, name, args)
Definition: ap_hooks.h:74
APR-UTIL registration of functions exported by modules.
APR Portability Routines.
APR Shared Memory Routines.
APR Thread and Process Library.
request_rec * r
Definition: mod_dav.h:518
int status
Definition: mod_dav.h:141
const char * s
Definition: mod_dav.h:1327
int apr_status_t
Definition: apr_errno.h:44
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
pthread_t apr_os_thread_t
Definition: apr_portable.h:152
apr_int64_t apr_time_t
Definition: apr_time.h:45
int pre_mpm(apr_pool_t *p, ap_scoreboard_e sb_type)
#define AP_DECLARE_DATA
Definition: macros.h:15
#define AP_DECLARE(x)
Definition: macros.h:1
void ap_create_sb_handle(ap_sb_handle_t **new_sbh, apr_pool_t *p, int child_num, int thread_num)
void ap_set_conn_count(ap_sb_handle_t *sb, request_rec *r, unsigned short conn_count)
AP_DECLARE_DATA scoreboard * ap_scoreboard_image
AP_DECLARE_DATA int ap_mod_status_reqtail
const char * ap_set_reqtail(cmd_parms *cmd, void *dummy, int arg)
const char * ap_set_extended_status(cmd_parms *cmd, void *dummy, int arg)
void ap_update_sb_handle(ap_sb_handle_t *sbh, int child_num, int thread_num)
int ap_generation_t
Definition: scoreboard.h:78
apr_status_t ap_cleanup_scoreboard(void *d)
void ap_time_process_request(ap_sb_handle_t *sbh, int status)
int ap_update_child_status_from_server(ap_sb_handle_t *sbh, int status, conn_rec *c, server_rec *s)
void ap_init_scoreboard(void *shared_score)
process_score * ap_get_scoreboard_process(int x)
void ap_copy_scoreboard_worker(worker_score *dest, int child_num, int thread_num)
int ap_create_scoreboard(apr_pool_t *p, ap_scoreboard_e t)
int ap_exists_scoreboard_image(void)
AP_DECLARE_DATA const char * ap_scoreboard_fname
worker_score * ap_get_scoreboard_worker(ap_sb_handle_t *sbh)
apr_status_t ap_reopen_scoreboard(apr_pool_t *p, apr_shm_t **shm, int detached)
int ap_update_child_status(ap_sb_handle_t *sbh, int status, request_rec *r)
ap_scoreboard_e
Definition: scoreboard.h:83
@ SB_SHARED
Definition: scoreboard.h:85
@ SB_NOT_SHARED
Definition: scoreboard.h:84
worker_score * ap_get_scoreboard_worker_from_indexes(int child_num, int thread_num)
int ap_update_global_status(void)
int ap_update_child_status_descr(ap_sb_handle_t *sbh, int status, const char *descr)
global_score * ap_get_scoreboard_global(void)
int ap_calc_scoreboard_size(void)
int ap_update_child_status_from_indexes(int child_num, int thread_num, int status, request_rec *r)
AP_DECLARE_DATA int ap_extended_status
void ap_sb_get_child_thread(ap_sb_handle_t *sbh, int *pchild_num, int *pthread_num)
int ap_find_child_by_pid(apr_proc_t *pid)
int ap_update_child_status_from_conn(ap_sb_handle_t *sbh, int status, conn_rec *c)
struct ap_sb_handle_t ap_sb_handle_t
Definition: scoreboard.h:163
const char * ap_set_scoreboard(cmd_parms *cmd, void *dummy, const char *arg)
void ap_increment_counts(ap_sb_handle_t *sbh, request_rec *r)
Definition: apr_thread_proc.h:134
Definition: apr_arch_shm.h:61
Definition: http_config.h:288
Structure to store things which are per connection.
Definition: httpd.h:1193
Definition: scoreboard.h:123
ap_generation_t running_generation
Definition: scoreboard.h:126
int thread_limit
Definition: scoreboard.h:125
int server_limit
Definition: scoreboard.h:124
apr_time_t restart_time
Definition: scoreboard.h:129
Definition: scoreboard.h:137
apr_uint32_t write_completion
Definition: scoreboard.h:147
apr_uint32_t connections
Definition: scoreboard.h:146
pid_t pid
Definition: scoreboard.h:138
apr_uint32_t keep_alive
Definition: scoreboard.h:149
char not_accepting
Definition: scoreboard.h:143
ap_generation_t generation
Definition: scoreboard.h:139
apr_uint32_t lingering_close
Definition: scoreboard.h:148
apr_uint32_t suspended
Definition: scoreboard.h:150
char quiescing
Definition: scoreboard.h:140
A structure that represents the current request.
Definition: httpd.h:856
Definition: scoreboard.h:157
worker_score ** servers
Definition: scoreboard.h:160
process_score * parent
Definition: scoreboard.h:159
global_score * global
Definition: scoreboard.h:158
A structure to store information for each virtual server.
Definition: httpd.h:1382
Definition: scoreboard.h:90
unsigned char status
Definition: scoreboard.h:102
pid_t pid
Definition: scoreboard.h:100
char vhost[32]
Definition: scoreboard.h:117
char client[32]
Definition: scoreboard.h:115
char client64[64]
Definition: scoreboard.h:119
unsigned long my_access_count
Definition: scoreboard.h:107
apr_off_t my_bytes_served
Definition: scoreboard.h:108
unsigned short conn_count
Definition: scoreboard.h:103
int thread_num
Definition: scoreboard.h:94
unsigned long access_count
Definition: scoreboard.h:105
apr_off_t conn_bytes
Definition: scoreboard.h:104
apr_time_t stop_time
Definition: scoreboard.h:110
apr_time_t start_time
Definition: scoreboard.h:109
char request[64]
Definition: scoreboard.h:116
ap_generation_t generation
Definition: scoreboard.h:101
char protocol[16]
Definition: scoreboard.h:118
apr_off_t bytes_served
Definition: scoreboard.h:106
apr_os_thread_t tid
Definition: scoreboard.h:92
apr_time_t duration
Definition: scoreboard.h:120
struct tms times
Definition: scoreboard.h:113
apr_time_t last_used
Definition: scoreboard.h:111