From 432709027680d7791b325b2c2116c658eba21c8d Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 12 Mar 2000 22:44:54 +0000 Subject: Made `show status' show uptime and time of last reconfiguration. --- nest/cmds.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'nest/cmds.c') diff --git a/nest/cmds.c b/nest/cmds.c index c4443f9..ac537c8 100644 --- a/nest/cmds.c +++ b/nest/cmds.c @@ -15,8 +15,21 @@ void cmd_show_status(void) { - cli_msg(1000, "BIRD " BIRD_VERSION); - /* FIXME: Should include uptime, shutdown flag et cetera */ + byte tim[TM_DATETIME_BUFFER_SIZE]; + + cli_msg(-1000, "BIRD " BIRD_VERSION); + tm_format_datetime(tim, now); + cli_msg(-1011, "Current server time is %s", tim); + tm_format_datetime(tim, boot_time); + cli_msg(-1011, "Last reboot on %s", tim); + tm_format_datetime(tim, config->load_time); + cli_msg(-1011, "Last reconfiguration on %s", tim); + if (shutting_down) + cli_msg(13, "Shutdown in progress"); + else if (old_config) + cli_msg(13, "Reconfiguration in progress"); + else + cli_msg(13, "Daemon is up and running"); } void -- cgit v1.2.3