aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2010-04-08 19:58:29 -0700
committerUlrich Drepper <drepper@redhat.com>2010-04-08 19:58:29 -0700
commitd55d558b4ecf2a9ef4869982ce6c32f9c496bbe7 (patch)
treed09d1f722d78240bf424bd25f7d54e845eaf365b
parent42464d7fe8a4fab468b12466e52f9552e4940fcf (diff)
downloadglibc-d55d558b4ecf2a9ef4869982ce6c32f9c496bbe7.zip
glibc-d55d558b4ecf2a9ef4869982ce6c32f9c496bbe7.tar.gz
glibc-d55d558b4ecf2a9ef4869982ce6c32f9c496bbe7.tar.bz2
Print reload count in nscd statistics.
-rw-r--r--ChangeLog5
-rw-r--r--nscd/nscd_stat.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 540d1b4..fe493ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2010-04-08 Ulrich Drepper <drepper@redhat.com>
+ [BZ #10915]
+ * nscd/nscd_stat.c (struct statdata): Add reload_count field.
+ (send_stats): Fill in reload_count.
+ (receive_print_stats): Print reload_count.
+
* sysdeps/unix/sysv/linux/getlogin_r.c (__getlogin_r_loginuid): When
reading the loginuid file use a buffer which is always large enough.
NUL-terminate the string.
diff --git a/nscd/nscd_stat.c b/nscd/nscd_stat.c
index 7f6bd1c..658fd56 100644
--- a/nscd/nscd_stat.c
+++ b/nscd/nscd_stat.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 1998, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (c) 1998, 2003, 2004, 2005, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1998.
@@ -80,6 +80,7 @@ struct statdata
int max_nthreads;
int paranoia;
time_t restart_interval;
+ unsigned int reload_count;
int ndbs;
struct dbstat dbs[lastdb];
#ifdef HAVE_SELINUX
@@ -102,6 +103,7 @@ send_stats (int fd, struct database_dyn dbs[lastdb])
data.max_nthreads = max_nthreads;
data.paranoia = paranoia;
data.restart_interval = restart_interval;
+ data.reload_count = reload_count;
data.ndbs = lastdb;
for (cnt = 0; cnt < lastdb; ++cnt)
@@ -240,10 +242,11 @@ receive_print_stats (void)
"%15d maximum number of threads\n"
"%15lu number of times clients had to wait\n"
"%15s paranoia mode enabled\n"
- "%15lu restart internal\n"),
+ "%15lu restart internal\n"
+ "%15u reload count\n"),
data.nthreads, data.max_nthreads, data.client_queued,
data.paranoia ? yesstr : nostr,
- (unsigned long int) data.restart_interval);
+ (unsigned long int) data.restart_interval, data.reload_count);
for (i = 0; i < lastdb; ++i)
{