0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Static Public Member Functions | Static Public Attributes | Static Private Member Functions | Static Private Attributes | List of all members
Hypertable::System Class Reference

#include <System.h>

Collaboration diagram for Hypertable::System:
Collaboration graph
[legend]

Static Public Member Functions

static void initialize (const String &install_directory=String())
 Initializes the static class members; checks header version vs. More...
 
static String locate_install_dir (const char *argv0)
 Returns the installation directory. More...
 
static String _locate_install_dir (const char *argv0)
 Returns the installation directory; same as locate_install_dir but does not lock ms_mutex. More...
 
static void initialize_tm (struct tm *tmval)
 Initialize struct tm. More...
 
static int32_t get_processor_count ()
 The processor count. More...
 
static int32_t get_pid ()
 The pid of the current process. More...
 
static int32_t get_drive_count ()
 Returns the number of drives. More...
 
static const CpuInfocpu_info ()
 Retrieves updated CPU information (see SystemInfo.h) More...
 
static const CpuStatcpu_stat ()
 Retrieves updated CPU statistics (see SystemInfo.h) More...
 
static const MemStatmem_stat ()
 Retrieves updated Memory statistics (see SystemInfo.h) More...
 
static const DiskStatdisk_stat ()
 Retrieves updated Disk statistics (see SystemInfo.h) More...
 
static const OsInfoos_info ()
 Retrieves updated Operating system information (see SystemInfo.h) More...
 
static const SwapStatswap_stat ()
 Retrieves updated Swap statistics (see SystemInfo.h) More...
 
static const NetInfonet_info ()
 Retrieves updated Network information (see SystemInfo.h) More...
 
static const NetStatnet_stat ()
 Retrieves updated Network statistics (see SystemInfo.h) More...
 
static const ProcInfoproc_info ()
 Retrieves updated Process information (see SystemInfo.h) More...
 
static const ProcStatproc_stat ()
 Retrieves updated Process statistics (see SystemInfo.h) More...
 
static const FsStatfs_stat ()
 Retrieves updated Filesystem statistics (see SystemInfo.h) More...
 
static const TermInfoterm_info ()
 Retrieves updated Terminal information (see SystemInfo.h) More...
 
static const LoadAvgStatloadavg_stat ()
 Retrieves updated Load average statistics (see SystemInfo.h) More...
 

Static Public Attributes

static String install_dir
 The installation directory. More...
 
static std::unique_ptr
< ClusterDefinition::ClusterDefinition
cluster_def
 Cluster definition. More...
 
static String exe_name
 The exe file name. More...
 
static long tm_gmtoff
 Seconds east of UTC. More...
 
static String tm_zone
 Timezone abbreviation. More...
 

Static Private Member Functions

static void _init (const String &install_directory)
 Internal initialization helper. More...
 

Static Private Attributes

static bool ms_initialized = false
 true if initialize was already called More...
 
static std::mutex ms_mutex
 a Mutex to protect the static members More...
 

Detailed Description

Definition at line 60 of file System.h.

Member Function Documentation

void System::_init ( const String install_directory)
staticprivate

Internal initialization helper.

Definition at line 73 of file System.cc.

String System::_locate_install_dir ( const char *  argv0)
static

Returns the installation directory; same as locate_install_dir but does not lock ms_mutex.

Parameters
argv0argv[0] of the main method
Returns
The (presumed) installation directory

Definition at line 55 of file System.cc.

const CpuInfo & Hypertable::System::cpu_info ( )
static

Retrieves updated CPU information (see SystemInfo.h)

Definition at line 322 of file SystemInfo.cc.

const CpuStat & Hypertable::System::cpu_stat ( )
static

Retrieves updated CPU statistics (see SystemInfo.h)

Definition at line 331 of file SystemInfo.cc.

const DiskStat & Hypertable::System::disk_stat ( )
static

Retrieves updated Disk statistics (see SystemInfo.h)

Definition at line 343 of file SystemInfo.cc.

const FsStat & Hypertable::System::fs_stat ( )
static

Retrieves updated Filesystem statistics (see SystemInfo.h)

Definition at line 386 of file SystemInfo.cc.

int32_t System::get_drive_count ( )
static

Returns the number of drives.

Definition at line 111 of file System.cc.

int32_t System::get_pid ( )
static

The pid of the current process.

Definition at line 132 of file System.cc.

int32_t System::get_processor_count ( )
static

The processor count.

Definition at line 103 of file System.cc.

static void Hypertable::System::initialize ( const String install_directory = String())
inlinestatic

Initializes the static class members; checks header version vs.

library version, initializes Logging and other stuff.

Must be inlined to do proper version check

Parameters
install_directoryPath of the installation directory. If empty then will try to find the installation directory by using argv[0] in combination with some heuristics

Definition at line 72 of file System.h.

void System::initialize_tm ( struct tm *  tmval)
static

Initialize struct tm.

Definition at line 94 of file System.cc.

const LoadAvgStat & Hypertable::System::loadavg_stat ( )
static

Retrieves updated Load average statistics (see SystemInfo.h)

Definition at line 335 of file SystemInfo.cc.

String System::locate_install_dir ( const char *  argv0)
static

Returns the installation directory.

Parameters
argv0argv[0] of the main method
Returns
The (presumed) installation directory

Definition at line 50 of file System.cc.

const MemStat & Hypertable::System::mem_stat ( )
static

Retrieves updated Memory statistics (see SystemInfo.h)

Definition at line 339 of file SystemInfo.cc.

const NetInfo & Hypertable::System::net_info ( )
static

Retrieves updated Network information (see SystemInfo.h)

Definition at line 360 of file SystemInfo.cc.

const NetStat & Hypertable::System::net_stat ( )
static

Retrieves updated Network statistics (see SystemInfo.h)

Definition at line 369 of file SystemInfo.cc.

const OsInfo & Hypertable::System::os_info ( )
static

Retrieves updated Operating system information (see SystemInfo.h)

Definition at line 347 of file SystemInfo.cc.

const ProcInfo & Hypertable::System::proc_info ( )
static

Retrieves updated Process information (see SystemInfo.h)

Definition at line 373 of file SystemInfo.cc.

const ProcStat & Hypertable::System::proc_stat ( )
static

Retrieves updated Process statistics (see SystemInfo.h)

Definition at line 382 of file SystemInfo.cc.

const SwapStat & Hypertable::System::swap_stat ( )
static

Retrieves updated Swap statistics (see SystemInfo.h)

Definition at line 356 of file SystemInfo.cc.

const TermInfo & Hypertable::System::term_info ( )
static

Retrieves updated Terminal information (see SystemInfo.h)

Definition at line 390 of file SystemInfo.cc.

Member Data Documentation

std::unique_ptr< ClusterDefinition::ClusterDefinition > System::cluster_def
static

Cluster definition.

Definition at line 117 of file System.h.

string System::exe_name
static

The exe file name.

Definition at line 120 of file System.h.

string System::install_dir
static

The installation directory.

Definition at line 114 of file System.h.

bool System::ms_initialized = false
staticprivate

true if initialize was already called

Definition at line 184 of file System.h.

mutex System::ms_mutex
staticprivate

a Mutex to protect the static members

Definition at line 187 of file System.h.

long System::tm_gmtoff
static

Seconds east of UTC.

Definition at line 123 of file System.h.

string System::tm_zone
static

Timezone abbreviation.

Definition at line 126 of file System.h.


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