diff --git a/util.cpp b/util.cpp
index 0c3e669..ed4eed9 100644
--- a/util.cpp
+++ b/util.cpp
@@ -43,5 +43,51 @@
     }
     return response.begin()->first;
 }
+
+bool isHostPoweringOff()
+{
+    try
+    {
+        constexpr auto object = "/xyz/openbmc_project/state/host0";
+        constexpr auto service = "xyz.openbmc_project.State.Host";
+        constexpr auto interface = "xyz.openbmc_project.State.Host";
+        constexpr auto property = "CurrentHostState";
+        auto bus = sdbusplus::bus::new_default();
+
+        std::variant<std::string> retval;
+        auto properties = bus.new_method_call(
+            service, object, "org.freedesktop.DBus.Properties", "Get");
+        properties.append(interface);
+        properties.append(property);
+        auto result = bus.call(properties);
+        result.read(retval);
+
+        const std::string* state = std::get_if<std::string>(&retval);
+        if (state == nullptr)
+        {
+            std::string err = fmt::format(
+                "CurrentHostState property is not set ({})", object);
+            log<level::ERR>(err.c_str());
+            return false;
+        }
+        if ((*state == "xyz.openbmc_project.State.Host.HostState."
+                       "TransitioningToOff") ||
+            (*state == "xyz.openbmc_project.State.Host.HostState."
+                       "Off") ||
+            (*state == "xyz.openbmc_project.State.Host.HostState."
+                       "Quiesced"))
+        {
+            return true;
+        }
+    }
+    catch (const std::exception& ex)
+    {
+        log<level::ERR>(
+            fmt::format("Failed to read CurrentHostState property ({})",
+                        ex.what())
+                .c_str());
+    }
+    return false;
+}
 } // namespace util
 } // namespace openpower
