[SAC] Re: [OSGeo] #489: Display server load info in Trac
OSGeo
trac_osgeo at osgeo.org
Tue Oct 6 19:23:13 EDT 2009
#489: Display server load info in Trac
--------------------------+-------------------------------------------------
Reporter: mloskot | Owner: sac at lists.osgeo.org
Type: enhancement | Status: new
Priority: normal | Component: SAC
Resolution: | Keywords: trac
--------------------------+-------------------------------------------------
Comment (by mloskot):
I've got in touch with administrators of Boost Trac and they were very
kind to provide me with details. Here we go:
* They confirmed server load issues:
''Yes, we were experiencing the load issues in the Boost Trac even though
we are hosting one Trac instance in our server for now. I think the load
issues are from the web spider crawling the huge boost SVN repository
tree. We disallowed the crawling and we will start to open up little by
little watching the load average.''
* How to set up the server load display
This is based on their customized template(theme.html) in the Trac. They
put the following code in ''boost_trac_path/templates/theme.html'' of trac
instance after copying it from the Trac installation tree to
''boost_trac_path/templates'':
{{{
<div id="main">
<div id="ctxtnav" class="nav">
<h2>Context Navigation</h2>
<ul>
<li py:for="i, elm in enumerate(chrome.ctxtnav)"
class="${classes(first_last(i,
chrome.ctxtnav))}">$elm</li>
<!-- Added for displaying load average -->
<?python
f = open(r'/path/to/file/loadaverage.txt')
loadavg = f.read()
f.close()
?>
<py:if test="loadavg" >
<li class="last">Server Load Average:
<b>${loadavg}</b>
</li>
</py:if>
<!-- Added for displaying load average -->
</ul>
<hr />
</div>
}}}
Next, they configure set up a cronjob to generate the loadaverage on
''/path/to/file/loadaverage.txt'' at every 10 mins.
{{{
[19:03]: templates % cat /path/to/file/loadaverage.txt
1.03
[19:03]: templates %
}}}
That's it and thanks to Boost admins!
--
Ticket URL: <http://trac.osgeo.org/osgeo/ticket/489#comment:2>
OSGeo <http://www.osgeo.org/>
OSGeo committee and general foundation issue tracker.
More information about the Sac
mailing list