diff --git a/.gitignore b/.gitignore
index b90d129..0aa8e6b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,5 +26,6 @@
 missing
 stamp-h1
 witherspoon-pseq-monitor
+witherspoon-psu-monitor
 xyz/openbmc_project/Power/Fault/
 test-driver
diff --git a/Makefile.am b/Makefile.am
index ae6014f..a3330fd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -33,4 +33,4 @@
 	@mkdir -p `dirname $@`
 	$(SDBUSPLUSPLUS) -r $(srcdir) error exception-cpp xyz.openbmc_project.Power.Fault > $@
 
-SUBDIRS = . power-sequencer test
+SUBDIRS = . power-sequencer power-supply test
diff --git a/configure.ac b/configure.ac
index edc2a1e..d13af6f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,5 +74,5 @@
 )
 
 # Create configured output
-AC_CONFIG_FILES([Makefile power-sequencer/Makefile test/Makefile])
+AC_CONFIG_FILES([Makefile power-sequencer/Makefile power-supply/Makefile test/Makefile])
 AC_OUTPUT
diff --git a/power-supply/Makefile.am b/power-supply/Makefile.am
new file mode 100644
index 0000000..01f8b5e
--- /dev/null
+++ b/power-supply/Makefile.am
@@ -0,0 +1,22 @@
+AM_DEFAULT_SOURCE_EXT = .cpp
+AM_CPPFLAGS = -iquote ${top_srcdir}
+
+sbin_PROGRAMS = \
+	witherspoon-psu-monitor
+
+witherspoon_psu_monitor_SOURCES = \
+	main.cpp \
+	argument.cpp \
+	power_supply.cpp
+
+witherspoon_psu_monitor_CXXFLAGS = \
+	$(SDBUSPLUS_CFLAGS) \
+	$(PHOSPHOR_LOGGING_CFLAGS) \
+	${PHOSPHOR_DBUS_INTERFACES_CFLAGS}
+
+witherspoon_psu_monitor_LDADD = \
+	${top_builddir}/libpower.la \
+	$(SDBUSPLUS_LIBS) \
+	$(PHOSPHOR_LOGGING_LIBS) \
+	${PHOSPHOR_DBUS_INTERFACES_LIBS}
+
diff --git a/power-supply/argument.cpp b/power-supply/argument.cpp
new file mode 100644
index 0000000..55a81ae
--- /dev/null
+++ b/power-supply/argument.cpp
@@ -0,0 +1,86 @@
+/**
+ * Copyright © 2017 IBM 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.
+ */
+#include <iostream>
+#include <iterator>
+#include <algorithm>
+#include <cassert>
+#include "argument.hpp"
+
+namespace witherspoon
+{
+namespace power
+{
+
+ArgumentParser::ArgumentParser(int argc, char** argv)
+{
+    auto option = 0;
+    while (-1 != (option = getopt_long(argc, argv, optionStr, options, NULL)))
+    {
+        if ((option == '?') || (option == 'h'))
+        {
+            usage(argv);
+            exit(-1);
+        }
+
+        auto i = &options[0];
+        while ((i->val != option) && (i->val != 0))
+        {
+            ++i;
+        }
+
+        if (i->val)
+        {
+            arguments[i->name] = (i->has_arg ? optarg : trueString);
+        }
+    }
+}
+
+const std::string& ArgumentParser::operator[](const std::string& opt)
+{
+    auto i = arguments.find(opt);
+    if (i == arguments.end())
+    {
+        return emptyString;
+    }
+    else
+    {
+        return i->second;
+    }
+}
+
+void ArgumentParser::usage(char** argv)
+{
+    std::cerr << "Usage: " << argv[0] << " [options]\n";
+    std::cerr << "Options:\n";
+    std::cerr << "    --help               print this menu\n";
+    std::cerr << "    --path=<objpath>     path to location to monitor\n";
+    std::cerr << std::flush;
+}
+
+const option ArgumentParser::options[] =
+{
+    { "path",   required_argument,  NULL,   'p' },
+    { "help",   no_argument,        NULL,   'h' },
+    { 0, 0, 0, 0},
+};
+
+const char* ArgumentParser::optionStr = "p:h";
+
+const std::string ArgumentParser::trueString = "true";
+const std::string ArgumentParser::emptyString = "";
+
+}
+}
diff --git a/power-supply/main.cpp b/power-supply/main.cpp
new file mode 100644
index 0000000..d14d37c
--- /dev/null
+++ b/power-supply/main.cpp
@@ -0,0 +1,71 @@
+/**
+ * Copyright © 2017 IBM 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.
+ */
+#include <iostream>
+#include <phosphor-logging/log.hpp>
+#include <systemd/sd-daemon.h>
+#include "argument.hpp"
+#include "event.hpp"
+
+using namespace witherspoon::power;
+using namespace phosphor::logging;
+
+int main(int argc, char* argv[])
+{
+    auto rc = -1;
+    auto options = ArgumentParser(argc, argv);
+
+    auto objpath = (options)["path"];
+    if (argc < 2)
+    {
+        std::cerr << std::endl << "Too few arguments" << std::endl;
+        options.usage(argv);
+        return -1;
+    }
+
+    if (objpath == ArgumentParser::emptyString)
+    {
+        log<level::ERR>("Device monitoring path argument required");
+        return -2;
+    }
+
+    auto bus = sdbusplus::bus::new_default();
+    sd_event* events = nullptr;
+
+    auto r = sd_event_default(&events);
+    if (r < 0)
+    {
+        log<level::ERR>("Failed call to sd_event_default()",
+                        entry("ERROR=%s", strerror(-r)));
+        return -3;
+    }
+
+    witherspoon::power::event::Event eventPtr{events};
+
+    //Attach the event object to the bus object so we can
+    //handle both sd_events (for the timers) and dbus signals.
+    bus.attach_event(eventPtr.get(), SD_EVENT_PRIORITY_NORMAL);
+
+    r = sd_event_loop(eventPtr.get());
+    if (r < 0)
+    {
+        log<level::ERR>("Failed call to sd_event_loop",
+                        entry("ERROR=%s", strerror(-r)));
+    }
+
+    rc = 0;
+
+    return rc;
+}
diff --git a/power-supply/power_supply.cpp b/power-supply/power_supply.cpp
new file mode 100644
index 0000000..f246ca4
--- /dev/null
+++ b/power-supply/power_supply.cpp
@@ -0,0 +1,27 @@
+/**
+ * Copyright © 2017 IBM 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.
+ */
+#include "power_supply.hpp"
+
+namespace phosphor
+{
+namespace power
+{
+namespace psu
+{
+
+}
+}
+}
diff --git a/power-supply/power_supply.hpp b/power-supply/power_supply.hpp
new file mode 100644
index 0000000..1eab5c4
--- /dev/null
+++ b/power-supply/power_supply.hpp
@@ -0,0 +1,28 @@
+#pragma once
+
+namespace phosphor
+{
+namespace power
+{
+namespace psu
+{
+
+/**
+ * @class PowerSupply
+ * Represents a PMBus power supply.
+ */
+class PowerSupply
+{
+    public:
+        PowerSupply() = delete;
+        PowerSupply(const PowerSupply&) = delete;
+        PowerSupply& operator=(const PowerSupply&) = delete;
+        PowerSupply(PowerSupply&&) = default;
+        PowerSupply& operator=(PowerSupply&&) = default;
+        ~PowerSupply() = default;
+
+};
+
+}
+}
+}
