[PATCH] s3: log client flags for idle state in winbindd
Pierre Carrier
pcarrier at redhat.com
Mon Sep 13 09:05:12 MDT 2010
Include client flags to explain their active/idle state in the logs,
whether (SIGUSR2 is received, DEBUGLEVEL >= 5) or we couldn't find any idle client.
---
Applies on top of
Message-Id: <1284386243-29514-1-git-send-email-pcarrier at redhat.com>
Subject: [PATCH] s3: runtime maximum winbindd simultaneous clients
source3/winbindd/winbindd.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index 16a9fad..221d458 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -101,6 +101,13 @@ static void winbindd_status(void)
DEBUGADD(2, ("\t\tpid %lu, sock %d (%s)\n",
(unsigned long)tmp->pid, tmp->sock,
client_is_idle(tmp) ? "idle" : "active"));
+ DEBUGADD(5, ("\t\t\t%s%s%s%s\n"
+ ((tmp->response.result == WINBINDD_PENDING) ?
+ "P" : ""),
+ ((tmp->fd_event.flags == EVENT_FD_READ) ?
+ "r" : ""),
+ ((tmp->getpwent_stat) ? "p" : ""),
+ ((tmp->getgrent_state) ? "g" : "")));
}
}
}
@@ -918,6 +925,8 @@ static void winbindd_listen_fde_handler(struct tevent_context *ev,
DEBUG(0,("winbindd: Exceeding %d "
"client connections, no idle "
"connection found\n", max_clients));
+ if (DEBUGLEVEL >= 2)
+ winbindd_status();
break;
}
}
--
1.7.2.3
More information about the samba-technical
mailing list