CPUStats Class Reference
System CPU utilization statistics.
More...
#include <CPUStats.h++>
List of all members.
Public Member Functions |
| | CPUStats () |
| | Construct a new CPUStats object.
|
| | ~CPUStats () throw () |
| | Destructor.
|
| float | getSystem (int cpu=-1) const throw (OutOfBoundsException) |
| | Get the percent of CPU time spent in privileged (kernel) mode.
|
| float | getUser (int cpu=-1) const throw (OutOfBoundsException) |
| | Get the percent of CPU time spent in unprivileged (user) mode.
|
| float | getNice (int cpu=-1) const throw (OutOfBoundsException) |
| | Get the percent of CPU time spent on low-priority tasks.
|
| float | getIdle (int cpu=-1) const throw (OutOfBoundsException) |
| | Get the percent of CPU time spent on the idle task.
|
| uint_t | getCPUCount () const throw () |
| | Get the number of CPUs in the system.
|
| bool | collect () throw () |
| | Collect (update) the stats represented by this object.
|
| void | reset () throw () |
| | Reset the stats object.
|
Detailed Description
System CPU utilization statistics.
- Author:
- Mark Lindner
Constructor & Destructor Documentation
Member Function Documentation
| bool collect |
( |
|
) |
throw () [virtual] |
Collect (update) the stats represented by this object.
- Returns:
- true if the stats were collected successfully, false otherwise.
Implements SystemStats.
| uint_t getCPUCount |
( |
|
) |
const throw () [inline] |
Get the number of CPUs in the system.
Get the percent of CPU time spent on the idle task.
- Parameters:
-
| cpu | The CPU number or -1 for the average across all CPUs. |
- Exceptions:
-
Get the percent of CPU time spent on low-priority tasks.
- Parameters:
-
| cpu | The CPU number or -1 for the average across all CPUs. |
- Exceptions:
-
Get the percent of CPU time spent in privileged (kernel) mode.
- Parameters:
-
| cpu | The CPU number or -1 for the average across all CPUs. |
- Exceptions:
-
Get the percent of CPU time spent in unprivileged (user) mode.
- Parameters:
-
| cpu | The CPU number or -1 for the average across all CPUs. |
- Exceptions:
-
| void reset |
( |
|
) |
throw () [virtual] |
The documentation for this class was generated from the following files: