MCPcopy Index your code
hub / github.com/apache/httpd / status_handler

Function status_handler

modules/generators/mod_status.c:182–990  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180static char status_flags[MOD_STATUS_NUM_STATUS];
181
182static int status_handler(request_rec *r)
183{
184 const char *loc;
185 apr_time_t nowtime;
186 apr_uint32_t up_time;
187 ap_loadavg_t t;
188 int j, i, res, written;
189 int idle;
190 int graceful;
191 int busy;
192 unsigned long count;
193 unsigned long lres, my_lres, conn_lres;
194 apr_off_t bytes, my_bytes, conn_bytes;
195 apr_off_t bcount, kbcount;
196 long req_time;
197 apr_time_t duration_global;
198 apr_time_t duration_slot;
199 int short_report;
200 int no_table_report;
201 global_score *global_record;
202 worker_score *ws_record;
203 process_score *ps_record;
204 char *stat_buffer;
205 pid_t *pid_buffer, worker_pid;
206 int *thread_idle_buffer = NULL;
207 int *thread_graceful_buffer = NULL;
208 int *thread_busy_buffer = NULL;
209 clock_t tu, ts, tcu, tcs;
210 clock_t gu, gs, gcu, gcs;
211 ap_generation_t mpm_generation, worker_generation;
212#ifdef HAVE_TIMES
213 float tick;
214 int times_per_thread;
215#endif
216
217 if (strcmp(r->handler, STATUS_MAGIC_TYPE) && strcmp(r->handler,
218 "server-status")) {
219 return DECLINED;
220 }
221
222#ifdef HAVE_TIMES
223 times_per_thread = getpid() != child_pid;
224#endif
225
226 ap_mpm_query(AP_MPMQ_GENERATION, &mpm_generation);
227
228#ifdef HAVE_TIMES
229#ifdef _SC_CLK_TCK
230 tick = sysconf(_SC_CLK_TCK);
231#else
232 tick = HZ;
233#endif
234#endif
235
236 idle = 0;
237 graceful = 0;
238 busy = 0;
239 count = 0;

Callers

nothing calls this directly

Calls 15

ap_mpm_queryFunction · 0.85
ap_get_scoreboard_globalFunction · 0.85
ap_set_content_type_exFunction · 0.85
ap_strstr_cFunction · 0.85
ap_get_loadavgFunction · 0.85
ap_rputsFunction · 0.85
ap_rvputsFunction · 0.85
ap_get_server_nameFunction · 0.85

Tested by

no test coverage detected