summaryrefslogtreecommitdiffstats
path: root/nest/cmds.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-03-12 23:44:54 +0100
committerMartin Mares <mj@ucw.cz>2000-03-12 23:44:54 +0100
commit432709027680d7791b325b2c2116c658eba21c8d (patch)
tree77f9d0f9591dea5e8fc4261f24b15191df7f68a0 /nest/cmds.c
parent7a88832e78cbc18db109c091d74f6d27284cff44 (diff)
downloadbird-432709027680d7791b325b2c2116c658eba21c8d.tar
bird-432709027680d7791b325b2c2116c658eba21c8d.zip
Made `show status' show uptime and time of last reconfiguration.
Diffstat (limited to 'nest/cmds.c')
-rw-r--r--nest/cmds.c17
1 files changed, 15 insertions, 2 deletions
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