aboutsummaryrefslogtreecommitdiff
path: root/nscd/nscd_stat.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-09-10 20:31:41 +0000
committerUlrich Drepper <drepper@redhat.com>2004-09-10 20:31:41 +0000
commitd13a3c579285d877984c5d9b7fa0ceb671b8a812 (patch)
treecc7ecf114f69d6e0b1dbbd39ecd753215f164f9e /nscd/nscd_stat.c
parentc0097ea1eb4684e12bc4f73fdd5384c4e9fcd9bd (diff)
downloadglibc-d13a3c579285d877984c5d9b7fa0ceb671b8a812.zip
glibc-d13a3c579285d877984c5d9b7fa0ceb671b8a812.tar.gz
glibc-d13a3c579285d877984c5d9b7fa0ceb671b8a812.tar.bz2
Update.
2004-09-10 Ulrich Drepper <drepper@redhat.com> * nscd/nscd_stat.c: Improve output by also printing .shared and .persistent. * nscd/connections.c: Allow cache sharing to be really disabled.
Diffstat (limited to 'nscd/nscd_stat.c')
-rw-r--r--nscd/nscd_stat.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/nscd/nscd_stat.c b/nscd/nscd_stat.c
index 30f427b..73dafe1 100644
--- a/nscd/nscd_stat.c
+++ b/nscd/nscd_stat.c
@@ -38,6 +38,8 @@ struct dbstat
{
int enabled;
int check_file;
+ int shared;
+ int persistent;
size_t module;
unsigned long int postimeout;
@@ -88,6 +90,8 @@ send_stats (int fd, struct database_dyn dbs[lastdb])
{
data.dbs[cnt].enabled = dbs[cnt].enabled;
data.dbs[cnt].check_file = dbs[cnt].check_file;
+ data.dbs[cnt].shared = dbs[cnt].shared;
+ data.dbs[cnt].persistent = dbs[cnt].persistent;
data.dbs[cnt].module = dbs[cnt].head->module;
data.dbs[cnt].postimeout = dbs[cnt].postimeout;
data.dbs[cnt].negtimeout = dbs[cnt].negtimeout;
@@ -213,6 +217,9 @@ receive_print_stats (void)
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);
if (enabled[0] == '\0')
/* The locale does not provide this information so we have to
@@ -221,6 +228,10 @@ receive_print_stats (void)
enabled = data.dbs[i].enabled ? _(" yes") : _(" no");
if (check_file[0] == '\0')
check_file = data.dbs[i].check_file ? _(" yes") : _(" no");
+ if (shared[0] == '\0')
+ shared = data.dbs[i].shared ? _(" yes") : _(" no");
+ if (persistent[0] == '\0')
+ persistent = data.dbs[i].persistent ? _(" yes") : _(" no");
if (all == 0)
/* If nothing happened so far report a 0% hit rate. */
@@ -228,6 +239,8 @@ receive_print_stats (void)
printf (_("\n%s cache:\n\n"
"%15s cache is enabled\n"
+ "%15s cache is persistent\n"
+ "%15s cache is shared\n"
"%15zu suggested size\n"
"%15zu total data pool size\n"
"%15zu used data pool size\n"
@@ -245,7 +258,7 @@ receive_print_stats (void)
"%15" PRIuMAX " number of delays on wrlock\n"
"%15" PRIuMAX " memory allocations failed\n"
"%15s check /etc/%s for changes\n"),
- dbnames[i], enabled,
+ dbnames[i], enabled, persistent, shared,
data.dbs[i].module,
data.dbs[i].datasize, data.dbs[i].dataused,
data.dbs[i].postimeout, data.dbs[i].negtimeout,