<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="cid:filelist.xml@01C3CF05.59A2BF50">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="country-region"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:HyphenationZone>21</w:HyphenationZone>
  <w:EnvelopeVis/>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
h2
        {mso-style-update:auto;
        mso-style-next:Normal;
        margin-top:18.0pt;
        margin-right:0cm;
        margin-bottom:12.0pt;
        margin-left:39.6pt;
        text-align:justify;
        text-indent:-21.6pt;
        mso-pagination:widow-orphan;
        page-break-after:avoid;
        mso-outline-level:2;
        mso-list:l0 level2 lfo1;
        tab-stops:list 39.6pt;
        font-size:12.0pt;
        font-family:Arial;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;
        text-underline:single;}
span.StyleCourrierlectronique17
        {mso-style-type:personal-compose;
        mso-style-noshow:yes;
        mso-ansi-font-size:10.0pt;
        mso-bidi-font-size:10.0pt;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:windowtext;}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
span.GramE
        {mso-style-name:"";
        mso-gram-e:yes;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;
        mso-header-margin:35.4pt;
        mso-footer-margin:35.4pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:201597058;
        mso-list-template-ids:-1760889436;}
@list l0:level1
        {mso-level-tab-stop:18.0pt;
        mso-level-number-position:left;
        margin-left:18.0pt;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-style-link:"Titre 2";
        mso-level-text:"%1\.%2\.";
        mso-level-tab-stop:39.6pt;
        mso-level-number-position:left;
        margin-left:39.6pt;
        text-indent:-21.6pt;}
@list l0:level3
        {mso-level-text:"%1\.%2\.%3\.";
        mso-level-tab-stop:61.2pt;
        mso-level-number-position:left;
        margin-left:61.2pt;
        text-indent:-25.2pt;}
@list l0:level4
        {mso-level-text:"%1\.%2\.%3\.%4\.";
        mso-level-tab-stop:86.4pt;
        mso-level-number-position:left;
        margin-left:86.4pt;
        text-indent:-32.4pt;}
@list l0:level5
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.";
        mso-level-tab-stop:111.6pt;
        mso-level-number-position:left;
        margin-left:111.6pt;
        text-indent:-39.6pt;}
@list l0:level6
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.";
        mso-level-tab-stop:136.8pt;
        mso-level-number-position:left;
        margin-left:136.8pt;
        text-indent:-46.8pt;}
@list l0:level7
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.";
        mso-level-tab-stop:162.0pt;
        mso-level-number-position:left;
        margin-left:162.0pt;
        text-indent:-54.0pt;}
@list l0:level8
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.";
        mso-level-tab-stop:187.2pt;
        mso-level-number-position:left;
        margin-left:187.2pt;
        text-indent:-61.2pt;}
@list l0:level9
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.%9\.";
        mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        margin-left:216.0pt;
        text-indent:-72.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */ 
 table.MsoNormalTable
        {mso-style-name:"Tableau Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]-->
</head>

<body lang=FR link=blue vlink=purple style='tab-interval:35.4pt'>

<div class=Section1>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";mso-ansi-language:EN-US'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";mso-ansi-language:EN-US'>Hello,<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";mso-ansi-language:EN-US'>I am actually working on a multi-log
multi-host monitoring (and reacting) system, made in erlang and I need some
advice:<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";mso-ansi-language:EN-US'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";mso-ansi-language:EN-US'>I would like to read logs file as soon
as data is written to them. I actually have found 2 ways for this purpose:<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";mso-ansi-language:EN-US'>- With Io module, pooling (each time I
get an <span class=GramE>eof,</span> I wait a small time then try again).<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";mso-ansi-language:EN-US'>- With ports, spawning "tail -f -n
1 /path/to/file", which is the method I currently use.<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";mso-ansi-language:EN-US'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";mso-ansi-language:EN-US'>Is there <span class=GramE>a</span>
other way to "receive" news lines as they are written in the file
without pooling or using an external application? I read few messages saying
that there was no blocking IO in <span class=SpellE>erlang</span>, but I think
this was mainly from a VM perspective. (I will have few hundreds logs to
monitor)<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";mso-ansi-language:EN-US'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";mso-ansi-language:EN-US'>I currently use the port solution and I
sometimes have a "broken pipe" error, I think this is because of the
"in" parameter in <span class=SpellE>open_port</span>, but I hat it
sometime without this parameter, anybody have a more detailed explanation of
what could happen ?<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";mso-ansi-language:EN-US'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
class=GramE><font size=2 face="Courier New"><span lang=EN-US style='font-size:
10.0pt;font-family:"Courier New";mso-ansi-language:EN-US'>Regards.</span></font></span><font
size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";mso-ansi-language:EN-US'><o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";mso-ansi-language:EN-US'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
class=SpellE><span class=GramE><font size=2 face="Courier New"><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US'>Raphaël</span></font></span></span><span class=GramE><font size=2
face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
mso-ansi-language:EN-US'>.</span></font></span><font size=2 face="Courier New"><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-US'><o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";mso-ansi-language:EN-US'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";mso-ansi-language:EN-US'>Ps: the subject is directly taken from a
point in the <span class=SpellE>erlang</span> PLEAC which is still empty.<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";mso-ansi-language:EN-US'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-US'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-US'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none'><font size=2
face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
mso-ansi-language:EN-US;mso-no-proof:yes'>Raphaël Bellec<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none'><font size=2
face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
mso-ansi-language:EN-US;mso-no-proof:yes'>Manobi </span></font><st1:country-region><st1:place><font
  size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt;
  font-family:"Courier New";mso-ansi-language:EN-US;mso-no-proof:yes'>France</span></font></st1:place></st1:country-region><font
size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";mso-ansi-language:EN-US;mso-no-proof:yes'><o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none'><font size=2
face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
mso-ansi-language:EN-US;mso-no-proof:yes'>Cap Alpha<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none'><font size=2
face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
mso-ansi-language:EN-US;mso-no-proof:yes'>Avenue de l'Europe, Clapiers<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none'><font size=2
face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
mso-ansi-language:EN-US;mso-no-proof:yes'>34940 </span></font><st1:City><st1:place><font
  size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt;
  font-family:"Courier New";mso-ansi-language:EN-US;mso-no-proof:yes'>Montpellier</span></font></st1:place></st1:City><font
size=2 face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:
"Courier New";mso-ansi-language:EN-US;mso-no-proof:yes'> Cedex 09<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none'><font size=2
face="Courier New"><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
mso-ansi-language:EN-US;mso-no-proof:yes'>Tél : + 33 (0) 4 67 59 36 56<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
mso-no-proof:yes'>Fax : + 33 (0) 4 67 59 30 10<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";mso-no-proof:yes'>E-mail : raphael.bellec@manobi.net</span></font><span
style='mso-no-proof:yes'><o:p></o:p></span></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

</div>

</body>

</html>
<BR>

<P><FONT SIZE=2>---<BR>
Outgoing mail is certified Virus Free.<BR>
Checked by AVG anti-virus system (http://www.grisoft.com).<BR>
Version: 6.0.556 / Virus Database: 348 - Release Date: 26/12/2003<BR>
</FONT> </P>