aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/misc
diff options
context:
space:
mode:
Diffstat (limited to 'src/osmo-bts-sysmo/misc')
-rw-r--r--src/osmo-bts-sysmo/misc/sysmobts_mgr.h1
-rw-r--r--src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c5
-rw-r--r--src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c2
3 files changed, 8 insertions, 0 deletions
diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr.h b/src/osmo-bts-sysmo/misc/sysmobts_mgr.h
index 17a81ccb..fd6f2bcb 100644
--- a/src/osmo-bts-sysmo/misc/sysmobts_mgr.h
+++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr.h
@@ -66,5 +66,6 @@ int sysmobts_mgr_vty_init(void);
int sysmobts_mgr_parse_config(struct sysmobts_mgr_instance *mgr);
int sysmobts_mgr_nl_init(void);
int sysmobts_mgr_temp_init(struct sysmobts_mgr_instance *mgr);
+const char *sysmobts_mgr_temp_get_state(enum sysmobts_temp_state state);
#endif
diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c
index 7407f74b..d3a46283 100644
--- a/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c
+++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c
@@ -39,6 +39,11 @@ static const struct value_string state_names[] = {
{ 0, NULL }
};
+const char *sysmobts_mgr_temp_get_state(enum sysmobts_temp_state state)
+{
+ return get_value_string(state_names, state);
+}
+
static int next_state(enum sysmobts_temp_state current_state, int critical, int warning)
{
int next_state = -1;
diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c
index 42160708..4ed582b2 100644
--- a/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c
+++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c
@@ -242,6 +242,8 @@ CFG_ACTION(critical, "Critical Actions\n", ACT_CRIT_NODE, action_crit)
DEFUN(show_mgr, show_mgr_cmd, "show manager",
SHOW_STR "Display information about the manager")
{
+ vty_out(vty, "Temperature control state: %s%s",
+ sysmobts_mgr_temp_get_state(s_mgr->state), VTY_NEWLINE);
vty_out(vty, "Current Temperatures%s", VTY_NEWLINE);
vty_out(vty, " Digital: %f Celcius%s",
sysmobts_temp_get(SYSMOBTS_TEMP_DIGITAL,