diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-12-08 01:32:36 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-12-08 01:32:36 +1030 |
commit | 0dbe76f88f783fa9f1e0aa6534ef903537658b22 (patch) | |
tree | 604f9fef33ce86d6d8593dfad6667cf821ffe278 /ctdb/server/eventscript.c | |
parent | 9e87377e7a0164757cd437f5b19698dc44a64c21 (diff) | |
download | samba-0dbe76f88f783fa9f1e0aa6534ef903537658b22.tar.gz samba-0dbe76f88f783fa9f1e0aa6534ef903537658b22.tar.xz samba-0dbe76f88f783fa9f1e0aa6534ef903537658b22.zip |
eventscript: lock logging on timeout.
Ronnie suggested this; seems like a very good idea.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 93153bca68926401dc9ae7fd77ed3f17be923344)
Diffstat (limited to 'ctdb/server/eventscript.c')
-rw-r--r-- | ctdb/server/eventscript.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ctdb/server/eventscript.c b/ctdb/server/eventscript.c index 91137ee107..3e857f7ee6 100644 --- a/ctdb/server/eventscript.c +++ b/ctdb/server/eventscript.c @@ -61,7 +61,8 @@ static void sigterm(int sig) t = time(NULL); strftime(tbuf, sizeof(tbuf)-1, "%Y%m%d%H%M%S", localtime(&t)); - sprintf(buf, "pstree -p >/tmp/ctdb.event.%s.%d", tbuf, getpid()); + sprintf(buf, "{ pstree -p; cat /proc/locks; ls -li /var/ctdb/ /var/ctdb/persistent; }" + " >/tmp/ctdb.event.%s.%d", tbuf, getpid()); system(buf); DEBUG(DEBUG_ERR,("Logged timedout eventscript : %s\n", buf)); |