|
ESA JPIP server
0.1
|
Contains the run-time information of the application. More...
#include <app_info.h>
Classes | |
| struct | Data |
| Contains the data block that is maintained in shared memory. More... | |
Public Member Functions | |
| AppInfo () | |
| Initializes the object. More... | |
| bool | Init () |
| Initializes the object and the handling of the application run-time information. More... | |
| bool | is_running () const |
Returns true if the application is running. More... | |
| AppInfo & | Update () |
| Updates the run-time information of the application. More... | |
| double | available_memory () const |
| Returns the available memory of the system. More... | |
| double | father_memory () const |
| Returns the memory used by the father process. More... | |
| double | child_memory () const |
| Returns the memory used by the child process. More... | |
| int | num_threads () const |
| Returns the number of active threads. More... | |
| unsigned long | child_time () const |
| Returns the time spent by the child process. More... | |
| unsigned long | time () const |
| Returns the time spent by the father process. More... | |
| Data * | operator-> () const |
| ~AppInfo () | |
Private Member Functions | |
| string | GetProcStat_ (int pid, int field) const |
| Returns a specific field of /proc/<pid>/stat as a string. More... | |
| template<typename TYPE > | |
| TYPE | GetProcStat (int pid, int field) const |
| Returns a specific field of /proc/<pid>/stat as a defined type. More... | |
Private Attributes | |
| int | shmid |
| Identifier of the shared memory block. More... | |
| int | lock_file |
| Lock file. More... | |
| Data * | data_ptr |
| Pointer to the shared memory block. More... | |
| bool | is_running_ |
true if the application is running More... | |
| int | num_threads_ |
| Number of active threads. More... | |
| double | child_memory_ |
| Memory used by the child process. More... | |
| unsigned long | time_ |
| Time spent by the father. More... | |
| double | father_memory_ |
| Memory used by the father process. More... | |
| double | available_memory_ |
| Available memory in the system. More... | |
| unsigned long | child_time_ |
| Time spend by the child. More... | |
Friends | |
| ostream & | operator<< (ostream &out, const AppInfo &app) |
Contains the run-time information of the application.
This class can be printed.
|
inline |
Initializes the object.
| AppInfo::~AppInfo | ( | ) |
|
inline |
Returns the available memory of the system.
|
inline |
Returns the memory used by the child process.
|
inline |
Returns the time spent by the child process.
|
inline |
Returns the memory used by the father process.
|
inlineprivate |
Returns a specific field of /proc/<pid>/stat as a defined type.
|
private |
Returns a specific field of /proc/<pid>/stat as a string.
| bool AppInfo::Init | ( | ) |
Initializes the object and the handling of the application run-time information.
true if successful.
|
inline |
Returns true if the application is running.
|
inline |
Returns the number of active threads.
|
inline |
|
inline |
Returns the time spent by the father process.
| AppInfo & AppInfo::Update | ( | ) |
Updates the run-time information of the application.
|
friend |
|
private |
Available memory in the system.
|
private |
Memory used by the child process.
|
private |
Time spend by the child.
|
private |
Pointer to the shared memory block.
|
private |
Memory used by the father process.
|
private |
true if the application is running
|
private |
Lock file.
|
private |
Number of active threads.
|
private |
Identifier of the shared memory block.
|
private |
Time spent by the father.