shm: monitor: disable number of msgs in the ack queue output

This commit is contained in:
Alexey Rybalchenko 2022-01-30 21:40:37 +01:00
parent ede5718806
commit ddc7c834db

View File

@ -269,12 +269,12 @@ bool Monitor::PrintShm(const ShmId& shmId)
ss << "\n [" << r.first << "]: " << (r.second.fDestroyed ? "destroyed" : "alive"); ss << "\n [" << r.first << "]: " << (r.second.fDestroyed ? "destroyed" : "alive");
ss << ", size: " << r.second.fSize; ss << ", size: " << r.second.fSize;
try { // try {
boost::interprocess::message_queue q(open_only, std::string("fmq_" + std::string(shmId) + "_rgq_" + to_string(r.first)).c_str()); // boost::interprocess::message_queue q(open_only, std::string("fmq_" + std::string(shmId) + "_rgq_" + to_string(r.first)).c_str());
ss << ", ack queue: " << q.get_num_msg() << " messages"; // ss << ", ack queue: " << q.get_num_msg() << " messages";
} catch (bie&) { // } catch (bie&) {
ss << ", ack queue: not found"; // ss << ", ack queue: not found";
} // }
} }
} }
LOGV(info, user1) << ss.str(); LOGV(info, user1) << ss.str();
@ -680,7 +680,6 @@ void Monitor::ResetContent(const ShmId& shmIdT, bool verbose /* = true */)
Remove<bipc::message_queue>("fmq_" + shmId + "_rgq_" + to_string(id), verbose); Remove<bipc::message_queue>("fmq_" + shmId + "_rgq_" + to_string(id), verbose);
} }
} }
} catch (bie& e) { } catch (bie& e) {
if (verbose) { if (verbose) {
cout << "Could not find '" << managementSegmentName << "' segment. Nothing to cleanup." << endl; cout << "Could not find '" << managementSegmentName << "' segment. Nothing to cleanup." << endl;