Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance status with reporting maximum number of open files (sockets) #1016

Closed
wants to merge 6 commits into from
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/chanprog.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ void tell_verbose_status(int idx)
int i;
time_t now2 = now - online_since, hr, min;
double cputime, cache_total;
struct rlimit rlp;

i = count_users(userlist);
dprintf(idx, "I am %s, running %s: %d user%s (mem: %uk).\n",
Expand Down Expand Up @@ -366,6 +367,10 @@ void tell_verbose_status(int idx)
"Threaded DNS core is disabled.\n"
#endif
"Socket table: %d/%d\n", threaddata()->MAXSOCKS, max_socks);

if (!getrlimit(RLIMIT_NOFILE, &rlp))
dprintf(idx, "Maximum number of open files (sockets): soft limit %ju hard limit %ju\n",
(uintmax_t) rlp.rlim_cur, (uintmax_t) rlp.rlim_max);
}

/* Show all internal state variables
Expand Down