YARP
Yet Another Robot Platform
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>

Detailed Description

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

Definition at line 31 of file 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. More...
 
typedef struct yarp::os::SystemInfo::StorageInfo StorageInfo
 The StorageInfo struct holds the system storage information. More...
 
typedef struct yarp::os::SystemInfo::ProcessorInfo ProcessorInfo
 The ProcessorInfo struct holds the processor information. More...
 
typedef struct yarp::os::SystemInfo::LoadInfo LoadInfo
 The LoadInfo struct holds the current cpu load information. More...
 
typedef struct yarp::os::SystemInfo::PlatformInfo PlatformInfo
 The PlatformInfo struct holds the operating system information. More...
 
typedef struct yarp::os::SystemInfo::UserInfo UserInfo
 The UserInfo struct holds the current user information. More...
 
typedef struct yarp::os::SystemInfo::ProcessInfo ProcessInfo
 The ProcessInfo struct provides the operating system process information. More...
 

Static Public Member Functions

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

Member Typedef Documentation

◆ capacity_t

Definition at line 34 of file SystemInfo.h.

◆ LoadInfo

The LoadInfo struct holds the current cpu load information.

◆ MemoryInfo

The MemoryInfo struct holds the system memory information.

◆ PlatformInfo

The PlatformInfo struct holds the operating system information.

◆ ProcessInfo

The ProcessInfo struct provides the operating system process information.

◆ ProcessorInfo

The ProcessorInfo struct holds the processor information.

◆ StorageInfo

The StorageInfo struct holds the system storage information.

◆ UserInfo

The UserInfo struct holds the current user information.

Member Function Documentation

◆ getLoadInfo()

SystemInfo::LoadInfo SystemInfo::getLoadInfo ( )
static

getLoadInfo

Returns
information about the current cpu usage (load)

Definition at line 719 of file SystemInfo.cpp.

◆ getMemoryInfo()

SystemInfo::MemoryInfo SystemInfo::getMemoryInfo ( )
static

getMemoryInfo

Returns
information about the system memory

Definition at line 241 of file SystemInfo.cpp.

◆ getPlatformInfo()

SystemInfo::PlatformInfo SystemInfo::getPlatformInfo ( )
static

getPlatformInfo

Returns
information about the operating system type

Definition at line 560 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 780 of file SystemInfo.cpp.

◆ getProcessorInfo()

SystemInfo::ProcessorInfo SystemInfo::getProcessorInfo ( )
static

getProcessorInfo

Returns
information about the processor type

Definition at line 441 of file SystemInfo.cpp.

◆ getStorageInfo()

SystemInfo::StorageInfo SystemInfo::getStorageInfo ( )
static

getStorageInfo

Returns
information about the system storage

Definition at line 305 of file SystemInfo.cpp.

◆ getUserInfo()

SystemInfo::UserInfo SystemInfo::getUserInfo ( )
static

getUserInfo

Returns
information about the current user

Definition at line 686 of file SystemInfo.cpp.


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