Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 1 | /* |
| 2 | // Copyright (c) 2018 Intel Corporation |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | */ |
| 16 | #include <systemd/sd-journal.h> |
| 17 | |
Jason M. Bills | c4a336f | 2019-04-23 10:43:10 -0700 | [diff] [blame] | 18 | #include <boost/algorithm/string.hpp> |
Ed Tanous | 9092699 | 2020-09-11 12:59:33 -0700 | [diff] [blame] | 19 | #include <boost/asio/io_service.hpp> |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 20 | #include <boost/container/flat_map.hpp> |
| 21 | #include <boost/container/flat_set.hpp> |
Zhikui Ren | 672bdfc | 2020-07-14 11:37:01 -0700 | [diff] [blame] | 22 | #include <pulse_event_monitor.hpp> |
| 23 | #include <sdbusplus/asio/object_server.hpp> |
| 24 | #include <sel_logger.hpp> |
| 25 | #include <threshold_event_monitor.hpp> |
Charles Hsu | dbd77b9 | 2020-10-29 11:20:34 +0800 | [diff] [blame] | 26 | #include <watchdog_event_monitor.hpp> |
George Hung | 486e42e | 2021-04-14 20:20:42 +0800 | [diff] [blame] | 27 | #ifdef SEL_LOGGER_MONITOR_THRESHOLD_ALARM_EVENTS |
| 28 | #include <threshold_alarm_event_monitor.hpp> |
| 29 | #endif |
Zhikui Ren | 672bdfc | 2020-07-14 11:37:01 -0700 | [diff] [blame] | 30 | |
Jason M. Bills | c4a336f | 2019-04-23 10:43:10 -0700 | [diff] [blame] | 31 | #include <filesystem> |
| 32 | #include <fstream> |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 33 | #include <iomanip> |
| 34 | #include <iostream> |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 35 | #include <sstream> |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 36 | |
Lei YU | e526b86 | 2020-12-03 15:41:59 +0800 | [diff] [blame] | 37 | #ifdef SEL_LOGGER_SEND_TO_LOGGING_SERVICE |
| 38 | #include <phosphor-logging/elog-errors.hpp> |
| 39 | #include <phosphor-logging/elog.hpp> |
| 40 | #include <phosphor-logging/log.hpp> |
| 41 | #include <xyz/openbmc_project/Logging/SEL/error.hpp> |
| 42 | |
| 43 | using namespace phosphor::logging; |
| 44 | using SELCreated = |
| 45 | sdbusplus::xyz::openbmc_project::Logging::SEL::Error::Created; |
| 46 | #endif |
| 47 | |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 48 | struct DBusInternalError final : public sdbusplus::exception_t |
| 49 | { |
Zhikui Ren | 672bdfc | 2020-07-14 11:37:01 -0700 | [diff] [blame] | 50 | const char* name() const noexcept override |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 51 | { |
| 52 | return "org.freedesktop.DBus.Error.Failed"; |
Patrick Williams | a138ebd | 2021-09-08 15:46:34 -0500 | [diff] [blame] | 53 | } |
Zhikui Ren | 672bdfc | 2020-07-14 11:37:01 -0700 | [diff] [blame] | 54 | const char* description() const noexcept override |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 55 | { |
| 56 | return "internal error"; |
Patrick Williams | a138ebd | 2021-09-08 15:46:34 -0500 | [diff] [blame] | 57 | } |
Zhikui Ren | 672bdfc | 2020-07-14 11:37:01 -0700 | [diff] [blame] | 58 | const char* what() const noexcept override |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 59 | { |
| 60 | return "org.freedesktop.DBus.Error.Failed: " |
| 61 | "internal error"; |
Patrick Williams | a138ebd | 2021-09-08 15:46:34 -0500 | [diff] [blame] | 62 | } |
| 63 | |
| 64 | int get_errno() const noexcept override |
| 65 | { |
| 66 | return EACCES; |
| 67 | } |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 68 | }; |
| 69 | |
Lei YU | e526b86 | 2020-12-03 15:41:59 +0800 | [diff] [blame] | 70 | #ifndef SEL_LOGGER_SEND_TO_LOGGING_SERVICE |
Zhikui Ren | 672bdfc | 2020-07-14 11:37:01 -0700 | [diff] [blame] | 71 | static bool getSELLogFiles(std::vector<std::filesystem::path>& selLogFiles) |
Jason M. Bills | c4a336f | 2019-04-23 10:43:10 -0700 | [diff] [blame] | 72 | { |
| 73 | // Loop through the directory looking for ipmi_sel log files |
Zhikui Ren | 672bdfc | 2020-07-14 11:37:01 -0700 | [diff] [blame] | 74 | for (const std::filesystem::directory_entry& dirEnt : |
Jason M. Bills | c4a336f | 2019-04-23 10:43:10 -0700 | [diff] [blame] | 75 | std::filesystem::directory_iterator(selLogDir)) |
| 76 | { |
| 77 | std::string filename = dirEnt.path().filename(); |
| 78 | if (boost::starts_with(filename, selLogFilename)) |
| 79 | { |
| 80 | // If we find an ipmi_sel log file, save the path |
| 81 | selLogFiles.emplace_back(selLogDir / filename); |
| 82 | } |
| 83 | } |
| 84 | // As the log files rotate, they are appended with a ".#" that is higher for |
| 85 | // the older logs. Since we don't expect more than 10 log files, we |
| 86 | // can just sort the list to get them in order from newest to oldest |
| 87 | std::sort(selLogFiles.begin(), selLogFiles.end()); |
| 88 | |
| 89 | return !selLogFiles.empty(); |
| 90 | } |
| 91 | |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 92 | static unsigned int initializeRecordId(void) |
| 93 | { |
Jason M. Bills | c4a336f | 2019-04-23 10:43:10 -0700 | [diff] [blame] | 94 | std::vector<std::filesystem::path> selLogFiles; |
| 95 | if (!getSELLogFiles(selLogFiles)) |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 96 | { |
Jason M. Bills | c4a336f | 2019-04-23 10:43:10 -0700 | [diff] [blame] | 97 | return selInvalidRecID; |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 98 | } |
Jason M. Bills | c4a336f | 2019-04-23 10:43:10 -0700 | [diff] [blame] | 99 | std::ifstream logStream(selLogFiles.front()); |
| 100 | if (!logStream.is_open()) |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 101 | { |
Jason M. Bills | c4a336f | 2019-04-23 10:43:10 -0700 | [diff] [blame] | 102 | return selInvalidRecID; |
| 103 | } |
| 104 | std::string line; |
| 105 | std::string newestEntry; |
| 106 | while (std::getline(logStream, line)) |
| 107 | { |
| 108 | newestEntry = line; |
| 109 | } |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 110 | |
Jason M. Bills | c4a336f | 2019-04-23 10:43:10 -0700 | [diff] [blame] | 111 | std::vector<std::string> newestEntryFields; |
| 112 | boost::split(newestEntryFields, newestEntry, boost::is_any_of(" ,"), |
| 113 | boost::token_compress_on); |
| 114 | if (newestEntryFields.size() < 4) |
| 115 | { |
| 116 | return selInvalidRecID; |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 117 | } |
Jason M. Bills | c4a336f | 2019-04-23 10:43:10 -0700 | [diff] [blame] | 118 | |
| 119 | return std::stoul(newestEntryFields[1]); |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 120 | } |
| 121 | |
Charles Boyer | 9f476e8 | 2021-07-29 16:33:01 -0500 | [diff] [blame] | 122 | #ifdef SEL_LOGGER_CLEARS_SEL |
| 123 | static unsigned int recordId = initializeRecordId(); |
| 124 | |
| 125 | void clearSelLogFiles() |
| 126 | { |
| 127 | // Clear the SEL by deleting the log files |
| 128 | std::vector<std::filesystem::path> selLogFiles; |
| 129 | if (getSELLogFiles(selLogFiles)) |
| 130 | { |
| 131 | for (const std::filesystem::path& file : selLogFiles) |
| 132 | { |
| 133 | std::error_code ec; |
| 134 | std::filesystem::remove(file, ec); |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | recordId = selInvalidRecID; |
| 139 | |
| 140 | // Reload rsyslog so it knows to start new log files |
| 141 | boost::asio::io_service io; |
| 142 | auto dbus = std::make_shared<sdbusplus::asio::connection>(io); |
Patrick Williams | ccef227 | 2022-07-22 19:26:54 -0500 | [diff] [blame^] | 143 | sdbusplus::message_t rsyslogReload = dbus->new_method_call( |
Charles Boyer | 9f476e8 | 2021-07-29 16:33:01 -0500 | [diff] [blame] | 144 | "org.freedesktop.systemd1", "/org/freedesktop/systemd1", |
| 145 | "org.freedesktop.systemd1.Manager", "ReloadUnit"); |
| 146 | rsyslogReload.append("rsyslog.service", "replace"); |
| 147 | try |
| 148 | { |
Patrick Williams | ccef227 | 2022-07-22 19:26:54 -0500 | [diff] [blame^] | 149 | sdbusplus::message_t reloadResponse = dbus->call(rsyslogReload); |
Charles Boyer | 9f476e8 | 2021-07-29 16:33:01 -0500 | [diff] [blame] | 150 | } |
Patrick Williams | 3f4cd97 | 2021-10-06 12:42:50 -0500 | [diff] [blame] | 151 | catch (const sdbusplus::exception_t& e) |
Charles Boyer | 9f476e8 | 2021-07-29 16:33:01 -0500 | [diff] [blame] | 152 | { |
| 153 | std::cerr << e.what() << "\n"; |
| 154 | } |
| 155 | } |
| 156 | #endif |
| 157 | |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 158 | static unsigned int getNewRecordId(void) |
| 159 | { |
Charles Boyer | 9f476e8 | 2021-07-29 16:33:01 -0500 | [diff] [blame] | 160 | #ifndef SEL_LOGGER_CLEARS_SEL |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 161 | static unsigned int recordId = initializeRecordId(); |
| 162 | |
Jason M. Bills | 6afe956 | 2019-08-29 16:33:55 -0700 | [diff] [blame] | 163 | // If the log has been cleared, also clear the current ID |
| 164 | std::vector<std::filesystem::path> selLogFiles; |
| 165 | if (!getSELLogFiles(selLogFiles)) |
| 166 | { |
| 167 | recordId = selInvalidRecID; |
| 168 | } |
Charles Boyer | 9f476e8 | 2021-07-29 16:33:01 -0500 | [diff] [blame] | 169 | #endif |
Jason M. Bills | 6afe956 | 2019-08-29 16:33:55 -0700 | [diff] [blame] | 170 | |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 171 | if (++recordId >= selInvalidRecID) |
| 172 | { |
| 173 | recordId = 1; |
| 174 | } |
| 175 | return recordId; |
| 176 | } |
Lei YU | e526b86 | 2020-12-03 15:41:59 +0800 | [diff] [blame] | 177 | #endif |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 178 | |
Zhikui Ren | 672bdfc | 2020-07-14 11:37:01 -0700 | [diff] [blame] | 179 | static void toHexStr(const std::vector<uint8_t>& data, std::string& hexStr) |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 180 | { |
| 181 | std::stringstream stream; |
| 182 | stream << std::hex << std::uppercase << std::setfill('0'); |
William A. Kennington III | 2e43726 | 2021-07-30 12:04:19 -0700 | [diff] [blame] | 183 | for (int v : data) |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 184 | { |
| 185 | stream << std::setw(2) << v; |
| 186 | } |
| 187 | hexStr = stream.str(); |
| 188 | } |
| 189 | |
Jason M. Bills | 97be353 | 2018-11-02 13:09:16 -0700 | [diff] [blame] | 190 | template <typename... T> |
William A. Kennington III | d585c59 | 2021-07-30 12:10:25 -0700 | [diff] [blame] | 191 | static uint16_t selAddSystemRecord([[maybe_unused]] const std::string& message, |
| 192 | const std::string& path, |
| 193 | const std::vector<uint8_t>& selData, |
| 194 | const bool& assert, const uint16_t& genId, |
| 195 | [[maybe_unused]] T&&... metadata) |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 196 | { |
| 197 | // Only 3 bytes of SEL event data are allowed in a system record |
| 198 | if (selData.size() > selEvtDataMaxSize) |
| 199 | { |
| 200 | throw std::invalid_argument("Event data too large"); |
| 201 | } |
| 202 | std::string selDataStr; |
| 203 | toHexStr(selData, selDataStr); |
| 204 | |
Lei YU | e526b86 | 2020-12-03 15:41:59 +0800 | [diff] [blame] | 205 | #ifdef SEL_LOGGER_SEND_TO_LOGGING_SERVICE |
| 206 | using namespace xyz::openbmc_project::Logging::SEL; |
Lei YU | 7d8a300 | 2021-01-21 17:16:19 +0800 | [diff] [blame] | 207 | auto entryID = report<SELCreated>( |
Lei YU | e526b86 | 2020-12-03 15:41:59 +0800 | [diff] [blame] | 208 | Created::RECORD_TYPE(selSystemType), Created::GENERATOR_ID(genId), |
| 209 | Created::SENSOR_DATA(selDataStr.c_str()), Created::EVENT_DIR(assert), |
| 210 | Created::SENSOR_PATH(path.c_str())); |
Lei YU | 7d8a300 | 2021-01-21 17:16:19 +0800 | [diff] [blame] | 211 | return static_cast<uint16_t>(entryID); |
Lei YU | e526b86 | 2020-12-03 15:41:59 +0800 | [diff] [blame] | 212 | #else |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 213 | unsigned int recordId = getNewRecordId(); |
Jason M. Bills | 97be353 | 2018-11-02 13:09:16 -0700 | [diff] [blame] | 214 | sd_journal_send("MESSAGE=%s", message.c_str(), "PRIORITY=%i", selPriority, |
| 215 | "MESSAGE_ID=%s", selMessageId, "IPMI_SEL_RECORD_ID=%d", |
| 216 | recordId, "IPMI_SEL_RECORD_TYPE=%x", selSystemType, |
| 217 | "IPMI_SEL_GENERATOR_ID=%x", genId, |
| 218 | "IPMI_SEL_SENSOR_PATH=%s", path.c_str(), |
| 219 | "IPMI_SEL_EVENT_DIR=%x", assert, "IPMI_SEL_DATA=%s", |
| 220 | selDataStr.c_str(), std::forward<T>(metadata)..., NULL); |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 221 | return recordId; |
Lei YU | e526b86 | 2020-12-03 15:41:59 +0800 | [diff] [blame] | 222 | #endif |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 223 | } |
| 224 | |
William A. Kennington III | d585c59 | 2021-07-30 12:10:25 -0700 | [diff] [blame] | 225 | static uint16_t selAddOemRecord([[maybe_unused]] const std::string& message, |
Zhikui Ren | 672bdfc | 2020-07-14 11:37:01 -0700 | [diff] [blame] | 226 | const std::vector<uint8_t>& selData, |
| 227 | const uint8_t& recordType) |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 228 | { |
| 229 | // A maximum of 13 bytes of SEL event data are allowed in an OEM record |
| 230 | if (selData.size() > selOemDataMaxSize) |
| 231 | { |
| 232 | throw std::invalid_argument("Event data too large"); |
| 233 | } |
| 234 | std::string selDataStr; |
| 235 | toHexStr(selData, selDataStr); |
| 236 | |
Lei YU | e526b86 | 2020-12-03 15:41:59 +0800 | [diff] [blame] | 237 | #ifdef SEL_LOGGER_SEND_TO_LOGGING_SERVICE |
| 238 | using namespace xyz::openbmc_project::Logging::SEL; |
Lei YU | 7d8a300 | 2021-01-21 17:16:19 +0800 | [diff] [blame] | 239 | auto entryID = report<SELCreated>( |
| 240 | Created::RECORD_TYPE(recordType), Created::GENERATOR_ID(0), |
| 241 | Created::SENSOR_DATA(selDataStr.c_str()), Created::EVENT_DIR(0), |
| 242 | Created::SENSOR_PATH("")); |
| 243 | return static_cast<uint16_t>(entryID); |
Lei YU | e526b86 | 2020-12-03 15:41:59 +0800 | [diff] [blame] | 244 | #else |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 245 | unsigned int recordId = getNewRecordId(); |
| 246 | sd_journal_send("MESSAGE=%s", message.c_str(), "PRIORITY=%i", selPriority, |
| 247 | "MESSAGE_ID=%s", selMessageId, "IPMI_SEL_RECORD_ID=%d", |
| 248 | recordId, "IPMI_SEL_RECORD_TYPE=%x", recordType, |
| 249 | "IPMI_SEL_DATA=%s", selDataStr.c_str(), NULL); |
| 250 | return recordId; |
Lei YU | e526b86 | 2020-12-03 15:41:59 +0800 | [diff] [blame] | 251 | #endif |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 252 | } |
| 253 | |
William A. Kennington III | d585c59 | 2021-07-30 12:10:25 -0700 | [diff] [blame] | 254 | int main(int, char*[]) |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 255 | { |
| 256 | // setup connection to dbus |
| 257 | boost::asio::io_service io; |
| 258 | auto conn = std::make_shared<sdbusplus::asio::connection>(io); |
| 259 | |
| 260 | // IPMI SEL Object |
| 261 | conn->request_name(ipmiSelObject); |
| 262 | auto server = sdbusplus::asio::object_server(conn); |
| 263 | |
| 264 | // Add SEL Interface |
| 265 | std::shared_ptr<sdbusplus::asio::dbus_interface> ifaceAddSel = |
| 266 | server.add_interface(ipmiSelPath, ipmiSelAddInterface); |
| 267 | |
| 268 | // Add a new SEL entry |
| 269 | ifaceAddSel->register_method( |
Zhikui Ren | 672bdfc | 2020-07-14 11:37:01 -0700 | [diff] [blame] | 270 | "IpmiSelAdd", [](const std::string& message, const std::string& path, |
| 271 | const std::vector<uint8_t>& selData, |
| 272 | const bool& assert, const uint16_t& genId) { |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 273 | return selAddSystemRecord(message, path, selData, assert, genId); |
| 274 | }); |
| 275 | // Add a new OEM SEL entry |
| 276 | ifaceAddSel->register_method( |
| 277 | "IpmiSelAddOem", |
Zhikui Ren | 672bdfc | 2020-07-14 11:37:01 -0700 | [diff] [blame] | 278 | [](const std::string& message, const std::vector<uint8_t>& selData, |
| 279 | const uint8_t& recordType) { |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 280 | return selAddOemRecord(message, selData, recordType); |
| 281 | }); |
Charles Boyer | 9f476e8 | 2021-07-29 16:33:01 -0500 | [diff] [blame] | 282 | |
| 283 | #ifdef SEL_LOGGER_CLEARS_SEL |
| 284 | #ifndef SEL_LOGGER_SEND_TO_LOGGING_SERVICE |
| 285 | // Clear SEL entries |
| 286 | ifaceAddSel->register_method("Clear", []() { clearSelLogFiles(); }); |
| 287 | #endif |
| 288 | #endif |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 289 | ifaceAddSel->initialize(); |
| 290 | |
| 291 | #ifdef SEL_LOGGER_MONITOR_THRESHOLD_EVENTS |
Patrick Williams | ccef227 | 2022-07-22 19:26:54 -0500 | [diff] [blame^] | 292 | sdbusplus::bus::match_t thresholdAssertMonitor = |
Zhikui Ren | 25b26e1 | 2020-06-26 20:18:19 -0700 | [diff] [blame] | 293 | startThresholdAssertMonitor(conn); |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 294 | #endif |
| 295 | |
Nikhil Potade | afbaa09 | 2019-03-06 16:18:13 -0800 | [diff] [blame] | 296 | #ifdef REDFISH_LOG_MONITOR_PULSE_EVENTS |
Patrick Williams | ccef227 | 2022-07-22 19:26:54 -0500 | [diff] [blame^] | 297 | sdbusplus::bus::match_t pulseEventMonitor = startPulseEventMonitor(conn); |
Nikhil Potade | afbaa09 | 2019-03-06 16:18:13 -0800 | [diff] [blame] | 298 | #endif |
| 299 | |
Charles Hsu | dbd77b9 | 2020-10-29 11:20:34 +0800 | [diff] [blame] | 300 | #ifdef SEL_LOGGER_MONITOR_WATCHDOG_EVENTS |
Patrick Williams | ccef227 | 2022-07-22 19:26:54 -0500 | [diff] [blame^] | 301 | sdbusplus::bus::match_t watchdogEventMonitor = |
Charles Hsu | dbd77b9 | 2020-10-29 11:20:34 +0800 | [diff] [blame] | 302 | startWatchdogEventMonitor(conn); |
| 303 | #endif |
George Hung | 486e42e | 2021-04-14 20:20:42 +0800 | [diff] [blame] | 304 | |
| 305 | #ifdef SEL_LOGGER_MONITOR_THRESHOLD_ALARM_EVENTS |
| 306 | startThresholdAlarmMonitor(conn); |
| 307 | #endif |
Jason M. Bills | 5e049d3 | 2018-10-19 12:59:38 -0700 | [diff] [blame] | 308 | io.run(); |
| 309 | |
| 310 | return 0; |
| 311 | } |