<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>RETRY: CPU Question</TITLE>
<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=372033213-07042003><FONT face=Arial color=#0000ff size=2>The
system idles at 80% because I run other apps on the machine as well,
like RTG to get my router interface stats, scripts to check passives' etc, and
this runs continuously. I have used top, and the only processes that
really load the system are the cgis. I've also placed some checks in
the status.c file to time how long it takes to run different parts of
itself. What I found was:</FONT></SPAN></DIV>
<DIV><SPAN class=372033213-07042003>TIME TO
read_all_object_configuration_data=7.000000<BR>TIME TO
read_all_status_data=3.000000</SPAN></DIV>
<DIV><SPAN class=372033213-07042003>TIME TO finish all=6.000000<BR>TIME TO
run=16.000000<BR><!-- Produced by Nagios (http://www.nagios.org). Copyright (c) 1999-2002 Ethan Galstad. --></SPAN></DIV>
<DIV><SPAN class=372033213-07042003><FONT face=Arial color=#0000ff size=2>These
are in seconds. So to read the object configuration data takes 43% of the
time, to read status data 18% and to generate the web interface
39%.</FONT></SPAN></DIV>
<DIV><SPAN class=372033213-07042003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=372033213-07042003><FONT face=Arial color=#0000ff size=2>Lane,
what type of system do you run, the specs, to so that I can compare with what I
have. Please.</FONT></SPAN></DIV>
<DIV><SPAN class=372033213-07042003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=372033213-07042003><FONT face=Arial color=#0000ff
size=2>Thanx</FONT></SPAN></DIV>
<DIV><SPAN class=372033213-07042003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=372033213-07042003><FONT face=Arial color=#0000ff
size=2>:)</FONT></SPAN></DIV>
<DIV><SPAN class=372033213-07042003><FONT face=Arial color=#0000ff
size=2>fred</FONT></DIV>
<DIV><BR></DIV></SPAN>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Williams, P. Lane
[mailto:Lane.Williams@jhuapl.edu]<BR><B>Sent:</B> 07 April 2003 01:52
PM<BR><B>To:</B> Fred Albrecht<BR><B>Subject:</B> RE: [Nagios-users] RETRY:
CPU Question<BR><BR></FONT></DIV>
<DIV><SPAN class=446364511-07042003><FONT face=Arial color=#0000ff size=2>The
fact that your system idles at 80% normally, may have something to do with
it. All Linux distributions I've used have typically idles at 98.xxx% or
better, when not under a load. I've also done what you've done, where I
would cycle through the cgi's to test performance...I would see momentary
spike in cpu use.....but only around 30%-40%. At the moment I do not
have as many checks as you. If you haven't already, you may want to use
'top' and see if you have any run away processes or possible memory
leaks.</FONT></SPAN></DIV>
<DIV><SPAN class=446364511-07042003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=446364511-07042003><FONT face=Arial color=#0000ff
size=2>Lane</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Fred Albrecht
[mailto:Fred.Albrecht@za.tiscali.com]<BR><B>Sent:</B> Monday, April 07, 2003
7:33 AM<BR><B>To:</B> Williams, P. Lane<BR><B>Subject:</B> RE:
[Nagios-users] RETRY: CPU Question<BR><BR></FONT></DIV>
<DIV><SPAN class=904392911-07042003><FONT face=Arial color=#0000ff
size=2>No, I am saying that no swap is being used, there's no need.
The system is configured with a Gig's worth of swap, but everything manages
to run in memory without swapping to disk. Looking at the system now
there is 3Meg swap used, 980M free. 43MB normal memory free.
Thanx for your reply.</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Williams, P. Lane
[mailto:Lane.Williams@jhuapl.edu]<BR><B>Sent:</B> 07 April 2003 01:15
PM<BR><B>To:</B> Fred Albrecht<BR><B>Subject:</B> RE: [Nagios-users]
RETRY: CPU Question<BR><BR></FONT></DIV>
<DIV><SPAN class=962461311-07042003><FONT face=Arial color=#0000ff
size=2>Are you saying you have no "swap" file? </FONT></SPAN></DIV>
<DIV><SPAN class=962461311-07042003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=962461311-07042003><FONT face=Arial color=#0000ff
size=2>Lane</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Fred Albrecht
[mailto:Fred.Albrecht@za.tiscali.com]<BR><B>Sent:</B> Monday, April 07,
2003 4:04 AM<BR><B>To:</B>
nagios-users@lists.sourceforge.net<BR><B>Subject:</B> [Nagios-users]
RETRY: CPU Question<BR><BR></FONT></DIV><!-- Converted from text/rtf format -->
<P><FONT face=Arial size=2>Hi</FONT> </P>
<P><FONT face=Arial size=2>Not having received a reply on my previous
question, I'll try again. :) (Please tell me where I can ask this
question, if this is the wrong place to ask.)</FONT></P>
<P><FONT face=Arial size=2>My cgi's take about 30 seconds from clicking
on their links to displaying something on my screen. I'm running a
P4, 512M Red Hat 7.2 (uname shows Linux 2.4.20). System idles at
80% CPU free most of the time, until I hit a cgi which drops the idle
down to 0%, until the cgi finishes (as mentioned earlier, 25-30seconds
later) and the system goes back to 80% idle. No swap is being
used.</FONT></P>
<P><FONT face=Arial size=2>I've done the following optimizations:</FONT>
</P>
<P><FONT face=Arial size=2>Placed my critical files on ramdisk.
They are:</FONT> </P>
<P><FONT face=Arial size=2>-rwxr-xr-x 1
nagios nagios 755
Apr 4 15:43 contactgroups.cfg</FONT> <BR><FONT face=Arial
size=2>-rwxr-xr-x 1 nagios
nagios 2822 Apr 4 15:43
contacts.cfg</FONT> <BR><FONT face=Arial
size=2>-rwxr-xr-x 1 nagios
nagios 14999 Apr 7 09:43
hostextinfo.cfg</FONT> <BR><FONT face=Arial
size=2>-rwxr-xr-x 1 nagios
nagios 1565 Apr 4 15:43
hostgroups.cfg</FONT> <BR><FONT face=Arial
size=2>-rwxr-xr-x 1 nagios
nagios 26585 Apr 4 15:43
hosts.cfg</FONT> <BR><FONT face=Arial
size=2>-rwxr-xr-x 1 nagios
nagios 536 Apr 4 15:43
hosts-uses.cfg</FONT> <BR><FONT face=Arial
size=2>drwxr-xr-x 2 nagios
nagios 12288 Apr 3 16:23
lost+found</FONT> <BR><FONT face=Arial
size=2>-rwxr-xr-x 1 nagios
nagios 3092 Apr 4 15:43
misccommands.cfg</FONT> <BR><FONT face=Arial
size=2>-rwxr-xr-x 1 nagios
nagios 1987817 Apr 4 15:43
serviceextinfo.cfg</FONT> <BR><FONT face=Arial
size=2>-rwxr-xr-x 1 nagios
nagios 1696675 Apr 4 15:43 services.cfg</FONT>
<BR><FONT face=Arial size=2>-rwxr-xr-x 1
nagios nagios 3941
Apr 4 15:43 services-uses.cfg</FONT> <BR><FONT face=Arial
size=2>-rw-r--r-- 1 nagios
nagiocmd 759981 Apr 7 09:50 status.log</FONT>
<BR><FONT face=Arial size=2>-rw-rw-r-- 1
nagios nagios 209360 Apr 7
09:43 status.sav</FONT> <BR><FONT face=Arial
size=2>-rwxr-xr-x 1 nagios
nagios 1112 Apr 4 15:43
timeperiods.cfg</FONT> </P>
<P><FONT face=Arial size=2>retention_update_interval=15</FONT> </P>
<P><FONT face=Arial size=2>aggregate_status_updates=15</FONT> </P>
<P><FONT face=Arial size=2>My nagios stats are as follows:</FONT> </P>
<P><SPAN lang=en-za><FONT face="Times New Roman">Check Execution Time: 0
/ 7 / 0.052 sec </FONT></SPAN><BR><SPAN lang=en-za><FONT
face="Times New Roman">Check Latency: 0 / 14 / 0.605 sec</FONT></SPAN>
<BR><SPAN lang=en-za><FONT face="Times New Roman"># Active Checks: 3404
</FONT></SPAN><BR><SPAN lang=en-za><FONT face="Times New Roman">#
Passive Checks: 334</FONT></SPAN> <BR><SPAN lang=en-za><FONT face=Arial
size=2>I've done everything that I could implement in the "Tuning Nagios
For Maximum Performance" section.</FONT></SPAN> <BR><SPAN
lang=en-za><FONT face=Arial size=2>At one stage I even nfs mounted the
nagios directory to another machine from which I let my clients access
the cgi's. Sharing CPU this way worked fine, meaning that whenever
the web interface becomes too slow, I'll just add another server in my
nagios farm. The only drawback is that the clients can't write to
the nagios.cmd file accross the nfs mount. Would have been a nice
feature if it did work. Which raises the next question.
Nagios is a distributed NMS system, how about making it a distributed
client interface system, if you follow what I mean? How can I get
this done?</FONT></SPAN></P>
<P><SPAN lang=en-za><FONT face=Arial size=2>Is there anything else I can
do to get the response time of the cgi's better? Is this a
hardware or software issue?</FONT></SPAN> </P>
<P><SPAN lang=en-za><FONT face=Arial size=2>Any suggestions will be
highly appreciated.</FONT></SPAN> </P>
<P><SPAN lang=en-za><FONT face=Arial size=2>Thanx</FONT></SPAN> </P>
<P><SPAN lang=en-za><FONT face=Arial size=2>fred</FONT></SPAN><SPAN
lang=en-us></SPAN><SPAN lang=en-us></SPAN>
</P></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>