summaryrefslogtreecommitdiffstats
path: root/src/usr/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/util')
-rw-r--r--src/usr/util/runtime/rt_cmds.C74
-rw-r--r--src/usr/util/runtime/rt_fwnotify.C26
2 files changed, 84 insertions, 16 deletions
diff --git a/src/usr/util/runtime/rt_cmds.C b/src/usr/util/runtime/rt_cmds.C
index c669aae4f..bf0c51749 100644
--- a/src/usr/util/runtime/rt_cmds.C
+++ b/src/usr/util/runtime/rt_cmds.C
@@ -1179,25 +1179,59 @@ void cmd_nvdimm_protection_msg( char* &o_output, uint32_t i_huid,
}
}
-void cmd_nvdimmCheckHealthStatus( char* &o_output)
+/**
+ * @brief Check the ES (energy source) health status of all NVDIMMs in the
+ * system. If check fails, see HBRT traces for further details.
+ * @param[out] o_output Output display buffer, memory allocated here.
+ * Will inform caller if ES health check passes or fails.
+ */
+void cmd_nvDimmEsCheckHealthStatus( char* &o_output)
+{
+ o_output = new char[500];
+ if (NVDIMM::nvDimmEsCheckHealthStatusOnSystem())
+ {
+ sprintf( o_output, "cmd_nvDimmEsCheckHealthStatus: "
+ "ES (energy source) health status check passed.");
+
+ }
+ else
+ {
+ sprintf( o_output, "cmd_nvDimmEsCheckHealthStatus: "
+ "ES (energy source) health status check failed. "
+ "Inspect HBRT traces for further details.");
+
+ }
+
+ return;
+} // end cmd_nvDimmEsCheckHealthStatus
+
+/**
+ * @brief Check the NVM (non-volatile memory) health status of all NVDIMMs in
+ * the system. If check fails, see HBRT traces for further details.
+ * @param[out] o_output Output display buffer, memory allocated here.
+ * Will inform caller if NVM health check passes or fails.
+ */
+
+void cmd_nvdDmmNvmCheckHealthStatus( char* &o_output)
{
o_output = new char[500];
- if (NVDIMM::nvDimmCheckHealthStatusOnSystem())
+ if (NVDIMM::nvDimmNvmCheckHealthStatusOnSystem())
{
- sprintf( o_output, "cmd_doNvDimmCheckHealthStatus: "
- "health status check passed.");
+ sprintf( o_output, "cmd_nvdDmmNvmCheckHealthStatus: "
+ "NVM (non-volatile memory) health status check passed.");
}
else
{
- sprintf( o_output, "cmd_doNvDimmCheckHealthStatus: "
- "health status check failed. Inspect HBRT traces "
- "for further details.");
+ sprintf( o_output, "cmd_nvdDmmNvmCheckHealthStatus: "
+ "NVM (non-volatile memory) health status check failed. "
+ "Inspect HBRT traces for further details.");
}
return;
-} // end cmd_nvdimmCheckHealthStatus
+} // end cmd_nvdDmmNvmCheckHealthStatus
+
#endif
@@ -1535,18 +1569,31 @@ int hbrtCommand( int argc,
sprintf(*l_output, "ERROR: nvdimm_protection <huid> <0 or 1>");
}
}
- else if( !strcmp( argv[0], "nvdimm_check_status" ) )
+ else if( !strcmp( argv[0], "nvdimm_es_check_status" ) )
{
if (argc == 1)
{
- cmd_nvdimmCheckHealthStatus( *l_output );
+ cmd_nvDimmEsCheckHealthStatus( *l_output );
}
else
{
*l_output = new char[100];
- sprintf(*l_output, "Usage: nvdimm_check_status");
+ sprintf(*l_output, "Usage: nvdimm_es_check_status");
}
}
+ else if( !strcmp( argv[0], "nvdimm_nvm_check_status" ) )
+ {
+ if (argc == 1)
+ {
+ cmd_nvdDmmNvmCheckHealthStatus( *l_output );
+ }
+ else
+ {
+ *l_output = new char[100];
+ sprintf(*l_output, "Usage: nvdimm_nvm_check_status");
+ }
+ }
+
#endif
else
{
@@ -1587,8 +1634,11 @@ int hbrtCommand( int argc,
#ifdef CONFIG_NVDIMM
sprintf( l_tmpstr, "nvdimm_protection <huid> <0 or 1>\n");
strcat( *l_output, l_tmpstr );
- sprintf( l_tmpstr, "nvdimm_check_status\n");
+ sprintf( l_tmpstr, "nvdimm_es_check_status\n");
+ strcat( *l_output, l_tmpstr );
+ sprintf( l_tmpstr, "nvdimm_nvm_check_status\n");
strcat( *l_output, l_tmpstr );
+
#endif
}
diff --git a/src/usr/util/runtime/rt_fwnotify.C b/src/usr/util/runtime/rt_fwnotify.C
index e9ebabe6d..350f4d1da 100644
--- a/src/usr/util/runtime/rt_fwnotify.C
+++ b/src/usr/util/runtime/rt_fwnotify.C
@@ -622,22 +622,40 @@ int doNvDimmOperation(const hostInterfaces::nvdimm_operation_t& i_nvDimmOp)
} // end if (nvDimmOp.opType & hostInterfaces::HBRT_FW_NVDIMM_ARM)
} while (0); // end Perform the arming/disarming operations.
- // Perform the health check operation
+ // Perform the ES (energy source) health check operation
if (i_nvDimmOp.opType & hostInterfaces::HBRT_FW_MNFG_ES_HEALTH_CHECK)
{
- if (!nvDimmCheckHealthStatus(l_nvDimmTargetList))
+ if (!nvDimmEsCheckHealthStatus(l_nvDimmTargetList))
{
TRACFCOMP(g_trac_runtime, "doNvDimmOperation: "
- "Call to do a health check failed.");
+ "Call to do an ES (energy source) health check failed.");
rc = -1;
break;
}
else
{
TRACFCOMP(g_trac_runtime, "doNvDimmOperation: "
- "Call to do a health check succeeded.");
+ "Call to do an ES (energy source) health check succeeded.");
}
}
+
+ // Perform the NVM (non-volatile memory) health check operation
+ if (i_nvDimmOp.opType & hostInterfaces::HBRT_FW_MNFG_NVM_HEALTH_CHECK)
+ {
+ if (!nvDimmNvmCheckHealthStatus(l_nvDimmTargetList))
+ {
+ TRACFCOMP(g_trac_runtime, "doNvDimmOperation: "
+ "Call to do a NVM (non-volatile memory) health check failed.");
+ rc = -1;
+ break;
+ }
+ else
+ {
+ TRACFCOMP(g_trac_runtime, "doNvDimmOperation: "
+ "Call to do a NVM (non-volatile memory) health check succeeded.");
+ }
+ }
+
} while(0); // end Perform the operations requested
if (l_err)
OpenPOWER on IntegriCloud