Utility to get statistics about the host operating system (CPU usage, wireless link data, etc).
More...
#include <ArSystemStatus.h>
Utility to get statistics about the host operating system (CPU usage, wireless link data, etc).
This class is only implemented for Linux; on Windows you will get invalid information.
double ArSystemStatus::getCPU |
( |
) | |
|
|
static |
Get CPU work to idle ratio since last refresh. This is a value ranging from (0 .. 1) X (Num. CPUs). (Therefore if you have two CPUs, the maximum value will be 2.0, or 200%.) This value is calculated as the percentage of time the CPU spent doing work (not in "idle" state) since the previous calculation.
- Returns
- CPU usage value, or -1 if unable to determine
double ArSystemStatus::getCPUPercent |
( |
) | |
|
|
static |
Get CPU usage as percentage since last refresh. This is a value ranging from (0..100) X (Num. CPUs). (Therefore if you have two CPUs, the maximum value will be 200%).
- See Also
- getCPU()
- Returns
- CPU usage as percentage, or -1 if not able to determine
ArRetFunctor< double > * ArSystemStatus::getCPUPercentFunctor |
( |
) | |
|
|
static |
- Returns
- Pointer to a functor which can be used to retrieve the current CPU percentage
ArRetFunctor< double > * ArSystemStatus::getUptimeHoursFunctor |
( |
) | |
|
|
static |
- Returns
- Pointer to a functor which can be used to retrieve the current uptime (hours)
int ArSystemStatus::getWirelessDiscardedPackets |
( |
) | |
|
|
static |
Get wireless network total discarded packets (for first configured wireless device).
int ArSystemStatus::getWirelessDiscardedPacketsBecauseNetConflict |
( |
) | |
|
|
static |
Get wireless network packets discarded because of a conflict with another network (for first configured wireless device).
int ArSystemStatus::getWirelessLinkNoise |
( |
) | |
|
|
static |
Get wireless network noise level (for first configured wireless device).
int ArSystemStatus::getWirelessLinkQuality |
( |
) | |
|
|
static |
Get wireless network general link quality heuristic (for first configured wireless device).
int ArSystemStatus::getWirelessLinkSignal |
( |
) | |
|
|
static |
Get wireless netork signal level (for first configured wireless device).
static void ArSystemStatus::refresh |
( |
) | |
|
|
inlinestatic |
- Deprecated:
- Calling this function is no longer neccesary.
static void ArSystemStatus::runRefreshThread |
( |
int |
refreshFrequency = 5000 ) | |
|
|
inlinestatic |
void ArSystemStatus::startPeriodicUpdate |
( |
int |
refreshFrequency = 5000 ) | |
|
|
static |
Create a new thread which periodically invalidates cached data, causing it to be recalculated when next accessed. Use this if you will be accessing the data too frequently to require it to be recacluted on each access.
INTERNAL_CLASSES
void ArSystemStatus::stopPeriodicUpdate |
( |
) | |
|
|
static |
Stop periodic update thread. Henceforth any access of data will cause it to be re-read and recalculated.
The documentation for this class was generated from the following files:
- ArSystemStatus.h
- ArSystemStatus.cpp