net: Add net tdb command to print information from tdb records
commit25b5bb3056bbd7d0aaeeff106e9cfc9cc309bc78
authorChristof Schmitt <cs@samba.org>
Thu, 16 Feb 2017 23:22:38 +0000 (16 16:22 -0700)
committerChristof Schmitt <cs@samba.org>
Mon, 8 May 2017 19:08:23 +0000 (8 21:08 +0200)
tree04a175514afc0cb022b355f7eb34ba375d95f48c
parent10b36782bf61fd30e4693244c7b698895ad09c2d
net: Add net tdb command to print information from tdb records

The main purpose is to debug "hot" records from ctdb. ctdb tracks
contended records and identifies them by key in the dbstatistics:

DB Statistics: locking.tdb
[...]
 Num Hot Keys:     1
     Count:3 Key:6a4128e3ced4681b02a00000000000000000000000000000

This command allows querying additional information for the associated
key to identify the affected file. For now this only adds a subcommand
for the locking.tdb, but could be extended to others:

net tdb locking 6a4128e3ced4681b02a00000000000000000000000000000
Share path:            /test/share
Name:                  testfile
Number of share modes: 2

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/utils/net.c
source3/utils/net_proto.h
source3/utils/net_tdb.c [new file with mode: 0644]
source3/utils/wscript_build