diff --git a/include/error_monitors/mem_thermtrip_monitor.hpp b/include/error_monitors/mem_thermtrip_monitor.hpp
new file mode 100644
index 0000000..7d87fe1
--- /dev/null
+++ b/include/error_monitors/mem_thermtrip_monitor.hpp
@@ -0,0 +1,55 @@
+/*
+// Copyright (c) 2021 Intel Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+*/
+#pragma once
+#include <error_monitors/base_gpio_monitor.hpp>
+#include <host_error_monitor.hpp>
+#include <sdbusplus/asio/object_server.hpp>
+
+namespace host_error_monitor::mem_thermtrip_monitor
+{
+class MemThermtripMonitor :
+    public host_error_monitor::base_gpio_monitor::BaseGPIOMonitor
+{
+    const static host_error_monitor::base_gpio_monitor::AssertValue
+        assertValue =
+            host_error_monitor::base_gpio_monitor::AssertValue::lowAssert;
+    size_t cpuNum;
+
+    void logEvent() override
+    {
+        std::string cpuNumber = "CPU " + std::to_string(cpuNum);
+        std::string msg = cpuNumber + " Memory Thermal trip.";
+
+        sd_journal_send("MESSAGE=HostError: %s", msg.c_str(), "PRIORITY=%i",
+                        LOG_ERR, "REDFISH_MESSAGE_ID=%s",
+                        "OpenBMC.0.1.MemoryThermTrip",
+                        "REDFISH_MESSAGE_ARGS=%s", cpuNumber.c_str(), NULL);
+    }
+
+  public:
+    MemThermtripMonitor(boost::asio::io_service& io,
+                        std::shared_ptr<sdbusplus::asio::connection> conn,
+                        const std::string& signalName, const size_t cpuNum) :
+        BaseGPIOMonitor(io, conn, signalName, assertValue),
+        cpuNum(cpuNum)
+    {
+        if (valid)
+        {
+            startMonitoring();
+        }
+    }
+};
+} // namespace host_error_monitor::mem_thermtrip_monitor
diff --git a/src/host_error_monitor.cpp b/src/host_error_monitor.cpp
index 0087d82..9f36d43 100644
--- a/src/host_error_monitor.cpp
+++ b/src/host_error_monitor.cpp
@@ -61,24 +61,6 @@
 //----------------------------------
 static gpiod::line pchThermtripLine;
 static boost::asio::posix::stream_descriptor pchThermtripEvent(io);
-//----------------------------------
-// CPU_MEM_THERM_EVENT function related definition
-//----------------------------------
-static gpiod::line cpu1MemtripLine;
-static boost::asio::posix::stream_descriptor cpu1MemtripEvent(io);
-static gpiod::line cpu2MemtripLine;
-static boost::asio::posix::stream_descriptor cpu2MemtripEvent(io);
-
-static void memThermTripLog(const int cpuNum)
-{
-    std::string cpuNumber = "CPU " + std::to_string(cpuNum);
-    std::string msg = cpuNumber + " Memory Thermal trip.";
-
-    sd_journal_send("MESSAGE=HostError: %s", msg.c_str(), "PRIORITY=%i",
-                    LOG_ERR, "REDFISH_MESSAGE_ID=%s",
-                    "OpenBMC.0.1.MemoryThermTrip", "REDFISH_MESSAGE_ARGS=%s",
-                    cpuNumber.c_str(), NULL);
-}
 
 static void cpuVRHotLog(const std::string& vr)
 {
@@ -247,54 +229,6 @@
     return true;
 }
 
-static void cpu1MemtripHandler()
-{
-    gpiod::line_event gpioLineEvent = cpu1MemtripLine.event_read();
-
-    bool cpu1Memtrip =
-        gpioLineEvent.event_type == gpiod::line_event::FALLING_EDGE;
-    if (cpu1Memtrip)
-    {
-        memThermTripLog(1);
-    }
-
-    cpu1MemtripEvent.async_wait(
-        boost::asio::posix::stream_descriptor::wait_read,
-        [](const boost::system::error_code ec) {
-            if (ec)
-            {
-                std::cerr << "CPU 1 Memory Thermaltrip handler error: "
-                          << ec.message() << "\n";
-                return;
-            }
-            cpu1MemtripHandler();
-        });
-}
-
-static void cpu2MemtripHandler()
-{
-    gpiod::line_event gpioLineEvent = cpu2MemtripLine.event_read();
-
-    bool cpu2Memtrip =
-        gpioLineEvent.event_type == gpiod::line_event::FALLING_EDGE;
-    if (cpu2Memtrip)
-    {
-        memThermTripLog(2);
-    }
-
-    cpu2MemtripEvent.async_wait(
-        boost::asio::posix::stream_descriptor::wait_read,
-        [](const boost::system::error_code ec) {
-            if (ec)
-            {
-                std::cerr << "CPU 2 Memory Thermaltrip handler error: "
-                          << ec.message() << "\n";
-                return;
-            }
-            cpu2MemtripHandler();
-        });
-}
-
 static void cpu1VRHotAssertHandler()
 {
     cpuVRHotLog("CPU 1");
@@ -505,18 +439,6 @@
 
 static void initializeErrorState()
 {
-    // Handle CPU1_MEM_THERM_EVENT (CPU1 DIMM Thermal trip) if it's asserted now
-    if (cpu1MemtripLine.get_value() == 0)
-    {
-        memThermTripLog(1);
-    }
-
-    // Handle CPU2_MEM_THERM_EVENT (CPU2 DIMM Thermal trip) if it's asserted now
-    if (cpu2MemtripLine.get_value() == 0)
-    {
-        memThermTripLog(2);
-    }
-
     // Handle CPU1_VRHOT if it's asserted now
     if (cpu1VRHotLine.get_value() == 0)
     {
@@ -657,24 +579,6 @@
         return -1;
     }
 
-    // Request CPU1_MEM_THERM_EVENT GPIO events
-    if (!host_error_monitor::requestGPIOEvents(
-            "CPU1_MEM_THERM_EVENT", host_error_monitor::cpu1MemtripHandler,
-            host_error_monitor::cpu1MemtripLine,
-            host_error_monitor::cpu1MemtripEvent))
-    {
-        return -1;
-    }
-
-    // Request CPU2_MEM_THERM_EVENT GPIO events
-    if (!host_error_monitor::requestGPIOEvents(
-            "CPU2_MEM_THERM_EVENT", host_error_monitor::cpu2MemtripHandler,
-            host_error_monitor::cpu2MemtripLine,
-            host_error_monitor::cpu2MemtripEvent))
-    {
-        return -1;
-    }
-
     // Initialize the signal monitors
     host_error_monitor::init();
 
