#include #include #include #include "ISlowControlDatabase.hxx" #include "gscUtils.hxx" /// Program that checks the number of active connections to /// GSC database host. If program is run with '-v' option will /// also print out details of each connection. int main(int argc,char **argv){ if(argc > 1 && std::string(argv[1]) == "-v") COMET::ICOMETLog::SetLogLevel(COMET::ICOMETLog::VerboseLevel); int nconnections = ISlowControlDatabase::Get().GetNumberCurrentConnections(); std::cout << "Total number of connections: " << nconnections << std::endl; return nconnections; }