|
MemoryAccessor 1
A command-line front-end for exploring virtual memory of a linux process by accessing /proc/PID/mem file.
|
A class with functionality to work with system processes. More...
#include <processapi.h>
Public Member Functions | |
| void | SetBufferSize (const size_t &buffer_size) |
| Set buffer size of an instance. | |
| std::unordered_set< pid_t > | GetAllPids () const noexcept |
| Get all PIDs existing in the system. | |
| std::unordered_set< std::string > | GetAllProcessNames () const noexcept |
| Get all names of processes existing in the system. | |
| std::unordered_set< pid_t > | FindPidsByName (const std::string &name) const noexcept |
| Get all PIDs by name of the process. | |
| uint8_t | PidExists (const pid_t &pid) const noexcept |
| Check if a process with the given PID exists. | |
| uint8_t | ProcessExists (const std::string &pname) const noexcept |
| Check if a process with the given name exists. | |
A class with functionality to work with system processes.
This class provides a set of functions that perform work with processes currently existing in system. It contains functions such as finding PIDs by name of the process, getting all PIDs/process names and so on.
|
noexcept |
Get all PIDs by name of the process.
| [in] | name | Name of the process in type of std::string. |
Get all process IDs that can be found by running "pgrep -x "process_name"" shell command.
|
noexcept |
Get all PIDs existing in the system.
Get all process IDs that can be found by running "pgrep .+" shell command.
|
noexcept |
Get all names of processes existing in the system.
Get all names of processes that can be found by running "pgrep -l .+" shell command.
|
noexcept |
Check if a process with the given PID exists.
| [in] | pid | PID of the process in pid_t type. |
Check if a process with the given process ID exists in the system by checking if /proc/PID directory exists.
|
noexcept |
Check if a process with the given name exists.
| [in] | pname | Name of the process in type of std::string. |
Check if a process with the given process name exists in the system by running "pgrep -x "process_name"" shell command.
|
inline |
Set buffer size of an instance.
| [in] | buffer_size | Desired buffer size in bytes. |
Set buffer size, a number of bytes that are allocated when needed.