aboutsummaryrefslogtreecommitdiff
path: root/nscd/nscd_stat.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-10-03 21:11:37 +0000
committerUlrich Drepper <drepper@redhat.com>2004-10-03 21:11:37 +0000
commit27e828564328ee5270450729bbb6902f6f62ba47 (patch)
tree1070cd10e6352100d6a8c0aa7edfdf99e61e0e15 /nscd/nscd_stat.c
parent4401d759051714fcc016a146685f3c13bed49442 (diff)
downloadglibc-27e828564328ee5270450729bbb6902f6f62ba47.zip
glibc-27e828564328ee5270450729bbb6902f6f62ba47.tar.gz
glibc-27e828564328ee5270450729bbb6902f6f62ba47.tar.bz2
Update.
Dynamically create new threads if necessary. * nscd/connections.c (fd_ready): If no thread available for processing the request, create a new one unless the limit is reached. (start_threads): Check errors from pthread_create. * nscd/nscd.h: Declare max_nthreads. * nscd/nscd_conf.c: Parse max-nthreads entry. * nscd/nscd.conf: Add max-threads entry. * nscd/nscd_stat.c: Print current and maximum number of threads.
Diffstat (limited to 'nscd/nscd_stat.c')
-rw-r--r--nscd/nscd_stat.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/nscd/nscd_stat.c b/nscd/nscd_stat.c
index a56a381..9231642 100644
--- a/nscd/nscd_stat.c
+++ b/nscd/nscd_stat.c
@@ -143,8 +143,8 @@ receive_print_stats (void)
int fd;
int i;
uid_t uid = getuid ();
- const char *yesstr = _(" yes");
- const char *nostr = _(" no");
+ const char *yesstr = nl_langinfo (YESSTR);
+ const char *nostr = nl_langinfo (NOSTR);
/* Find out whether there is another user but root allowed to
request statistics. */
@@ -225,22 +225,22 @@ receive_print_stats (void)
else
printf (_(" %2lus server runtime\n"), diff);
- printf (_("%15lu number of times clients had to wait\n"
+ printf (_("%15d current number of threads\n"
+ "%15d maximum number of threads\n"
+ "%15lu number of times clients had to wait\n"
"%15s paranoia mode enabled\n"
"%15lu restart internal\n"),
- data.client_queued, paranoia ? yesstr : nostr,
- (unsigned long int) restart_interval);
+ nthreads, max_nthreads, data.client_queued,
+ paranoia ? yesstr : nostr, (unsigned long int) restart_interval);
for (i = 0; i < lastdb; ++i)
{
unsigned long int hit = data.dbs[i].poshit + data.dbs[i].neghit;
unsigned long int all = hit + data.dbs[i].posmiss + data.dbs[i].negmiss;
- const char *enabled = nl_langinfo (data.dbs[i].enabled ? YESSTR : NOSTR);
- const char *check_file = nl_langinfo (data.dbs[i].check_file
- ? YESSTR : NOSTR);
- const char *shared = nl_langinfo (data.dbs[i].shared ? YESSTR : NOSTR);
- const char *persistent = nl_langinfo (data.dbs[i].persistent
- ? YESSTR : NOSTR);
+ const char *enabled = data.dbs[i].enabled ? yesstr : nostr;
+ const char *check_file = data.dbs[i].check_file ? yesstr : nostr;
+ const char *shared = data.dbs[i].shared ? yesstr : nostr;
+ const char *persistent = data.dbs[i].persistent ? yesstr : nostr;
if (enabled[0] == '\0')
/* The locale does not provide this information so we have to