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