Show (dbglevel 1) the number of file descriptors available.

This commit is contained in:
default 2023-02-10 13:45:26 +01:00
parent 03325d04a5
commit 5f89816bb4

View file

@ -419,9 +419,10 @@ void httpd(void)
srv_log(xs_fmt("httpd start %s:%d %s", address, port, USER_AGENT)); srv_log(xs_fmt("httpd start %s:%d %s", address, port, USER_AGENT));
/* show the number of usable file descriptors */
struct rlimit r; struct rlimit r;
getrlimit(RLIMIT_NOFILE, &r); getrlimit(RLIMIT_NOFILE, &r);
srv_debug(0, xs_fmt("available (rlimit) fds: %d (cur)/%d (max)", srv_debug(1, xs_fmt("available (rlimit) fds: %d (cur) / %d (max)",
(int) r.rlim_cur, (int) r.rlim_max)); (int) r.rlim_cur, (int) r.rlim_max));
/* initialize the job control engine */ /* initialize the job control engine */