1 2 /* $Id$ */ 3 /* (c) 2009 Jerome Loyet */ 4 5 #ifndef FPM_STATUS_H 6 #define FPM_STATUS_H 1 7 #include "fpm_worker_pool.h" 8 #include "fpm_shm.h" 9 10 #define FPM_STATUS_BUFFER_SIZE 512 11 12 struct fpm_status_s { 13 int pm; 14 int idle; 15 int active; 16 int total; 17 unsigned cur_lq; 18 int max_lq; 19 unsigned long int accepted_conn; 20 unsigned int max_children_reached; 21 struct timeval last_update; 22 }; 23 24 int fpm_status_init_child(struct fpm_worker_pool_s *wp); 25 void fpm_status_update_activity(struct fpm_shm_s *shm, int idle, int active, int total, unsigned cur_lq, int max_lq, int clear_last_update); 26 void fpm_status_update_accepted_conn(struct fpm_shm_s *shm, unsigned long int accepted_conn); 27 void fpm_status_increment_accepted_conn(struct fpm_shm_s *shm); 28 void fpm_status_set_pm(struct fpm_shm_s *shm, int pm); 29 void fpm_status_update_max_children_reached(struct fpm_shm_s *shm, unsigned int max_children_reached); 30 void fpm_status_increment_max_children_reached(struct fpm_shm_s *shm); 31 int fpm_status_handle_request(TSRMLS_D); 32 33 extern struct fpm_shm_s *fpm_status_shm; 34 35 #endif 36