Back to index

nordugrid-arc-nox  1.1.0~rc6
sysinfo.h
Go to the documentation of this file.
00001 #ifndef __PAUL_SYSINFO_H__
00002 #define __PAUL_SYSINFO_H__
00003 
00004 #include <string>
00005 
00006 namespace Paul
00007 {
00008 
00009 class SysInfo
00010 {
00011     private:
00012         // static infos geathered by initialization
00013         std::string osFamily;
00014         std::string osName;
00015         std::string osVersion;
00016         std::string platform;
00017         unsigned int physicalCPUs;
00018         unsigned int logicalCPUs;
00019         unsigned int mainMemorySize;
00020         unsigned int virtualMemorySize;
00021     public:
00022         SysInfo(void);
00023         void refresh(void);
00024         const std::string &getOSName(void) { return osName; };
00025         const std::string &getOSFamily(void) { return osFamily; };
00026         const std::string &getOSVersion(void) { return osVersion; };
00027         const std::string &getPlatform(void) { return platform; };
00028         unsigned int getPhysicalCPUs(void) { return physicalCPUs; };
00029         unsigned int getLogicalCPUs(void) { return logicalCPUs; };
00030         unsigned int getMainMemorySize(void) { return mainMemorySize; };
00031         unsigned int getVirtualMemorySize(void) { return virtualMemorySize; };
00032         static unsigned int diskAvailable(const std::string &path);
00033         static unsigned int diskFree(const std::string &path);
00034         static unsigned int diskTotal(const std::string &path);
00035 
00036 };
00037 
00038 }
00039 
00040 #endif // __PAUL_SYSINFO_H__