[bind10-dev] pretty-printing stats (and bindctl results in general)
Jelte Jansen
jelte at isc.org
Thu Jan 13 17:28:37 UTC 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 01/13/2011 12:16 AM, JINMEI Tatuya / 神明達哉 wrote:
>> this changes two things; it will no longer print 'empty' results
>> (commands that don't actually return any data still result in '{}' being
>> printed right now, and map results like Stats show are sorted and nicely
>> printed.
>
> Can you show an example?
>
this is what it looks like now (the first command shows stats data in
one unformatted json string, the second one shows the result sent back
for a command that does not actually contain any result data, but which
is just an ack)
> Stats show
send the command to cmd-ctrld
received reply: {"report_time": "2011-01-13T17:21:55Z",
"auth.queries.tcp": 0, "bind10.boot_time": "2011-01-13T17:15:30Z",
"stats.start_time": "2011-01-13T17:15:31Z", "stats.timestamp":
1294939315.668947, "auth.queries.udp": 0, "stats.boot_time":
"2011-01-13T17:15:31Z", "stats.lname": "4d2f3333_7 at xod",
"stats.last_update_time": "2011-01-13T17:15:32Z"}
> Resolver shutdown
send the command to cmd-ctrld
received reply: {}
>
And this is what is looks like with this patch:
> Stats show
send the command to cmd-ctrld
{
"auth.queries.tcp": 0,
"auth.queries.udp": 0,
"bind10.boot_time": "2011-01-13T17:15:30Z",
"report_time": "2011-01-13T17:27:41Z",
"stats.boot_time": "2011-01-13T17:15:31Z",
"stats.last_update_time": "2011-01-13T17:15:32Z",
"stats.lname": "4d2f3333_7 at xod",
"stats.start_time": "2011-01-13T17:15:31Z",
"stats.timestamp": 1294939661.031729
}
> Resolver shutdown
send the command to cmd-ctrld
>
(perhaps we should remove the 'send the command' line while we are at it
as well)
Jelte
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk0vNkUACgkQ4nZCKsdOncWacwCcDz2iGaKZqgwCZApLgIxrbPDh
ThIAoKTOrbUxLtit3DmZUEv2wEU/XGg+
=ozki
-----END PGP SIGNATURE-----
More information about the bind10-dev
mailing list