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

List:       helix-server-cvs
Subject:    [Server-cvs] engine/core server_info.cpp,1.32,1.33
From:       xiaochengli () helixcommunity ! org
Date:       2012-08-29 9:10:19
[Download RAW message or body]

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

Modified Files:
	server_info.cpp 
Log Message:
Synopsis:
=========
CR: PR270648: [Server Monitor]: 'Servering since' loops in a range but not fixed or \
growing straight

Branches: SERVER_15_0, HEAD
Suggested Reviewers: Anyone

Description:
============
Precondition:
Helix Server are ready

100% Reproducible

Repro:
1. start Helix Server
2. open the admin page in a java enabled browser, and open the server monitor page 3. \
look at the two 'time' on the top of the monitor

Expected:
the second time 'Server since' should behave as the first on, that is, it should be \
fixed. Or even could be growing.

Actual:
the second hand loops in a range

Other Comments:
None

Version:
servproxyall-082112-18355

Platform:
All

The root cause is, although OncePerSecond() will be executed each second, registry \
will be updated once ten seconds, it cause other component can only get updated \
uptime value every 10 seconds.  My fix is to set uptime to registry every 1 seconds, \
keep others every 10 seconds. 

Files affected:
===============
server/engine/core/server_info.cpp

Testing Performed:
================
Unit Tests:
Java Monitor show correct value. 

Integration Tests:
None

Leak Tests: None
Performance Tests: N/A

Platforms Tested: win-x86_64-vc10.
Builds Verified: win-x86_64-vc10.

QA Hints
========
None.



Index: server_info.cpp
===================================================================
RCS file: /cvsroot/server/engine/core/server_info.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- server_info.cpp	26 Jun 2012 06:01:38 -0000	1.32
+++ server_info.cpp	29 Aug 2012 09:10:11 -0000	1.33
@@ -533,6 +533,11 @@
     SharedMemory::UpdateBytesInUse();
     m_pServerInfo->UpdateBandwidthUsage(pProc);
 
+    // at least uptime need to be updated once per second...
+    m_pServerInfo->m_ulUptime = (UINT32)(pProc->pc->engine->now.tv_sec - \
m_pServerInfo->m_tStartTime); +
+    pProc->pc->registry->SetInt(m_pServerInfo->m_RegID[UPTIME], \
m_pServerInfo->m_ulUptime, pProc); +	
     UINT32 ulInterval = 10;
 
     if (m_ulUpdateCounter >= ulInterval)
@@ -606,12 +611,6 @@
     g_pSysInfo->GetCPUUsage(lUserCPUUsage, lKernCPUUsage, lAggCPUUsage);
     m_pServerInfo->UpdateCPUUsage(lUserCPUUsage, lKernCPUUsage, lAggCPUUsage, \
pProc);  
-    m_pServerInfo->m_ulUptime = (UINT32)(pProc->pc->engine->now.tv_sec -
-	m_pServerInfo->m_tStartTime);
-
-    pProc->pc->registry->SetInt(m_pServerInfo->m_RegID[UPTIME],
-	m_pServerInfo->m_ulUptime, pProc);
-
 #ifdef HX_SERVERINFO_64BIT
     pProc->pc->registry->SetInt64(m_pServerInfo->m_RegID[
 	BYTES_IN_USE], SharedMemory::BytesInUse(), pProc);


_______________________________________________
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