[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-server-cvs
Subject:    [Server-cvs] engine/core/pub sysinfo.h,1.5.42.1,1.5.42.1.18.1
From:       dcollins () helixcommunity ! org
Date:       2008-07-25 16:48:39
Message-ID: 200807251651.m6PGp8iv025934 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/server/engine/core/pub
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv17406/pub

Modified Files:
      Tag: SERVER_11_1
	sysinfo.h 
Log Message:
/home/dcollins/tmp/2008_07_25-cpuload.txt

Index: sysinfo.h
===================================================================
RCS file: /cvsroot/server/engine/core/pub/sysinfo.h,v
retrieving revision 1.5.42.1
retrieving revision 1.5.42.1.18.1
diff -u -d -r1.5.42.1 -r1.5.42.1.18.1
--- sysinfo.h	20 Apr 2005 14:04:38 -0000	1.5.42.1
+++ sysinfo.h	25 Jul 2008 16:48:37 -0000	1.5.42.1.18.1
@@ -52,11 +52,13 @@
 // Work with all versions of pdh.dll
 #ifdef PdhOpenQuery
 #undef PdhOpenQuery
-extern "C" long __stdcall 
+extern "C" long __stdcall
 PdhOpenQuery (LPCSTR  szD, DWORD  dw, HQUERY  *phQ);
 #endif /* PdhOpenQuery */
 #endif /* _WINDOWS */
 
+typedef UINT64 UsageCounter;
+
 class CSysInfo
 {
 public:
@@ -64,21 +66,21 @@
     virtual ~CSysInfo();
 
     virtual UINT32 GetNumberofCPU       (void);
-    virtual HX_RESULT GetCPUUsage       (REF(INT32) ulUserUsage, REF(INT32) \
ulKernUsage, REF(INT32) ulAggUsage); +    virtual HX_RESULT GetCPUUsage       \
(REF(INT32) lUserUsagePct, REF(INT32) lKernUsagePct, REF(INT32) lAggUsagePct);  \
virtual HX_RESULT GetMemUsage       (REF(UINT32) ulMemUsage);  virtual HX_RESULT \
InitCPUCalc       (void);  
 protected:
     virtual HX_RESULT InitProcUsage     (void);
-    virtual HX_RESULT GetTotalProcUsage (UINT32* plUserUsage, UINT32* plKernUsage);
-    virtual HX_RESULT GetProcUsageById  (UINT32 id, UINT32* plUserUsage, UINT32* \
                plKernUsage);
-    virtual HX_RESULT GetTotalCPUUsage  (UINT32* plUsage);
+    virtual HX_RESULT GetTotalProcUsage (UsageCounter* pUserUsage, UsageCounter* \
pKernUsage); +    virtual HX_RESULT GetProcUsageById  (UINT32 id, UsageCounter* \
pUserUsage, UsageCounter* pKernUsage); +    virtual HX_RESULT GetTotalCPUUsage  \
(UsageCounter* pUsage);  char* SkipToken (const char* p);
 
     struct timeval      m_StartTime;
-    UINT32              m_ulLastUserCPUUsage;
-    UINT32              m_ulLastKernCPUUsage;
-    UINT32              m_ulLastAggCPUUsage;
+    UsageCounter        m_uLastUserCPUUsage;
+    UsageCounter        m_uLastKernCPUUsage;
+    UsageCounter        m_uLastAggCPUUsage;
 };
 
 
@@ -89,7 +91,7 @@
     CWindowsSysInfo();
     ~CWindowsSysInfo();
 
-    HX_RESULT GetCPUUsage       (REF(INT32) ulUserUsage, REF(INT32) ulKernUsage, \
REF(INT32) ulAggUsage); +    HX_RESULT GetCPUUsage       (REF(INT32) lUserUsagePct, \
REF(INT32) lKernUsagePct, REF(INT32) lAggUsagePct);  UINT32 GetNumberofCPU       \
(void);  HX_RESULT InitCPUCalc       (void);
     HX_RESULT GetMemUsage       (REF(UINT32) ulMemUsage);
@@ -117,9 +119,9 @@
     HX_RESULT InitCPUCalc       (void);
 
 private:
-    HX_RESULT GetTotalProcUsage (UINT32* plUserUsage, UINT32* plKernUsage);
-    HX_RESULT GetProcUsageById  (UINT32 id, UINT32* plUserUsage, UINT32* \
                plKernUsage);
-    HX_RESULT GetTotalCPUUsage  (UINT32* plUsage);
+    HX_RESULT GetTotalProcUsage (UsageCounter* pUserUsage, UsageCounter* \
pKernUsage); +    HX_RESULT GetProcUsageById  (UINT32 id, UsageCounter* pUserUsage, \
UsageCounter* pKernUsage); +    HX_RESULT GetTotalCPUUsage  (UsageCounter* pUsage);
 
     kstat_ctl_t*        m_pkc;
 };
@@ -135,9 +137,9 @@
     UINT32 GetNumberofCPU       (void);
 
 private:
-    HX_RESULT GetTotalProcUsage (UINT32* plUserUsage, UINT32* plKernUsage);
-    HX_RESULT GetProcUsageById  (UINT32 id, UINT32* plUserUsage, UINT32* \
                plKernUsage);
-    HX_RESULT GetTotalCPUUsage  (UINT32* plUsage);
+    HX_RESULT GetTotalProcUsage (UsageCounter* pUserUsage, UsageCounter* \
pKernUsage); +    HX_RESULT GetProcUsageById  (UINT32 id, UsageCounter* pUserUsage, \
UsageCounter* pKernUsage); +    HX_RESULT GetTotalCPUUsage  (UsageCounter* pUsage);
 };
 
 
@@ -149,9 +151,9 @@
     ~CBsdSysInfo();
 
 private:
-    HX_RESULT GetTotalProcUsage (UINT32* plUserUsage, ULONG32* plKernUsage);
-    HX_RESULT GetProcUsageById  (UINT32 id, UINT32* plUserUsage, ULONG32* \
                plKernUsage);
-    HX_RESULT GetTotalCPUUsage  (UINT32* pUsage);
+    HX_RESULT GetTotalProcUsage (UsageCounter* pUserUsage, ULONG64* pKernUsage);
+    HX_RESULT GetProcUsageById  (UINT32 id, UsageCounter* pUserUsage, UsageCounter* \
pKernUsage); +    HX_RESULT GetTotalCPUUsage  (UsageCounter* pUsage);
 };
 
 
@@ -163,11 +165,11 @@
     ~CHPSysInfo();
  
     UINT32 GetNumberofCPU       (void);
-    HX_RESULT GetCPUUsage       (REF(INT32) ulServerUsage, REF(INT32) ulAggUsage);
+    HX_RESULT GetCPUUsage       (REF(INT32) lServerUsagePct, REF(INT32) \
lAggUsagePct);  
 private:
-    HX_RESULT GetProcUsageById  (UINT32 id, UINT32* plUserUsage, ULONG32* \
                plKernUsage);
-    HX_RESULT GetTotalCPUUsage  (UINT32* plUsage);
+    HX_RESULT GetProcUsageById  (UINT32 id, UsageCounter* pUserUsage, UsageCounter* \
pKernUsage); +    HX_RESULT GetTotalCPUUsage  (UsageCounter* pUsage);
     HX_RESULT GetProcUsage      (UINT32 id, float* pfUsage);
 };
 
@@ -183,8 +185,8 @@
 
 
 private:
-    HX_RESULT GetProcUsageById  (UINT32 id, UINT32* plUserUsage, ULONG32* \
                plKernUsage)
-    HX_RESULT GetTotalCPUUsage  (UINT32* plUsage)
+    HX_RESULT GetProcUsageById  (UINT32 id, UsageCounter* pUserUsage, UsageCounter* \
pKernUsage); +    HX_RESULT GetTotalCPUUsage  (UsageCounter* pUsage)
     HX_RESULT GetKernelValue    (unsigned long ulOffset, caddr_t pAddr, int nSize);
 
     unsigned long       m_ulSysinfoOffset;
@@ -202,8 +204,8 @@
     GetNumberofCPU(void)
 
 private:
-    HX_RESULT GetProcUsageById  (UINT32 id, UINT32* plUserUsage, ULONG32* \
                plKernUsage);
-    HX_RESULT GetTotalCPUUsage  (UINT32* pulUsage);
+    HX_RESULT GetProcUsageById  (UINT32 id, UsageCounter* pUserUsage, UsageCounter* \
pKernUsage); +    HX_RESULT GetTotalCPUUsage  (UsageCounter* puUsage);
 
 };
 #endif


_______________________________________________
Server-cvs mailing list
Server-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/server-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic