<div>Hiya, thanks for the reply, it would normally take a lot of cpu, but it runs totally fine when its not under cron. What I also tried doing was removing the log files it parses (so it basically had no work to do), and it still crashed the machine under cron, but fine when ran from the console (from any folder, 
i.e it has full paths etc in it).</div>
<div> </div>
<div>I tried running top with constant refresh to try and watch it appear, but for example suppose I'm waiting for 16:00 as soon as it gets to 16:00 (displays 15:59:59 only) whole server is instantly dead when it would display 16:00:00 otherwise, there's no "build up".
</div>
<div> </div>
<div>It's possible I may be able to find another similar script, but I'm firstly worried that the whole server crashes under a perl script when its introduced to cron as there may be other issues with other scripts tried later, its not having enough time for load to be an issue or anything, and when the logs removed there would be no load either.
</div>
<div> </div>
<div>Ian<br><br> </div>
<div><span class="gmail_quote">On 10/3/05, <b class="gmail_sendername">Abd El-Hameed Ayad</b> <<a href="mailto:hamid@use-trade.com">hamid@use-trade.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div><font face="Arial" size="2">Hi,</font></div>
<div><font face="Arial" size="2">    Try to monitor your server performance via top while cron is running with <font face="Times New Roman" size="3">run_stats.sh script</font>.</font></div>
<div><font face="Arial" size="2">It will give you an idea about what is being done? Does this process takes a lot of CPU or spawns other processes that consumes a lot of CPU of memory</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">I got such behavior with Apache+PHP (running as CGI)+MySQL on CentOS 3.5 and i found that MySQL was taking about 90% CPU before the server dies with nothing could be done except cold booting.
</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">If you have a similar problem, Let us determine which process exactly is doing this biss-behaviour and try to find alternatives.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Hameed</font></div>
<blockquote style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<div><span class="e" id="q_106b61a97110b4e8_1">
<div style="FONT: 10pt arial">----- Original Message ----- </div>
<div style="BACKGROUND: #e4e4e4; FONT: 10pt arial"><b>From:</b> <a title="mu.llamas@gmail.com" onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:mu.llamas@gmail.com" target="_blank">Ian mu</a> </div>
<div style="FONT: 10pt arial"><b>To:</b> <a title="centos@centos.org" onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:centos@centos.org" target="_blank">centos@centos.org</a> </div>
<div style="FONT: 10pt arial"><b>Sent:</b> Monday, October 03, 2005 11:30 AM</div>
<div style="FONT: 10pt arial"><b>Subject:</b> [CentOS] Cron script crashing server...</div>
<div><br> </div>
<div>Hiya, have a bit of an odd problem so looking for thoughts before proceeding any more.</div>
<div> </div>
<div>Problem is on centos3 (also runs fine on another but fails on another, so not sure this is an issue or not), dual xeon setup.</div>
<div> </div>
<div>Basically I have a perl script that runs once, first thing every morning, gathering some stats (currently turned off due to problem). Crontab -l shows the following...</div>
<div> </div>
<div>00 6  * * * nice /home/statsman/stats/run_stats.sh  >/dev/null 2>&1 (.sh file basically sources with full path a config with some vars, then runs the perl script).</div>
<div> </div>
<div>There are a couple of other scripts in the crontab which run absolutely fine, so cron itself seems to be working, its just the combination.</div>
<div> </div>
<div>If I run this (at that time or anytime) via cron, the whole server totally dies no warning, nothing in logs instantly. If I watch in top waiting for the cron you don't even see it appear, machine just totally hangs, can't ping or anything, needs a cold boot. Nothing in logs or anything apart from bootup info after. 
</div>
<div> </div>
<div>If I run the perl script outside of cron from any folder at all, it works fine, never crashes which is where I'm confused, its only as soon as its run from cron. To test I've put it on a test machine, and to confuse it further runs absolutely fine under cron (old redhat install though) no matter what I do, it also seems to run fine on other machines (except one with identical problem) and runs fine from cron on other linux dists/machines, but can't do as much testing on them. 
</div>
<div> </div>
<div>I'm really not sure where the problem lies, so may be offtopic, I'm just confused why it runs on some and not others (although maybe running the same version, its possible they were configured slightly different on install), and pretty much clutching at straws. Worse thing is machines a production one, and want to keep downtime to a minimum, so trying to get some angle on what may be wrong before testing more. 
</div>
<div> </div>
<div>Any thoughts much appreciated.</div>
<div> </div>
<div>Ian</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div></span></div>
<p>
<hr>

<p></p>_______________________________________________<br>CentOS mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:CentOS@centos.org" target="_blank">CentOS@centos.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.centos.org/mailman/listinfo/centos" target="_blank">
http://lists.centos.org/mailman/listinfo/centos</a><br>
<p></p></p></blockquote><br>_______________________________________________<br>CentOS mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:CentOS@centos.org">CentOS@centos.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.centos.org/mailman/listinfo/centos" target="_blank">
http://lists.centos.org/mailman/listinfo/centos</a><br><br><br></blockquote></div><br>