shmmonitor: add severity setting

This commit is contained in:
Alexey Rybalchenko
2021-04-14 11:31:56 +02:00
parent 2c89b24857
commit b67b80e0ad
3 changed files with 7 additions and 3 deletions

View File

@@ -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<bool>(&listAll)->implicit_value(true), "List all sessions & segments")
("list-all-path" , value<string>(&listAllPath)->default_value("/dev/shm/"),"Path for the --list-all command to search segments in")
("verbose" , value<bool>(&verbose)->implicit_value(true), "Verbose mode (daemon will output to a file 'fairmq-shmmonitor_<timestamp>')")
("severity" , value<string>(&severity)->default_value("info"), "Log severity")
("user-id" , value<int>(&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()