YARP  2.3.68+279-20170522.8+git3e63e13
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>

Classes

struct  LoadInfo
 The LoadInfo stuct holds the current cpu load information. More...
 
struct  MemoryInfo
 The MemoryInfo struct holds the system memory information. More...
 
struct  PlatformInfo
 The PlatformInfo stuct holds the operating system information. More...
 
struct  ProcessInfo
 The ProcessInfo stuct provides the operating system proccess 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 stuct 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 stuct holds the current cpu load information. More...
 
typedef struct yarp::os::SystemInfo::PlatformInfo PlatformInfo
 The PlatformInfo stuct holds the operating system information. More...
 
typedef struct yarp::os::SystemInfo::UserInfo UserInfo
 The UserInfo stuct holds the current user information. More...
 
typedef struct yarp::os::SystemInfo::ProcessInfo ProcessInfo
 The ProcessInfo stuct provides the operating system proccess 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)
 gets the operating system process information given by its PID. More...
 

Detailed Description

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

Definition at line 29 of file SystemInfo.h.

Member Typedef Documentation

◆ capacity_t

Definition at line 32 of file SystemInfo.h.

◆ LoadInfo

The LoadInfo stuct holds the current cpu load information.

◆ MemoryInfo

The MemoryInfo struct holds the system memory information.

◆ PlatformInfo

The PlatformInfo stuct holds the operating system information.

◆ ProcessInfo

The ProcessInfo stuct provides the operating system proccess information.

◆ ProcessorInfo

The ProcessorInfo struct holds the processor information.

◆ StorageInfo

The StorageInfo struct holds the system storage information.

◆ UserInfo

The UserInfo stuct 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 709 of file SystemInfo.cpp.

◆ getMemoryInfo()

SystemInfo::MemoryInfo SystemInfo::getMemoryInfo ( )
static

getMemoryInfo

Returns
information about the system memory

Definition at line 236 of file SystemInfo.cpp.

◆ getPlatformInfo()

SystemInfo::PlatformInfo SystemInfo::getPlatformInfo ( )
static

getPlatformInfo

Returns
information about the operating system type

Definition at line 555 of file SystemInfo.cpp.

◆ getProcessInfo()

SystemInfo::ProcessInfo SystemInfo::getProcessInfo ( int  pid)
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
Returns
ProcessInfo

Definition at line 770 of file SystemInfo.cpp.

◆ getProcessorInfo()

SystemInfo::ProcessorInfo SystemInfo::getProcessorInfo ( )
static

getProcessorInfo

Returns
information about the processor type

Definition at line 436 of file SystemInfo.cpp.

◆ getStorageInfo()

SystemInfo::StorageInfo SystemInfo::getStorageInfo ( )
static

getStorageInfo

Returns
information about the system storage

Definition at line 300 of file SystemInfo.cpp.

◆ getUserInfo()

SystemInfo::UserInfo SystemInfo::getUserInfo ( )
static

getUserInfo

Returns
information about the current user

Definition at line 676 of file SystemInfo.cpp.


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