diff --git a/fairmq/shmem/Manager.h b/fairmq/shmem/Manager.h index 7949d2a8e..7da4c075b 100644 --- a/fairmq/shmem/Manager.h +++ b/fairmq/shmem/Manager.h @@ -238,7 +238,7 @@ class Manager } if (!p.empty()) { - boost::process::spawn(p, "-x", "-m", "--shmid", id, "-d", "-t", "2000", verbose ? "--verbose" : "", env); + boost::process::spawn(p, "-x", "-m", "--shmid", id, "-d", "-t", "2000", (verbose ? "--verbose" : ""), env); int numTries = 0; do { try { diff --git a/fairmq/shmem/Monitor.cxx b/fairmq/shmem/Monitor.cxx index 3f85bc9d8..27b087ce4 100644 --- a/fairmq/shmem/Monitor.cxx +++ b/fairmq/shmem/Monitor.cxx @@ -497,7 +497,7 @@ std::pair RunRemoval(std::function return {name, true}; } else { if (verbose) { - LOG(info) << "Did not remove '" << name << "'. Already removed?"; + LOG(debug) << "Did not remove '" << name << "'. Already removed?"; } return {name, false}; } @@ -525,7 +525,7 @@ std::vector> Monitor::Cleanup(const ShmId& shmId, b RegionCounter* rc = managementSegment.find(bipc::unique_instance).first; if (rc) { if (verbose) { - LOG(info) << "Region counter found: " << rc->fCount; + LOG(debug) << "Region counter found: " << rc->fCount; } uint16_t regionCount = rc->fCount; diff --git a/fairmq/shmem/runMonitor.cxx b/fairmq/shmem/runMonitor.cxx index 43a180e95..dfa1cafe6 100644 --- a/fairmq/shmem/runMonitor.cxx +++ b/fairmq/shmem/runMonitor.cxx @@ -89,6 +89,7 @@ int main(int argc, char** argv) bool listAll = false; string listAllPath; bool verbose = false; + string severity; int userId = -1; options_description desc("Options"); @@ -109,6 +110,7 @@ int main(int argc, char** argv) ("list-all" , value(&listAll)->implicit_value(true), "List all sessions & segments") ("list-all-path" , value(&listAllPath)->default_value("/dev/shm/"),"Path for the --list-all command to search segments in") ("verbose" , value(&verbose)->implicit_value(true), "Verbose mode (daemon will output to a file 'fairmq-shmmonitor_')") + ("severity" , value(&severity)->default_value("info"), "Log severity") ("user-id" , value(&userId)->default_value(-1), "User id (used with --get-shmid)") ("help,h", "Print help"); @@ -122,6 +124,8 @@ int main(int argc, char** argv) notify(vm); + fair::Logger::SetConsoleSeverity(severity); + if (getShmId) { if (userId == -1) { LOG(info) << "shmem id for session '" << sessionName << "' and current user id " << geteuid()