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