29 #include <sys/types.h> 33 #include <boost/date_time/posix_time/posix_time.hpp> 43 throw std::runtime_error(
"Could not determine program name: not" 52 throw std::runtime_error(
"Could not determine commandline arguments:" 61 throw std::runtime_error(
"Could not determine executable path:" 70 throw std::runtime_error(
"Could not determine process start time:" 79 throw std::runtime_error(
"Could not determine executing user:" 84 passwd* entry = getpwuid(getuid());
85 return entry->pw_name;
std::vector< std::string > getCommandlineArguments(PID pid)
Return the list of commandline arguments of the process designated by pid.
boost::posix_time::ptime getProcessStartTime(PID pid)
Return the start time of the process designated by pid.
PID currentProcessId()
Return the id the current process.
boost::posix_time::ptime currentProcessStartTime()
Return the start time of the current process.
std::string getExecutablePath(PID pid)
Return the absolute path of the executable file that is executed in the process designated by pid...
std::vector< std::string > currentCommandlineArguments()
Return the list of commandline arguments of the current process.
std::string getExecutingUser(PID pid)
Return login- or account-name of the user executing pid.
std::string currentExecutingUser()
Return the login- or account-name of the user executing the current process.
std::string getProgramName(PID pid)
Return the name of the program executed in the process designated by pid.
std::string currentProgramName()
Return the name of the program executed in the current process.
std::string currentExecutablePath()
Return the absolute path of the executable file that is executed in the current process.