summaryrefslogtreecommitdiff
path: root/nscd/nscd.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-04-26 04:15:50 +0000
committerUlrich Drepper <drepper@redhat.com>2003-04-26 04:15:50 +0000
commitc86e6aec55e00afc6aca584b13ce8e64ff305d51 (patch)
tree9ff99e44e223a8ddf051fa116698f59296a389be /nscd/nscd.c
parent468777e1d0dbd6cb8bcaee244a954824d5c84167 (diff)
Update.
* nscd/cache.c (cache_search): Keep track of how many chain links we searched and update table statistics. (cache_add): Keep track of how many values are in the table. (prune_cache): Likewise. Keep track of locking success. Print messages about removed entries in separate pass. * nscd/connections.c (handle_request): Don't print debug message here. The caller will do it. Keep track of locking success. (nscd_run): Print debug message. Also print PID of the client process. * nscd/nscd.c (start_time): New variable. (main): Remember start time. * nscd/nscd.h: Declare start_time. (struct database): Add more members for new statistics. * nscd/nscd_stat.c: Add support for sending, receiving, and printing of new statistics.
Diffstat (limited to 'nscd/nscd.c')
-rw-r--r--nscd/nscd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/nscd/nscd.c b/nscd/nscd.c
index 5844b38407..3d55741df1 100644
--- a/nscd/nscd.c
+++ b/nscd/nscd.c
@@ -72,6 +72,8 @@ int secure[lastdb];
int secure_in_use;
static const char *conffile = _PATH_NSCDCONF;
+time_t start_time;
+
static int check_pid (const char *file);
static int write_pid (const char *file);
@@ -131,6 +133,9 @@ main (int argc, char **argv)
if (check_pid (_PATH_NSCDPID))
error (EXIT_FAILURE, 0, _("already running"));
+ /* Remember when we started. */
+ start_time = time (NULL);
+
/* Behave like a daemon. */
if (go_background)
{