YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
yarp::os::SystemInfo Class Reference

A class to get the system (platform) status such as available memory, storage, CPU load and etc. More...

#include <yarp/os/SystemInfo.h>

Classes

struct  LoadInfo
 The LoadInfo struct holds the current cpu load information. More...
 
struct  MemoryInfo
 The MemoryInfo struct holds the system memory information. More...
 
struct  PlatformInfo
 The PlatformInfo struct holds the operating system information. More...
 
struct  ProcessInfo
 The ProcessInfo struct provides the operating system process information. More...
 
struct  ProcessorInfo
 The ProcessorInfo struct holds the processor information. More...
 
struct  StorageInfo
 The StorageInfo struct holds the system storage information. More...
 
struct  UserInfo
 The UserInfo struct holds the current user information. More...
 

Public Types

typedef int capacity_t
 
typedef struct yarp::os::SystemInfo::MemoryInfo MemoryInfo
 The MemoryInfo struct holds the system memory information.
 
typedef struct yarp::os::SystemInfo::StorageInfo StorageInfo
 The StorageInfo struct holds the system storage information.
 
typedef struct yarp::os::SystemInfo::ProcessorInfo ProcessorInfo
 The ProcessorInfo struct holds the processor information.
 
typedef struct yarp::os::SystemInfo::LoadInfo LoadInfo
 The LoadInfo struct holds the current cpu load information.
 
typedef struct yarp::os::SystemInfo::PlatformInfo PlatformInfo
 The PlatformInfo struct holds the operating system information.
 
typedef struct yarp::os::SystemInfo::UserInfo UserInfo
 The UserInfo struct holds the current user information.
 
typedef struct yarp::os::SystemInfo::ProcessInfo ProcessInfo
 The ProcessInfo struct provides the operating system process information.
 

Static Public Member Functions

static MemoryInfo getMemoryInfo ()
 getMemoryInfo
 
static StorageInfo getStorageInfo ()
 getStorageInfo
 
static ProcessorInfo getProcessorInfo ()
 getProcessorInfo
 
static PlatformInfo getPlatformInfo ()
 getPlatformInfo
 
static LoadInfo getLoadInfo ()
 getLoadInfo
 
static UserInfo getUserInfo ()
 getUserInfo
 
static ProcessInfo getProcessInfo (int pid=0)
 gets the operating system process information given by its PID.
 

Detailed Description

A class to get the system (platform) status such as available memory, storage, CPU load and etc.

Definition at line 24 of file SystemInfo.h.

Member Typedef Documentation

◆ capacity_t

◆ LoadInfo

The LoadInfo struct holds the current cpu load information.

◆ MemoryInfo

◆ PlatformInfo

◆ ProcessInfo

The ProcessInfo struct provides the operating system process information.

◆ ProcessorInfo

◆ StorageInfo

◆ UserInfo

Member Function Documentation

◆ getLoadInfo()

SystemInfo::LoadInfo SystemInfo::getLoadInfo ( )
static

getLoadInfo

Returns
information about the current cpu usage (load)

Definition at line 751 of file SystemInfo.cpp.

◆ getMemoryInfo()

SystemInfo::MemoryInfo SystemInfo::getMemoryInfo ( )
static

getMemoryInfo

Returns
information about the system memory

Definition at line 255 of file SystemInfo.cpp.

◆ getPlatformInfo()

SystemInfo::PlatformInfo SystemInfo::getPlatformInfo ( )
static

getPlatformInfo

Returns
information about the operating system type

Definition at line 597 of file SystemInfo.cpp.

◆ getProcessInfo()

SystemInfo::ProcessInfo SystemInfo::getProcessInfo ( int  pid = 0)
static

gets the operating system process information given by its PID.

If the information cannot be retrieved, ProcessInfo.pid is set to -1 otherwise, it is equal to the given PID as parameter.

Parameters
pidthe process (task) PID, or 0 for current process
Returns
ProcessInfo

Definition at line 805 of file SystemInfo.cpp.

◆ getProcessorInfo()

SystemInfo::ProcessorInfo SystemInfo::getProcessorInfo ( )
static

getProcessorInfo

Returns
information about the processor type

Definition at line 448 of file SystemInfo.cpp.

◆ getStorageInfo()

SystemInfo::StorageInfo SystemInfo::getStorageInfo ( )
static

getStorageInfo

Returns
information about the system storage

Definition at line 315 of file SystemInfo.cpp.

◆ getUserInfo()

SystemInfo::UserInfo SystemInfo::getUserInfo ( )
static

getUserInfo

Returns
information about the current user

Definition at line 720 of file SystemInfo.cpp.


The documentation for this class was generated from the following files: