<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Carl Pelletier blog &#187; technologie</title>
	<atom:link href="http://carlpelletier.ca/category/technologie/feed/" rel="self" type="application/rss+xml" />
	<link>http://carlpelletier.ca</link>
	<description>Une immertion dans mon esprit, un peu de tout et moins que rien...</description>
	<lastBuildDate>Fri, 20 Nov 2009 19:55:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Connaitre qui à ouvert un process..</title>
		<link>http://carlpelletier.ca/2009/01/19/connaitre-qui-a-ouvert-un-process/</link>
		<comments>http://carlpelletier.ca/2009/01/19/connaitre-qui-a-ouvert-un-process/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 17:40:32 +0000</pubDate>
		<dc:creator>carlpelletier</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[technologie]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[pid]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://carlpelletier.wordpress.com/?p=61</guid>
		<description><![CDATA[Récemment j&#8217;ai travailler à corriger un bug que j&#8217;avais avec Ferret Ce petit utilitaire sur unix est trop puissant: lsof. Lsof nous permet de savoir quel application à ouvert un fichier (pid). Voici l&#8217;exemple que j&#8217;utilise J&#8217;ai eu un connection timeout dans mon postgres. Je veux savoir la liste des process psql database_name; gm_core=# SELECT * [...]]]></description>
			<content:encoded><![CDATA[<p>Récemment j&#8217;ai travailler à corriger un bug que j&#8217;avais avec <a href="http://www.davebalmain.com/">Ferret</a></p>

<p>Ce petit utilitaire sur unix est trop puissant: lsof. Lsof nous permet de savoir quel application à ouvert un fichier (pid). Voici l&#8217;exemple que j&#8217;utilise</p>

<p>J&#8217;ai eu un connection timeout dans mon postgres. Je veux savoir la liste des process</p>

<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">psql database_name;</div></div>

<div class="codecolorer-container sql default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">gm_core<span style="color: #66cc66;">=</span># <span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> pg_stat_activity;<br />
<span style="color: #66cc66;">-</span><span style="color: #66cc66;">&#91;</span> RECORD <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">-+</span><span style="color: #808080; font-style: italic;">--------------------------------</span><br />
datid &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">79357</span><br />
datname &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">|</span> gm_core<br />
procpid &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">23621</span><br />
usesysid &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">19710</span><br />
usename &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">|</span> carlpelletier<br />
current_query <span style="color: #66cc66;">|</span><br />
waiting &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">|</span> f<br />
xact_start &nbsp; &nbsp;<span style="color: #66cc66;">|</span><br />
query_start &nbsp; <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">2009</span><span style="color: #66cc66;">-</span>07<span style="color: #66cc66;">-</span><span style="color: #cc66cc;">20</span> <span style="color: #cc66cc;">15</span>:<span style="color: #cc66cc;">19</span>:<span style="color: #cc66cc;">57.845857</span><span style="color: #66cc66;">-</span>04<br />
backend_start <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">2009</span><span style="color: #66cc66;">-</span>07<span style="color: #66cc66;">-</span><span style="color: #cc66cc;">20</span> <span style="color: #cc66cc;">15</span>:<span style="color: #cc66cc;">19</span>:<span style="color: #cc66cc;">46.448931</span><span style="color: #66cc66;">-</span>04<br />
client_addr &nbsp; <span style="color: #66cc66;">|</span><br />
client_port &nbsp; <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">50838</span></div></div>

<p>On prend le client_port et on fait</p>

<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">lsof <span style="color: #660033;">-n</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #000000;">50838</span><br />
ruby &nbsp; &nbsp; &nbsp;<span style="color: #000000;">31377</span> &nbsp; &nbsp;usrgm &nbsp; 11u &nbsp; &nbsp; IPv4 &nbsp; <span style="color: #000000;">53993738</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TCP 127.0.0.1:<span style="color: #000000;">50838</span>-<span style="color: #000000; font-weight: bold;">&amp;</span>gt;127.0.0.1:postgres <span style="color: #7a0874; font-weight: bold;">&#40;</span>ESTABLISHED<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
postmaste <span style="color: #000000;">31380</span> postgres &nbsp; &nbsp;8u &nbsp; &nbsp; IPv4 &nbsp; <span style="color: #000000;">53993743</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TCP 127.0.0.1:postgres-<span style="color: #000000; font-weight: bold;">&amp;</span>gt;127.0.0.1:<span style="color: #000000;">50838</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>ESTABLISHED<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>

<p>Maintenant que nous avons le id du process, on peut voir le détails en faisant</p>

<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">ps</span> <span style="color: #660033;">-auxwww</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #000000;">31377</span><br />
usrgm &nbsp; &nbsp;<span style="color: #000000;">31377</span> &nbsp;<span style="color: #000000;">1.0</span> &nbsp;<span style="color: #000000;">1.6</span> <span style="color: #000000;">148068</span> <span style="color: #000000;">139456</span> ? &nbsp; &nbsp; Ss &nbsp; Jun09 <span style="color: #000000;">633</span>:<span style="color: #000000;">43</span> ruby script<span style="color: #000000; font-weight: bold;">/</span>ferret_server <span style="color: #660033;">-e</span> production start<br />
carl &nbsp; &nbsp; <span style="color: #000000;">30731</span> &nbsp;<span style="color: #000000;">0.0</span> &nbsp;<span style="color: #000000;">0.0</span> &nbsp;<span style="color: #000000;">4080</span> &nbsp;<span style="color: #000000;">740</span> pts<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1</span> &nbsp; &nbsp;S+ &nbsp; <span style="color: #000000;">13</span>:<span style="color: #000000;">55</span> &nbsp; <span style="color: #000000;">0</span>:00 <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">--exclude</span>=<span style="color: #000000; font-weight: bold;">*</span>.svn<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #660033;">--color</span>=auto <span style="color: #000000;">31377</span></div></div>

<p>Dans le cas précédent, on peut voir que le problème de connection timeout est survenu à cause de Ferret_server. Il semble ne pas fermer les connections correctement. Est-ce vraiment Ferret ou ActiveRecord? La est la question!</p>

<p>Mon but est de démontré l&#8217;avantage de <em>lsof</em>. Je suis en train d&#8217;investiger sur le problèmes de ferret, mais je commence à trouver que c&#8217;est coder tout croche ce produit la. J&#8217;ai eu tellement de difficulté avec. Je pense aller vers Sphynx.</p>

<p>Merci à Mina Naguib pour sont aide et sont explication de la commande lsof.</p>
]]></content:encoded>
			<wfw:commentRss>http://carlpelletier.ca/2009/01/19/connaitre-qui-a-ouvert-un-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Note à moi-même: Setter le password d&#039;un nouveau user pour svn</title>
		<link>http://carlpelletier.ca/2008/12/04/note-a-moi-meme-setter-le-password-dun-nouveau-user-pour-svn/</link>
		<comments>http://carlpelletier.ca/2008/12/04/note-a-moi-meme-setter-le-password-dun-nouveau-user-pour-svn/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 15:31:08 +0000</pubDate>
		<dc:creator>carlpelletier</dc:creator>
				<category><![CDATA[Notes]]></category>
		<category><![CDATA[technologie]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[pwd]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[user]]></category>

		<guid isPermaLink="false">http://carlpelletier.wordpress.com/?p=53</guid>
		<description><![CDATA[sudo /usr/sbin/htpasswd2 /var/svn/conf/all.passwd]]></description>
			<content:encoded><![CDATA[<p>sudo /usr/sbin/htpasswd2 /var/svn/conf/all.passwd</p>
]]></content:encoded>
			<wfw:commentRss>http://carlpelletier.ca/2008/12/04/note-a-moi-meme-setter-le-password-dun-nouveau-user-pour-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Espace des répertoires&#8230;</title>
		<link>http://carlpelletier.ca/2008/11/14/espace-des-repertoires/</link>
		<comments>http://carlpelletier.ca/2008/11/14/espace-des-repertoires/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 14:07:28 +0000</pubDate>
		<dc:creator>carlpelletier</dc:creator>
				<category><![CDATA[technologie]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[du]]></category>
		<category><![CDATA[espace]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[space]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://carlpelletier.wordpress.com/?p=47</guid>
		<description><![CDATA[Sous unix(linux et autre types) pour avoir la liste des répertoires prennant le plus d&#8217;espace, il suffit de rouler la commande suivante: $ du -ks ./* &#124; sort -n 0 &#160; &#160; &#160; ./sdtvolcheck727 8 &#160; &#160; &#160; ./mpztaWqc 8 &#160; &#160; &#160; ./speckeysd.lock 304 &#160; &#160; ./dtdbcache_:0 408688 &#160;./stuff Des explication: -k = Afficher [...]]]></description>
			<content:encoded><![CDATA[<p>Sous unix(linux et autre types) pour avoir la liste des répertoires prennant le plus d&#8217;espace, il suffit de rouler la commande suivante:</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ du -ks ./* | sort -n<br />
0 &nbsp; &nbsp; &nbsp; ./sdtvolcheck727<br />
8 &nbsp; &nbsp; &nbsp; ./mpztaWqc<br />
8 &nbsp; &nbsp; &nbsp; ./speckeysd.lock<br />
304 &nbsp; &nbsp; ./dtdbcache_:0<br />
408688 &nbsp;./stuff</div></div>

<p>Des explication: -k = Afficher en kilo-octects. Si on affiche avec -h on pourra pas sorter. Le -s lui fait un summarize seulement, donc affiche pas tout les sous répertoires.</p>

<p>Le sort -n est sort numérique.</p>
]]></content:encoded>
			<wfw:commentRss>http://carlpelletier.ca/2008/11/14/espace-des-repertoires/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tester le temps que prend un request à une page donnée&#8230;</title>
		<link>http://carlpelletier.ca/2008/10/07/tester-le-temps-que-prend-un-request-a-une-page-donnee/</link>
		<comments>http://carlpelletier.ca/2008/10/07/tester-le-temps-que-prend-un-request-a-une-page-donnee/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 17:23:21 +0000</pubDate>
		<dc:creator>carlpelletier</dc:creator>
				<category><![CDATA[technologie]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://carlpelletier.wordpress.com/?p=43</guid>
		<description><![CDATA[Récuperé du site suivant: http://www.dcmanges.com/blog/rails-performance-tuning-workflow Très pratique pour avoir le temps que prend l'execution d'une page! curl --silent --head \ --cookie "_carepages_session=eb52948f037bda387dfa9d83b6bad62986a624cf" \ http://undisclosed.carepages.com/forums/cancer &#124; grep X-Runtime ou encore You can also use apache bench, which will calculate the mean response time per request. ab -c 1 -n 20 \ -C "_carepages_session=eb52948f037bda387dfa9d83b6bad62986a624cf" \ http://undisclosed.carepages.com/forums/cancer]]></description>
			<content:encoded><![CDATA[<p><pre class="code_ruby">Récuperé du site suivant: http://www.dcmanges.com/blog/rails-performance-tuning-workflow</pre>
<pre class="code_ruby">Très pratique pour avoir le temps que prend l'execution d'une page!</pre>
<pre class="code_ruby">curl --silent --head \
  --cookie "_carepages_session=eb52948f037bda387dfa9d83b6bad62986a624cf" \
  http://undisclosed.carepages.com/forums/cancer | grep X-Runtime</pre>
<pre class="code_ruby">ou encore</pre>
<pre class="code_ruby">You can also use apache bench, which will calculate the mean response time per request.
<pre class="code_ruby">ab -c 1 -n 20 \
  -C "_carepages_session=eb52948f037bda387dfa9d83b6bad62986a624cf" \

http://undisclosed.carepages.com/forums/cancer</pre>

</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://carlpelletier.ca/2008/10/07/tester-le-temps-que-prend-un-request-a-une-page-donnee/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Note à moi même: Récupérer un répertoire supprimer de svn</title>
		<link>http://carlpelletier.ca/2008/09/09/note-a-moi-meme-recuperer-un-repertoire-supprimer-de-svn/</link>
		<comments>http://carlpelletier.ca/2008/09/09/note-a-moi-meme-recuperer-un-repertoire-supprimer-de-svn/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 17:50:27 +0000</pubDate>
		<dc:creator>carlpelletier</dc:creator>
				<category><![CDATA[Notes]]></category>
		<category><![CDATA[technologie]]></category>

		<guid isPermaLink="false">http://carlpelletier.wordpress.com/?p=41</guid>
		<description><![CDATA[Il m&#8217;est arrivé à quelques reprises de supprimer par mégarde un répertoire de mon svn. Evidemment, si on s&#8217;appercoit de la chose avant de faire un commit, il suffit de faire un svn revert, mais que fait ton quand le commit est fait? la réponse: on fait un svn copy du répertoire qui a été [...]]]></description>
			<content:encoded><![CDATA[<p>Il m&#8217;est arrivé à quelques reprises de supprimer par mégarde un répertoire de mon svn. Evidemment, si on s&#8217;appercoit de la chose avant de faire un commit, il suffit de faire un svn revert, mais que fait ton quand le commit est fait?</p>

<p>la réponse:</p>

<blockquote>on fait un svn copy du répertoire qui a été supprimé en prenant le temps de voir dans quel version il a été supprimé avec svn log -v</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://carlpelletier.ca/2008/09/09/note-a-moi-meme-recuperer-un-repertoire-supprimer-de-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

