/* $Id: fpm_status.h 312263 2011-06-18 17:46:16Z felipe $ */ /* (c) 2009 Jerome Loyet */ #ifndef FPM_SCOREBOARD_H #define FPM_SCOREBOARD_H 1 #include <sys/time.h> #ifdef HAVE_TIMES #include <sys/times.h> #endif #include "fpm_request.h" #include "fpm_worker_pool.h" #include "fpm_atomic.h" #define FPM_SCOREBOARD_ACTION_SET 0 #define FPM_SCOREBOARD_ACTION_INC 1 struct fpm_scoreboard_proc_s { union { atomic_t lock; char dummy[16]; }; int used; time_t start_epoch; pid_t pid; unsigned long requests; enum fpm_request_stage_e request_stage; struct timeval accepted; struct timeval duration; time_t accepted_epoch; struct timeval tv; char request_uri[128]; char query_string[512]; char request_method[16]; size_t content_length; /* used with POST only */ char script_filename[256]; char auth_user[32]; #ifdef HAVE_TIMES struct tms cpu_accepted; struct timeval cpu_duration; struct tms last_request_cpu; struct timeval last_request_cpu_duration; #endif size_t memory; }; struct fpm_scoreboard_s { union { atomic_t lock; char dummy[16]; }; char pool[32]; int pm; time_t start_epoch; int idle; int active; int active_max; unsigned long int requests; unsigned int max_children_reached; int lq; int lq_max; unsigned int lq_len; unsigned int nprocs; int free_proc; unsigned long int slow_rq; struct fpm_scoreboard_proc_s *procs[]; }; int fpm_scoreboard_init_main(); int fpm_scoreboard_init_child(struct fpm_worker_pool_s *wp); void fpm_scoreboard_update(int idle, int active, int lq, int lq_len, int requests, int max_children_reached, int slow_rq, int action, struct fpm_scoreboard_s *scoreboard); struct fpm_scoreboard_s *fpm_scoreboard_get(); struct fpm_scoreboard_proc_s *fpm_scoreboard_proc_get(struct fpm_scoreboard_s *scoreboard, int child_index); struct fpm_scoreboard_s *fpm_scoreboard_acquire(struct fpm_scoreboard_s *scoreboard, int nohang); void fpm_scoreboard_release(struct fpm_scoreboard_s *scoreboard); struct fpm_scoreboard_proc_s *fpm_scoreboard_proc_acquire(struct fpm_scoreboard_s *scoreboard, int child_index, int nohang); void fpm_scoreboard_proc_release(struct fpm_scoreboard_proc_s *proc); void fpm_scoreboard_free(struct fpm_scoreboard_s *scoreboard); void fpm_scoreboard_child_use(struct fpm_scoreboard_s *scoreboard, int child_index, pid_t pid); void fpm_scoreboard_proc_free(struct fpm_scoreboard_s *scoreboard, int child_index); int fpm_scoreboard_proc_alloc(struct fpm_scoreboard_s *scoreboard, int *child_index); #ifdef HAVE_TIMES float fpm_scoreboard_get_tick(); #endif #endif
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
events | Folder | 0755 |
|
|
fastcgi.c | File | 25.94 KB | 0644 |
|
fastcgi.h | File | 4.47 KB | 0644 |
|
fpm.c | File | 2.84 KB | 0644 |
|
fpm.h | File | 1.13 KB | 0644 |
|
fpm_arrays.h | File | 1.82 KB | 0644 |
|
fpm_atomic.h | File | 3.95 KB | 0644 |
|
fpm_children.c | File | 10.99 KB | 0644 |
|
fpm_children.h | File | 873 B | 0644 |
|
fpm_cleanup.c | File | 849 B | 0644 |
|
fpm_cleanup.h | File | 519 B | 0644 |
|
fpm_clock.c | File | 2.23 KB | 0644 |
|
fpm_clock.h | File | 239 B | 0644 |
|
fpm_conf.c | File | 49.14 KB | 0644 |
|
fpm_conf.h | File | 2.43 KB | 0644 |
|
fpm_env.c | File | 5.39 KB | 0644 |
|
fpm_env.h | File | 491 B | 0644 |
|
fpm_events.c | File | 11.67 KB | 0644 |
|
fpm_events.h | File | 1.59 KB | 0644 |
|
fpm_log.c | File | 11.53 KB | 0644 |
|
fpm_log.h | File | 300 B | 0644 |
|
fpm_main.c | File | 62.74 KB | 0644 |
|
fpm_php.c | File | 6.42 KB | 0644 |
|
fpm_php.h | File | 1.23 KB | 0644 |
|
fpm_php_trace.c | File | 3.49 KB | 0644 |
|
fpm_process_ctl.c | File | 13.65 KB | 0644 |
|
fpm_process_ctl.h | File | 1.23 KB | 0644 |
|
fpm_request.c | File | 8.01 KB | 0644 |
|
fpm_request.h | File | 1.18 KB | 0644 |
|
fpm_scoreboard.c | File | 7.84 KB | 0644 |
|
fpm_scoreboard.h | File | 2.5 KB | 0644 |
|
fpm_shm.c | File | 1.23 KB | 0644 |
|
fpm_shm.h | File | 263 B | 0644 |
|
fpm_signals.c | File | 4.72 KB | 0644 |
|
fpm_signals.h | File | 315 B | 0644 |
|
fpm_sockets.c | File | 11.39 KB | 0644 |
|
fpm_sockets.h | File | 1006 B | 0644 |
|
fpm_status.c | File | 13.7 KB | 0644 |
|
fpm_status.h | File | 1.03 KB | 0644 |
|
fpm_stdio.c | File | 7.36 KB | 0644 |
|
fpm_stdio.h | File | 569 B | 0644 |
|
fpm_str.h | File | 483 B | 0644 |
|
fpm_systemd.c | File | 3.11 KB | 0644 |
|
fpm_systemd.h | File | 275 B | 0644 |
|
fpm_trace.c | File | 641 B | 0644 |
|
fpm_trace.h | File | 378 B | 0644 |
|
fpm_trace_ptrace.c | File | 1.6 KB | 0644 |
|
fpm_unix.c | File | 19.23 KB | 0644 |
|
fpm_unix.h | File | 518 B | 0644 |
|
fpm_worker_pool.c | File | 1.57 KB | 0644 |
|
fpm_worker_pool.h | File | 1.23 KB | 0644 |
|
zlog.c | File | 4.47 KB | 0644 |
|
zlog.h | File | 978 B | 0644 |
|