Hi Sebastian,<br>I am figuring out a bit of what you sent me in your reply. OJ7WRE is the name of your Seaside service. I am now searching for init script for Squeak image. Till now, this is the nearest things I have got<br>
<br><a href="http://wiki.squeak.org/swiki/124">http://wiki.squeak.org/swiki/124</a>&nbsp;&nbsp;&nbsp;&nbsp; for RedHat Distro<br><a href="http://wiki.squeak.org/swiki/123">http://wiki.squeak.org/swiki/123</a>&nbsp;&nbsp;&nbsp;&nbsp; for Solaris<br><br>Which one to go for ?, Is there any other thing much more specific to Debian / Ubuntu . <br>
<br>Thanks for your help,<br>Rajeev<br><br><div class="gmail_quote">On Feb 7, 2008 2:28 AM, Sebastian Sastre &lt;<a href="mailto:ssastre@seaswork.com">ssastre@seaswork.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">




<div>
<div dir="ltr" align="left"><font color="#0000ff" face="Trebuchet MS" size="2"><span>Hi Rajeev,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Trebuchet MS" size="2"><span></span></font>&nbsp;</div>
<div dir="ltr" align="left"><font color="#0000ff" face="Trebuchet MS" size="2"><span>&nbsp;&nbsp;&nbsp; Monit its simple and yet 
powerful.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Trebuchet MS" size="2"><span></span></font>&nbsp;</div>
<div dir="ltr" align="left"><font color="#0000ff" face="Trebuchet MS" size="2"><span>&nbsp;&nbsp;&nbsp; This is how the monitrc file looks 
like to monitor a squeak image:</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Trebuchet MS" size="2"><span></span></font>&nbsp;</div>
<div dir="ltr" align="left"><font color="#0000ff" face="Trebuchet MS" size="2"><span>###############################################################################<br>## 
Monitoring DEVELOPMENT Service 
OJ7WRE<br>###############################################################################</span></font></div>
<div>&nbsp;</div>
<div dir="ltr" align="left"><font color="#0000ff" face="Trebuchet MS" size="2"><span>&nbsp;check process OJ7WRE with pidfile 
/var/run/services/OJ7WRE.pid<br>&nbsp;group server<br>&nbsp;start program = 
&quot;/etc/init.d/OJ7WRE start&quot;<br>&nbsp;stop program = &quot;/etc/init.d/OJ7WRE 
stop&quot;</span></font></div>
<div>&nbsp;</div>
<div dir="ltr" align="left"><font color="#0000ff" face="Trebuchet MS" size="2"><span>&nbsp;if cpu &gt; 60% for 2 cycles then 
alert<br>&nbsp;if cpu &gt; 80% for 5 cycles then restart<br>&nbsp;if totalmem 
&gt; 200.0 MB for 2 cycles then restart</span></font></div>
<div>&nbsp;</div>
<div dir="ltr" align="left"><font color="#0000ff" face="Trebuchet MS" size="2"><span>&nbsp;if loadavg(5min) greater than 10 for 8 cycles 
then restart<br>&nbsp;if 5 restarts within 5 cycles then 
timeout</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Trebuchet MS" size="2"><span>###############################################################################</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Trebuchet MS" size="2"><span></span></font>&nbsp;</div>
<div dir="ltr" align="left"><font color="#0000ff" face="Trebuchet MS" size="2"><span>&nbsp;&nbsp;&nbsp;&nbsp;the start and stop script is 
doing more or less what you are doing manually. I send a kill -15 to close image 
gently. Also I needed to make the pid file when the image starts and remove 
before image quits. I have an object in the image dedicated to startup and 
shutdown production stuff inside the image.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Trebuchet MS" size="2"><span></span></font>&nbsp;</div>
<div dir="ltr" align="left"><font color="#0000ff" face="Trebuchet MS" size="2"><span>&nbsp;&nbsp;&nbsp; For a &quot;more monitored&quot; services you 
can make monit to send you an email to your cell phone if it reach some point 
(like a service restart or fail to start or CPU 100% for more than 5 min&nbsp;or 
apache is down or whatever).</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Trebuchet MS" size="2"><span></span></font>&nbsp;</div>
<div dir="ltr" align="left"><font color="#0000ff" face="Trebuchet MS" size="2"><span>&nbsp;&nbsp;&nbsp; cheers,</span></font></div>
<div><font color="#0000ff" face="Trebuchet MS" size="2"></font>&nbsp;</div>
<div align="left"><span>
<p style="margin: 0cm 0cm 0pt;" align="left"><span style="font-size: 10pt;">Sebastian 
Sastre</span></p>
<p style="margin: 0cm 0cm 0pt;">
</p><p style="margin: 0cm 0cm 0pt; text-align: justify;"><span style="font-size: 7.5pt; font-family: Verdana;" lang="ES-AR"></span><span lang="ES-AR"><font face="Verdana"></font></span></p></span></div><br>
<blockquote style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;">
  <div dir="ltr" align="left" lang="es">
  <hr>
  <font face="Tahoma" size="2"><b>De:</b> <a href="mailto:seaside-bounces@lists.squeakfoundation.org" target="_blank">seaside-bounces@lists.squeakfoundation.org</a> 
  [mailto:<a href="mailto:seaside-bounces@lists.squeakfoundation.org" target="_blank">seaside-bounces@lists.squeakfoundation.org</a>] <b>En nombre de </b>Rajeev 
  Lochan<br><b>Enviado el:</b> Miércoles, 06 de Febrero de 2008 
  17:36<br><b>Para:</b> Seaside - general discussion<br><b>Asunto:</b> [Seaside] 
  Monit on Ubuntu / Debian to monitor Seaside images<br></font><br></div><div><div></div><div class="Wj3C7c">
  <div></div>Hi,<br>I have been working towards setting up a dedicated server 
  (Ubuntu) to host my Seaside app as per Ramon&#39;s Blog <a href="http://onsmalltalk.com/programming/smalltalk/scaling-seaside-redux-enter-the-penguin/" target="_blank">http://onsmalltalk.com/programming/smalltalk/scaling-seaside-redux-enter-the-penguin/</a><br>
<br>Till 
  now, I have been successful in having Apache serve static content and Load 
  balance between 3 images of my Seaside App. Sticky sessions are working and 
  everything is going well so far. But I had a problem when installing 
  Daemontools (which Ramon has written in his blog and also Lukas has written in 
  Mailing lists), the recent versions of Ubuntu, dont support Daemontools out of 
  the box. <br><br>In one of the comments to Ramon&#39;s post, I could learn that 
  some of the seasiders have used Monit to do much more than want Daemontools 
  does. Could you please guide me how to go about.<br><br>I came across a blog 
  on Rails using Monit&nbsp; <a href="http://www.igvita.com/2006/11/07/monit-makes-mongrel-play-nice/" target="_blank">http://www.igvita.com/2006/11/07/monit-makes-mongrel-play-nice/</a><br>In 
  that, what is the equivalent code to Seaside of the following code ?<br><br><pre><font size="4">start program = <span style="color: rgb(153, 102, 0);">&quot;/usr/local/bin/ruby /usr/local/bin/mongrel_rails start -d -e production -p 8010 -a <a href="http://127.0.0.1" target="_blank">127.0.0.1</a> -P /home/user/current/log/mongrel.8010.pid -c /home/user/rails/current&quot;</span><br>

    stop program  = <span style="color: rgb(153, 102, 0);">&quot;/usr/local/bin/ruby /usr/local/bin/mongrel_rails stop -P /home/user/current/log/mongrel.8010.pid&quot;</span></font></pre>Till 
  now, I have been starting the images manually by <br>/seaside$ squeakvm&nbsp; 
  -nodisplay seasidedemo &quot;&quot; port 9090 &amp;<br><br>and to kill it, i use $ pkill 
  squeakvm&nbsp;&nbsp;&nbsp; or $ kill [PID of SqueakVM]<br><br>I suppose, we 
  will also have to change the following code<br><pre><font size="4"><span style="font-weight: bold; color: rgb(153, 102, 204);">if</span> totalmem is greater than <span style="color: rgb(0, 102, 102);">60.0</span> MB <span style="font-weight: bold; color: rgb(153, 102, 204);">for</span> <span style="color: rgb(0, 102, 102);">5</span> cycles <span style="font-weight: bold; color: rgb(153, 102, 204);">then</span> restart<br>

<br></font></pre>When an image is running on my server (Pentium Dual Core 2.8 
  GHz with 1 GB RAM), it shows almost 3-4% CPU and 3-4% RAM , should we shift 
  the memory cap from 60 MB to 100 MB / image ?<br><br><br>Is there any other 
  options we have ? <br><br>Thanks for the help,<br>&nbsp;<br>Rajeev 
  <br><br>Co-founder, AR-CAD.com<br><br><a href="http://www.ar-cad.com" target="_blank">http://www.ar-cad.com</a><br>+91 9243468076 
  (Bangalore)<br>080 65355873 </div></div></blockquote></div>
<br>_______________________________________________<br>seaside mailing list<br><a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br><a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Rajeev Lochan<br><br>Co-founder, AR-CAD.com<br><br><a href="http://www.ar-cad.com">http://www.ar-cad.com</a><br>+91 9243468076 (Bangalore)<br>080 65355873