From: Dan Mick Date: Thu, 30 May 2013 00:36:28 +0000 (-0700) Subject: ceph: make ceph -w output 'ceph status' first X-Git-Tag: v0.65~136^2^2~39 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=73a1b21692c09d99da151ff87c0aa165bb4a7fdd;p=ceph.git ceph: make ceph -w output 'ceph status' first Signed-off-by: Dan Mick --- diff --git a/src/ceph b/src/ceph index cedfec1f73d4..201b7d5a4c6a 100755 --- a/src/ceph +++ b/src/ceph @@ -1366,7 +1366,14 @@ def main(): level = k.replace('watch_', '') if level: def watch_cb(arg, line, who, stamp_sec, stamp_nsec, seq, level, msg): - print >> sys.stderr, line + print line + + # first do a ceph status + ret, outbuf, outs = json_command(prefix='status') + if ret: + print >> sys.stderr, "status query failed: ", outs + return ret + print outbuf # this instance keeps the watch connection alive, but is # otherwise unused