[SCM] CTDB repository - branch 2.5 updated - ctdb-2.5.3-148-g99c1abb

Amitay Isaacs amitay at samba.org
Sun Sep 14 21:51:31 MDT 2014


The branch, 2.5 has been updated
       via  99c1abbefc4a643d3f83ec210509cd2bd5556642 (commit)
       via  dd16e6f50b3a730a77913116ca6079c2cf72eff0 (commit)
       via  dc29ce1695fc21a310de8d58756b93c9d0d9e665 (commit)
       via  bf0a58f15c81eed0b1a4d410cc77193e031365cb (commit)
       via  97279b56c5e0dfddabcb6fbdd357a20f01311f6d (commit)
       via  bdf317134207b81165d10b566885a35aa3affa3a (commit)
       via  5aad7248bc0e99b17ba38a0c52d84c3062f262ec (commit)
       via  5e461128ace8e3973f8ca6056349ecf22f0678cd (commit)
       via  44757c5ad6d3d64daa93a9f32d8c0c0397a80069 (commit)
      from  0bd495ebafb5d423b98934e219a2c097603c005a (commit)

http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=2.5


- Log -----------------------------------------------------------------
commit 99c1abbefc4a643d3f83ec210509cd2bd5556642
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Fri Sep 12 16:24:09 2014 +1000

    doc: Add reference to new magepage ctdb-statistics
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    
    Autobuild-User(master): Amitay Isaacs <amitay at samba.org>
    Autobuild-Date(master): Fri Sep 12 11:13:56 CEST 2014 on sn-devel-104
    
    (Imported from commit d744eb03c5236284cf0141c1a2f687263cbd8414)

commit dd16e6f50b3a730a77913116ca6079c2cf72eff0
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Fri Sep 12 14:22:00 2014 +1000

    doc: Add ctdb-statistics manual page
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    
    (Imported from commit efd34bb274a5ed015d7fe9374718671e0d7f9cc6)

commit dc29ce1695fc21a310de8d58756b93c9d0d9e665
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Fri Sep 12 10:50:27 2014 +1000

    daemon: Decrement pending calls statistics when calls are deferred
    
    Deferred calls should not be treated as pending calls since they are
    re-processed from the beginning.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    
    (Imported from commit f5f11e1a05d4d75a7662d6c413a14c4cd18f8ed9)

commit bf0a58f15c81eed0b1a4d410cc77193e031365cb
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Fri Sep 12 11:25:14 2014 +1000

    tests: Do not expect real-time priority when running local daemons
    
    Local daemons are started mainly for testing and usually not as root.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    
    (Imported from commit 3c1bae12217ead74863a7cdd9b8a338aef80adb1)

commit 97279b56c5e0dfddabcb6fbdd357a20f01311f6d
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Fri Sep 12 11:22:36 2014 +1000

    daemon: Make sure ctdb runs with real-time priority
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    
    (Imported from commit d410b20601cccd8b67d48c42a6d689cd65e94f61)

commit bdf317134207b81165d10b566885a35aa3affa3a
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Aug 13 15:01:54 2014 +1000

    locking: Fork lock helper with vfork_with_logging()
    
    Otherwise errors printed by the lock helper get lost.
    
    lock_helper_args() no longer adds the program name to the list of
    arguments, since vfork_with_logging() does that.  Update the lock
    helper to handle the extra log_fd parameter passed by
    vfork_with_logging() and send stdout/stderr there.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    
    (Imported from commit 7ae7a9c46301e4fed870516c448a79bb7a9ac53a)

commit 5aad7248bc0e99b17ba38a0c52d84c3062f262ec
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Aug 13 14:46:31 2014 +1000

    locking: Add argc parameter to lock_helper_args()
    
    To make this sane, also add an argv parameter and change the return
    type to bool.  Anticipating a subsequent change, make the type of argv
    match what is needed by vfork_with_logging() and cast it when passing
    to execv().  This also means changing the type of the name member of
    struct db_namelist.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    
    (Imported from commit 2e17b0ecddffb8590c4e8b9afaf1767ef7e8f89c)

commit 5e461128ace8e3973f8ca6056349ecf22f0678cd
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Wed Sep 10 18:14:24 2014 +1000

    locking: Set real-time priority for lock helpers
    
    To avoid lock helper starvation when userspace robust mutexes are
    enabled.
    
    Commit 6f072f85a138f595494dbec137bcf23d1e666acc removed reset_scheduler(),
    to avoid resetting scheduler priority.  However, that is not sufficient
    because of commit 1be8564e553ce044426dbe7b3987edf514832940, which sets
    SCHED_RESET_ON_FORK flag.  With SCHED_RESET_ON_FORK, all CTDB child
    processes will automatically have normal scheduling priority.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    
    Autobuild-User(master): Martin Schwenke <martins at samba.org>
    Autobuild-Date(master): Thu Sep 11 11:31:10 CEST 2014 on sn-devel-104
    
    (Imported from commit 4e5a6b154e1549e959c5de4b58432e33c0d57b55)

commit 44757c5ad6d3d64daa93a9f32d8c0c0397a80069
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Tue Sep 9 19:01:55 2014 +1000

    daemon: Increment pending calls statistics correctly
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    
    (Imported from commit e6127a9eceb215e421ee56c09032bb1e81c8131e)

-----------------------------------------------------------------------

Summary of changes:
 Makefile.in                             |    1 +
 common/system_util.c                    |   11 +-
 doc/Makefile                            |    1 +
 doc/ctdb-statistics.7.xml               |  669 +++++++++++++++++++++++++++++++
 doc/ctdb.1.xml                          |   14 +-
 doc/ctdb.7.xml                          |    3 +
 include/ctdb_private.h                  |    2 +-
 packaging/RPM/ctdb.spec.in              |    1 +
 server/ctdb_daemon.c                    |   10 +-
 server/ctdb_lock.c                      |   77 ++--
 server/ctdb_lock_helper.c               |   30 +-
 tests/simple/scripts/local_daemons.bash |    2 +-
 12 files changed, 759 insertions(+), 62 deletions(-)
 create mode 100644 doc/ctdb-statistics.7.xml


Changeset truncated at 500 lines:

diff --git a/Makefile.in b/Makefile.in
index a8e74a4..118d80a 100755
--- a/Makefile.in
+++ b/Makefile.in
@@ -387,6 +387,7 @@ install: all manpages $(PMDA_INSTALL)
 	if [ -f doc/ping_pong.1 ];then ${INSTALLCMD} -m 644 doc/ping_pong.1 $(DESTDIR)$(mandir)/man1; fi
 	if [ -f doc/ctdb.7 ]; then ${INSTALLCMD} -d $(DESTDIR)$(mandir)/man7; fi
 	if [ -f doc/ctdb.7 ]; then ${INSTALLCMD} -m 644 doc/ctdb.7 $(DESTDIR)$(mandir)/man7; fi
+	if [ -f doc/ctdb-statistics.7 ]; then ${INSTALLCMD} -m 644 doc/ctdb-statistics.7 $(DESTDIR)$(mandir)/man7; fi
 	if [ -f doc/ctdb-tunables.7 ]; then ${INSTALLCMD} -m 644 doc/ctdb-tunables.7 $(DESTDIR)$(mandir)/man7; fi
 	if [ -f doc/ctdbd.conf.5 ]; then ${INSTALLCMD} -d $(DESTDIR)$(mandir)/man5; fi
 	if [ -f doc/ctdbd.conf.5 ]; then ${INSTALLCMD} -m 644 doc/ctdbd.conf.5 $(DESTDIR)$(mandir)/man5; fi
diff --git a/common/system_util.c b/common/system_util.c
index 344e7d7..761acbc 100644
--- a/common/system_util.c
+++ b/common/system_util.c
@@ -36,7 +36,7 @@
 /*
   if possible, make this task real time
  */
-void set_scheduler(void)
+bool set_scheduler(void)
 {
 #ifdef _AIX_
 #if HAVE_THREAD_SETSCHED
@@ -46,14 +46,15 @@ void set_scheduler(void)
 	ti = 0ULL;
 	if (getthrds64(getpid(), &te, sizeof(te), &ti, 1) != 1) {
 		DEBUG(DEBUG_ERR, ("Unable to get thread information\n"));
-		return;
+		return false;
 	}
 
 	if (thread_setsched(te.ti_tid, 0, SCHED_RR) == -1) {
 		DEBUG(DEBUG_ERR, ("Unable to set scheduler to SCHED_RR (%s)\n",
 				  strerror(errno)));
+		return false;
 	} else {
-		DEBUG(DEBUG_NOTICE, ("Set scheduler to SCHED_RR\n"));
+		return true;
 	}
 #endif
 #else /* no AIX */
@@ -69,11 +70,13 @@ void set_scheduler(void)
 	if (sched_setscheduler(0, policy, &p) == -1) {
 		DEBUG(DEBUG_CRIT,("Unable to set scheduler to SCHED_FIFO (%s)\n",
 			 strerror(errno)));
+		return false;
 	} else {
-		DEBUG(DEBUG_NOTICE,("Set scheduler to SCHED_FIFO\n"));
+		return true;
 	}
 #endif
 #endif
+	return false;
 }
 
 /*
diff --git a/doc/Makefile b/doc/Makefile
index 34303a5..b2240a3 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -6,6 +6,7 @@ DOCS = ctdb.1 ctdb.1.html \
 	ping_pong.1 ping_pong.1.html \
 	ctdbd.conf.5 ctdbd.conf.5.html \
 	ctdb.7 ctdb.7.html \
+	ctdb-statistics.7 ctdb-statistics.7.html \
 	ctdb-tunables.7 ctdb-tunables.7.html
 
 all: $(DOCS)
diff --git a/doc/ctdb-statistics.7.xml b/doc/ctdb-statistics.7.xml
new file mode 100644
index 0000000..77301ab
--- /dev/null
+++ b/doc/ctdb-statistics.7.xml
@@ -0,0 +1,669 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE refentry
+	PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+	"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+
+<refentry id="ctdb-statistics.7">
+
+  <refmeta>
+    <refentrytitle>ctdb-statistics</refentrytitle>
+    <manvolnum>7</manvolnum>
+    <refmiscinfo class="source">ctdb</refmiscinfo>
+    <refmiscinfo class="manual">CTDB - clustered TDB database</refmiscinfo>
+  </refmeta>
+
+  <refnamediv>
+    <refname>ctdb-statistics</refname>
+    <refpurpose>CTDB statistics output</refpurpose>
+  </refnamediv>
+
+  <refsect1>
+    <title>OVERALL STATISTICS</title>
+
+    <para>
+      CTDB maintains information about various messages communicated
+      and some of the important operations per node.  See the
+      <citerefentry><refentrytitle>ctdb</refentrytitle>
+      <manvolnum>1</manvolnum></citerefentry> commands
+      <command>statistics</command> and <command>statisticsreset</command>
+      for displaying statistics.
+    </para>
+
+      <refsect2>
+	<title>Example: ctdb statistics</title>
+	<screen>
+CTDB version 1
+Current time of statistics  :                Fri Sep 12 13:32:32 2014
+Statistics collected since  : (000 01:49:20) Fri Sep 12 11:43:12 2014
+ num_clients                        6
+ frozen                             0
+ recovering                         0
+ num_recoveries                     2
+ client_packets_sent           281293
+ client_packets_recv           296317
+ node_packets_sent             452387
+ node_packets_recv             182394
+ keepalive_packets_sent          3927
+ keepalive_packets_recv          3928
+ node
+     req_call                   48605
+     reply_call                     1
+     req_dmaster                23404
+     reply_dmaster              24917
+     reply_error                    0
+     req_message                  958
+     req_control               197513
+     reply_control             153705
+ client
+     req_call                  130866
+     req_message                  770
+     req_control               168921
+ timeouts
+     call                           0
+     control                        0
+     traverse                       0
+ locks
+     num_calls                    220
+     num_current                    0
+     num_pending                    0
+     num_failed                     0
+ total_calls                   130866
+ pending_calls                      0
+ childwrite_calls                   1
+ pending_childwrite_calls             0
+ memory_used                   334490
+ max_hop_count                     18
+ total_ro_delegations               2
+ total_ro_revokes                   2
+ hop_count_buckets: 42816 5464 26 1 0 0 0 0 0 0 0 0 0 0 0 0
+ lock_buckets: 9 165 14 15 7 2 2 0 0 0 0 0 0 0 0 0
+ locks_latency      MIN/AVG/MAX     0.000685/0.160302/6.369342 sec out of 214
+ reclock_ctdbd      MIN/AVG/MAX     0.004940/0.004969/0.004998 sec out of 2
+ reclock_recd       MIN/AVG/MAX     0.000000/0.000000/0.000000 sec out of 0
+ call_latency       MIN/AVG/MAX     0.000006/0.000719/4.562991 sec out of 126626
+ childwrite_latency MIN/AVG/MAX     0.014527/0.014527/0.014527 sec out of 1
+	</screen>
+      </refsect2>
+
+    <refsect2>
+      <title>CTDB version</title>
+      <para>
+        Version of the ctdb protocol used by the node.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>Current time of statistics</title>
+      <para>
+        Time when the statistics are generated.
+      </para>
+      <para>
+        This is useful when collecting statistics output periodically
+        for post-processing.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>Statistics collected since</title>
+      <para>
+	Time when ctdb was started or the last time statistics was reset.
+	The output shows the duration and the timestamp.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>num_clients</title>
+      <para>
+        Number of processes currently connected to CTDB's unix socket.
+        This includes recovery daemon, ctdb tool and samba processes
+        (smbd, winbindd).
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>frozen</title>
+      <para>
+	1 if the the databases are currently frozen, 0 otherwise.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>recovering</title>
+      <para>
+	1 if recovery is active, 0 otherwise.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>num_recoveries</title>
+      <para>
+	Number of recoveries since the start of ctdb or since the last
+	statistics reset.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>client_packets_sent</title>
+      <para>
+	Number of packets sent to client processes via unix domain socket.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>client_packets_recv</title>
+      <para>
+	Number of packets received from client processes via unix domain socket.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>node_packets_sent</title>
+      <para>
+	Number of packets sent to the other nodes in the cluster via TCP.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>node_packets_recv</title>
+      <para>
+	Number of packets received from the other nodes in the cluster via TCP.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>keepalive_packets_sent</title>
+      <para>
+	Number of keepalive messages sent to other nodes.
+      </para>
+      <para>
+	CTDB periodically sends keepalive messages to other nodes.
+	See <citetitle>KeepaliveInterval</citetitle> tunable in
+	<citerefentry><refentrytitle>ctdb-tunables</refentrytitle>
+	<manvolnum>7</manvolnum></citerefentry> for more details.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>keepalive_packets_recv</title>
+      <para>
+	Number of keepalive messages received from other nodes.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>node</title>
+      <para>
+	This section lists various types of messages processed which
+	originated from other nodes via TCP.
+      </para>
+
+    <refsect3>
+      <title>req_call</title>
+      <para>
+        Number of REQ_CALL messages from the other nodes.
+      </para>
+    </refsect3>
+
+    <refsect3>
+      <title>reply_call</title>
+      <para>
+        Number of REPLY_CALL messages from the other nodes.
+      </para>
+    </refsect3>
+
+    <refsect3>
+      <title>req_dmaster</title>
+      <para>
+        Number of REQ_DMASTER messages from the other nodes.
+      </para>
+    </refsect3>
+
+    <refsect3>
+      <title>reply_dmaster</title>
+      <para>
+        Number of REPLY_DMASTER messages from the other nodes.
+      </para>
+    </refsect3>
+
+    <refsect3>
+      <title>reply_error</title>
+      <para>
+        Number of REPLY_ERROR messages from the other nodes.
+      </para>
+    </refsect3>
+
+    <refsect3>
+      <title>req_message</title>
+      <para>
+        Number of REQ_MESSAGE messages from the other nodes.
+      </para>
+    </refsect3>
+
+    <refsect3>
+      <title>req_control</title>
+      <para>
+        Number of REQ_CONTROL messages from the other nodes.
+      </para>
+    </refsect3>
+
+    <refsect3>
+      <title>reply_control</title>
+      <para>
+        Number of REPLY_CONTROL messages from the other nodes.
+      </para>
+    </refsect3>
+
+    </refsect2>
+
+    <refsect2>
+      <title>client</title>
+      <para>
+	This section lists various types of messages processed which
+	originated from clients via unix domain socket.
+      </para>
+
+    <refsect3>
+      <title>req_call</title>
+      <para>
+        Number of REQ_CALL messages from the clients.
+      </para>
+    </refsect3>
+
+    <refsect3>
+      <title>req_message</title>
+      <para>
+        Number of REQ_MESSAGE messages from the clients.
+      </para>
+    </refsect3>
+
+    <refsect3>
+      <title>req_control</title>
+      <para>
+        Number of REQ_CONTROL messages from the clients.
+      </para>
+    </refsect3>
+
+    </refsect2>
+
+    <refsect2>
+      <title>timeouts</title>
+      <para>
+	This section lists timeouts occurred when sending various messages.
+      </para>
+
+    <refsect3>
+      <title>call</title>
+      <para>
+        Number of timeouts for REQ_CALL messages.
+      </para>
+    </refsect3>
+
+    <refsect3>
+      <title>control</title>
+      <para>
+        Number of timeouts for REQ_CONTROL messages.
+      </para>
+    </refsect3>
+
+    <refsect3>
+      <title>traverse</title>
+      <para>
+        Number of timeouts for database traverse operations.
+      </para>
+    </refsect3>
+    </refsect2>
+
+    <refsect2>
+      <title>locks</title>
+      <para>
+	This section lists locking statistics.
+      </para>
+
+    <refsect3>
+      <title>num_calls</title>
+      <para>
+        Number of completed lock calls.  This includes database locks
+        and record locks.
+      </para>
+    </refsect3>
+
+    <refsect3>
+      <title>num_current</title>
+      <para>
+        Number of scheduled lock calls.  This includes database locks
+        and record locks.
+      </para>
+    </refsect3>
+
+    <refsect3>
+      <title>num_pending</title>
+      <para>
+        Number of queued lock calls.  This includes database locks and
+        record locks.
+      </para>
+    </refsect3>
+
+    <refsect3>
+      <title>num_failed</title>
+      <para>
+        Number of failed lock calls.  This includes database locks and
+        record locks.
+      </para>
+    </refsect3>
+
+    </refsect2>
+
+    <refsect2>
+      <title>total_calls</title>
+      <para>
+	Number of req_call messages processed from clients.  This number
+	should be same as client --> req_call.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>pending_calls</title>
+      <para>
+	Number of req_call messages which are currenly being processed.
+	This number indicates the number of record migrations in flight.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>childwrite_calls</title>
+      <para>
+	Number of record update calls.	Record update calls are used to
+	update a record under a transaction.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>pending_childwrite_calls</title>
+      <para>
+	Number of record update calls currently active.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>memory_used</title>
+      <para>
+	The amount of memory in bytes currently used by CTDB using
+	talloc.  This includes all the memory used for CTDB's internal
+	data structures.  This does not include the memory mapped TDB
+	databases.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>max_hop_count</title>
+      <para>
+	The maximum number of hops required for a record migration request
+	to obtain the record.  High numbers indicate record contention.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>total_ro_delegations</title>
+      <para>
+	Number of readonly delegations created.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>total_ro_revokes</title>
+      <para>
+	Number of readonly delegations that were revoked.  The difference
+	between total_ro_revokes and total_ro_delegations gives the
+	number of currently active readonly delegations.
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>hop_count_buckets</title>
+      <para>
+	Distribution of migration requests based on hop counts values.


-- 
CTDB repository


More information about the samba-cvs mailing list