<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-19023061</id><updated>2012-01-27T16:45:54.014+01:00</updated><category term='gnuplot'/><category term='UNIX'/><category term='virtualization'/><category term='pictures'/><category term='MacOSX'/><category term='astronomy'/><category term='grub'/><category term='DNS'/><category term='tex'/><category term='latex'/><category term='IRIX'/><category term='Gaussian'/><category term='perl'/><category term='fonts'/><category term='mencoder'/><category term='sed'/><category term='povray'/><category term='awk'/><category term='opengl'/><category term='ios'/><category term='git'/><category term='shell'/><category term='python'/><category term='Dell'/><category term='windows'/><category term='programing'/><category term='performance'/><category term='vim'/><category term='Apache'/><category term='Mutt'/><category term='hg'/><category term='solaris'/><category term='BIOS'/><category term='X11'/><category term='XenServer'/><category term='xe'/><category term='XenAPI'/><category term='science'/><category term='linux'/><category term='physic'/><category term='rox'/><category term='IPv6'/><category term='emacs'/><category term='camera'/><category term='Debian'/><category term='fortran'/><category term='Dalton'/><category term='nagios'/><category term='ssh'/><category term='chemistry'/><category term='links'/><category term='GRID'/><category term='desktop'/><category term='Molcas'/><category term='expect'/><category term='quantum chemistry'/><category term='fun'/><category term='Ubuntu'/><category term='udev'/><category term='msmtp'/><category term='WindowMaker'/><category term='ccdc'/><category term='Gamess'/><category term='computing'/><category term='subversion'/><category term='Crux'/><title type='text'>Wawrzyniec Niewodniczański in English</title><subtitle type='html'>Some thinks and things I would like to share with others. Generally things and thinks related to Linux, suggestion, recipes, mostly command line stuff. There are also some old (quantum) chemistry post.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default?start-index=101&amp;max-results=100'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>133</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-19023061.post-3846381081344455663</id><published>2012-01-24T13:43:00.002+01:00</published><updated>2012-01-24T13:43:29.200+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Crux'/><category scheme='http://www.blogger.com/atom/ns#' term='hg'/><title type='text'>Crux and Mercurial view</title><content type='html'>I've spent quite some time trying to make &lt;b&gt;hg view&lt;/b&gt; to work on my Crux. All time I got error message:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;hg view /bin/sh: hgk: command not found&lt;/pre&gt;
&lt;br /&gt;
I could not understand what going on. I enable hgk in &lt;i&gt;/etc/mercurial/hgrc&lt;/i&gt; or &lt;i&gt;~/.hgrc&lt;/i&gt;. I specified the full path to hgk.py in there as well. I even modify default python path. It didn't work.&lt;br /&gt;
&lt;br /&gt;
After some time of googling, changing various variables I found somewhere (probably on Mercurial page), that some Linux distro missing hgk even if they provide hgk.py. Now I know that Crux is one of them. I copied hgk from contrib directory in source package to &lt;i&gt;/usr/bin&lt;/i&gt; and now &lt;b&gt;hg view&lt;/b&gt; works fine.&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-3846381081344455663?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/3846381081344455663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=3846381081344455663' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/3846381081344455663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/3846381081344455663'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2012/01/crux-and-mercurial-view.html' title='Crux and Mercurial view'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-1779768776672693783</id><published>2012-01-14T14:47:00.000+01:00</published><updated>2012-01-19T14:28:24.123+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Aptitude advance usage</title><content type='html'>Some time ago on the Debian mailing list there was a discussion (there 
are many discussion over there ;). That one was extremely interesting, 
not because of the problem (I don't remember it), but because of the Jörg-Volker. Peetz mail with information on advance aptitude usage:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;"I would try the following:&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;- to find out what is installed&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;aptitude search '~iapache'&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;- why it is installed&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;aptitude why apache2-mpm-worker&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; maybe this one is only recommended by another package&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;- and what depends on this package&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;aptitude search '~i~Dapache2-mpm-worker'&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;- finally, see what would happen, if it is removed:&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;aptitude -s purge apache2-mpm-worker&lt;/b&gt;"&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the same thread Bernd Semler suggested following command:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;apt-cache rdepends $packagename&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The original thread can be found here: &lt;a href="http://lists.debian.org/debian-user/2011/10/msg01472.html" target="_blank"&gt;http://lists.debian.org/debian-user/2011/10/msg01472.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-1779768776672693783?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/1779768776672693783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=1779768776672693783' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1779768776672693783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1779768776672693783'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2012/01/some-time-ago-on-debian-mailing-list.html' title='Aptitude advance usage'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-1444979754760378151</id><published>2012-01-09T12:20:00.000+01:00</published><updated>2012-01-10T02:10:06.587+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='XenAPI'/><category scheme='http://www.blogger.com/atom/ns#' term='XenServer'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>XenDebian.py to install Debian on XenServer/XCP</title><content type='html'>Recently, I've needed to install many Debian VMs onto XenServers and, of course, wanted to automate it. One of my colleagues pointed that rather use existing tools like Cobbler I should take opportunity of working with world leading XenAPI developers and learnt it by writing some code. I took that advice and started to write a python script.&lt;br /&gt;
&lt;br /&gt;
During that I decided that I could improve XenAPI documentation. I spent some extra time on my program and tried to write the code clear and with as many comments as possible, so other can learn from it and reuse it. I hoped to write even more documentation (some tutorial) based on my experiences, unfortunately I haven't had enough time.&lt;br /&gt;
&lt;br /&gt;
Please find short XenDebian.py documentation on Xen wiki:&lt;br /&gt; &lt;br /&gt;
&lt;a class="moz-txt-link-freetext" href="http://wiki.xen.org/wiki/XenDebian.py"&gt;http://wiki.xen.org/wiki/XenDebian.py&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
and code on GitHub:&lt;br /&gt;&lt;br /&gt;
&lt;a class="moz-txt-link-freetext" href="https://github.com/wawrzek/XenDebian"&gt;https://github.com/wawrzek/XenDebian&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The script is called XenDebian, but with minor modification (new preseed file and change distro name in few places) you should be able to use it with Ubuntu. With a few more modification it should works for any distribution.&lt;br /&gt;
&lt;br /&gt;
Finally, thanks to &lt;a href="http://blog.xen.org/index.php/2011/07/22/project-kronos/" target="_blank"&gt;Project Kronos&lt;/a&gt; you would be soon able to install use XenDebian to install many Debian on Debian!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-1444979754760378151?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/1444979754760378151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=1444979754760378151' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1444979754760378151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1444979754760378151'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2012/01/xendebianpy-to-install-debian-on.html' title='XenDebian.py to install Debian on XenServer/XCP'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-1269003094790092132</id><published>2012-01-04T14:41:00.001+01:00</published><updated>2012-01-04T14:41:52.942+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='XenServer'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='xe'/><category scheme='http://www.blogger.com/atom/ns#' term='virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>xe-patch</title><content type='html'>Recently I wrote a very small script to apply XenServer patches from command line.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;#!/bin/bash

unzip $1
filename=`basename $1 .zip`.xsupdate
echo "Applying $filename"
xe patch-pool-apply uuid=`xe patch-upload file-name=$filename`
&lt;/pre&gt;
&lt;br /&gt;
To use if first you need to download a patch (you might try to find any new patch &lt;a href="http://support.citrix.com/search/basic?searchQuery=hotfix+for+%22XenServer+6.0%22&amp;amp;Submit="&gt;here&lt;/a&gt;), and next use the script:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;./xe-patch hotfix.zip&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-1269003094790092132?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/1269003094790092132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=1269003094790092132' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1269003094790092132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1269003094790092132'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2012/01/xe-patch.html' title='xe-patch'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-7733027093190925508</id><published>2011-12-29T22:50:00.000+01:00</published><updated>2011-12-29T22:50:58.178+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Crux'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><category scheme='http://www.blogger.com/atom/ns#' term='sed'/><title type='text'>The power of find - exec and friends (grep, sed)</title><content type='html'>This is quite old post. I started to write it in October 2010, but could not properly polish it for a long time.&lt;br /&gt;
 &lt;br /&gt;
Today I would like to present an example of usage of &lt;b&gt;find&lt;/b&gt; (and &lt;b&gt;grep&lt;/b&gt;) rooted in &lt;a href="http://crux.nu/"&gt;Crux&lt;/a&gt;. Let say that I want to find all packages in version &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;20100511&lt;/span&gt; (this was true scenario when I wanted to update e17 related ports). Translating into less Crux specific language it means that I had to find all Pkgfile files (simple &lt;b&gt;find&lt;/b&gt;), which had string &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;20100511&lt;/span&gt; (simple &lt;b&gt;grep&lt;/b&gt;). I needed only file names not a matching string so I used &lt;b&gt;-l&lt;/b&gt; option for &lt;b&gt;grep&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;find . -name Pkgfile -exec grep -l 20100511 {} \;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
I not only needed to find all old files but&amp;nbsp; to updated them as well (to version 1.0.0.beta that time). I used the same find but exchanged &lt;b&gt;grep&lt;/b&gt; to &lt;b&gt;sed&lt;/b&gt; (with option &lt;b&gt;-i&lt;/b&gt; for&amp;nbsp; "in place").&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;find . -name Pkgfile -exec sed -i 's/20100511/1.0.0.beta/ {} \;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
Let push our example one step further. I wanted to find dependence for packages, therefore I ran following command.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;grep -i depen `find . -name Pkgfile -exec grep -l beta {} \;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
What used&amp;nbsp; previous command to create a list of files to hunted through for word beta. (I wasn't sure if word "dependence" begun lower or upper case so used option &lt;b&gt;-i&lt;/b&gt; for &lt;b&gt;--ignore-case&lt;/b&gt;).&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
In UNIX world there are always more than one way of doing things and in our scenario the &lt;b&gt;find&lt;/b&gt; &lt;b&gt;-exec&lt;/b&gt; can be replace with a separate command &lt;b&gt;xargs&lt;/b&gt;. &lt;b&gt;Xargs&lt;/b&gt; might be very useful in many cases because can be use to create unix command from standard input. Using &lt;b&gt;xargs&lt;/b&gt; rather then &lt;b&gt;find -exec&lt;/b&gt; my first example would be:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;find . -name Pkgfile  | xargs grep -l beta $1&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt; &lt;/pre&gt;
Let use &lt;b&gt;xargs&lt;/b&gt; for another task related to above example. In my scenario I had not only to update the version, but also to change the sources of the packages. To do that I used &lt;b&gt;find&lt;/b&gt;,&lt;b&gt; xargs &lt;/b&gt;and&lt;b&gt; sed &lt;/b&gt;in a&lt;b&gt; for&lt;/b&gt; loop.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;for file in `find . -name Pkgfile  | xargs grep -l beta $1 2&amp;amp;&amp;gt; /dev/null` ; \
do \
 sed -i 's/pitillo.mine.nu\/crux\/distfiles/download.enlightenment.org\/releases/' $file; \
done&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
The above command might be one liner, but can be paste line by line. It used the command from the previous example to create the &lt;b&gt;$file&lt;/b&gt; array consist of names of files with word "beta". Elements from &lt;b&gt;$file&lt;/b&gt; were use as input for sed command.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-7733027093190925508?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/7733027093190925508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=7733027093190925508' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/7733027093190925508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/7733027093190925508'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2011/12/power-of-find-exec-and-friends-grep-sed.html' title='The power of find - exec and friends (grep, sed)'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-213902016823687718</id><published>2011-12-21T01:37:00.000+01:00</published><updated>2011-12-29T22:52:15.519+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XenServer'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='xe'/><category scheme='http://www.blogger.com/atom/ns#' term='virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Mount LVM from domU in dom0</title><content type='html'>Mounting logical volumes (LVM) from domX (guest) within dom0 (XenServer) is very not recommender and suggested. But sometimes it might be the only options, and it's cool hacker (hacker in good old meaning, not cracker) trick. So to mount your volume you should take following steps:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;xe vm-disk-list vm=test4&lt;/b&gt; - list disk of the VM.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;xe vm-list&lt;/b&gt; - find info (UUID) about dom0.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;xe vbd-create device=xvda unpluggable=true  vdi-uuid=79a7a556-a6ba-48cf-8c82-30fa5bb9597c  vm-uuid=36895434-e6d7-4fea-8271-d5477ca23c6d&lt;/b&gt; - create unpluggable VBD (xvda) with disk (uuid from point 1) on dom0 (uuid from point 2).&lt;/li&gt;
&lt;li&gt;&lt;b&gt;xe vbd-plug uuid=0a4151b6-2b59-2fdb-c0a9-492520a8d52c&lt;/b&gt; - plug created vbd.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;mount /dev/xvda1 /mnt&lt;/b&gt; - mount disk (any 'physical partition').&lt;/li&gt;
&lt;li&gt;&lt;b&gt;vi /etc/lvm/lvm.conf&lt;/b&gt; - if you need anything on LVM you have to edit lvm.conf&amp;nbsp;&lt;/li&gt;
&lt;div class="codeContent panelContent"&gt;
&lt;pre&gt;# Ignore /dev/xvd* devices to prevent deadlocking when live-snapshotting
# dom0-attached LVHD VDIs
#filter = "r|/dev/xvd.|","r|/dev/VG_Xen.*/LV.*|"
&lt;/pre&gt;
&lt;/div&gt;
&lt;li&gt;&lt;b&gt;vgchange -a y test4&lt;/b&gt; - activate new vg.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;mount /dev/test4/root /test/mnt&lt;/b&gt; - mount partition.&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-213902016823687718?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/213902016823687718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=213902016823687718' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/213902016823687718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/213902016823687718'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2011/11/mount-lvm-from-domu-in-dom0.html' title='Mount LVM from domU in dom0'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-6095247752059696951</id><published>2011-11-28T12:48:00.001+01:00</published><updated>2011-12-29T22:52:42.236+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XenServer'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='xe'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>XenServer, xe and more greping</title><content type='html'>In my &lt;a href="http://larryn.blogspot.com/2011/11/xenserver-cli-and-grep-by-name.html"&gt;last post&lt;/a&gt; I described how you can use &lt;b&gt;grep&lt;/b&gt; to extend listing of XenServer parameters. Continuing this thread today, I show how to get values of specific parametes, let say memory.&lt;br /&gt;
&lt;br /&gt;
You can get memory using following command, but I bet it's not you expect.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;# xe vm-list params=memory
memory (MRO)    : 


memory (MRO)    : &lt;not database="" in=""&gt;


&lt;/not&gt;&lt;/pre&gt;
&lt;br /&gt;
More interesting values you can get using &lt;b&gt;params=all&lt;/b&gt;. The problem is that you will get hundreds of other values too. This is not helpful, but of course&amp;nbsp; grep can help us:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;# xe vm-list params=all| grep memory
                 memory-actual ( RO): 536870912
                 memory-target ( RO): &lt;expensive field=""&gt;
               memory-overhead ( RO): 6291456
             memory-static-max ( RW): 536870912
            memory-dynamic-max ( RW): 536870912
            memory-dynamic-min ( RW): 536870912
             memory-static-min ( RW): 536870912
               recommendations ( RO): &lt;restrictions&gt;&lt;restriction field="memory-static-max" max="34359738368"&gt;&lt;restriction field="vcpus-max" max="16"&gt;&lt;restriction max="7" property="number-of-vbds"&gt;&lt;restriction max="7" property="number-of-vifs"&gt;&lt;/restriction&gt;&lt;/restriction&gt;&lt;/restriction&gt;&lt;/restriction&gt;&lt;/restrictions&gt;
                        memory (MRO): 
                 memory-actual ( RO): 500170752
                 memory-target ( RO): &lt;expensive field=""&gt;
               memory-overhead ( RO): 15728640
             memory-static-max ( RW): 789839872
            memory-dynamic-max ( RW): 500170752
            memory-dynamic-min ( RW): 500170752
             memory-static-min ( RW): 395313152
                        memory (MRO): &lt;not database="" in=""&gt;
                 memory-actual ( RO): 1073741824
                 memory-target ( RO): &lt;expensive field=""&gt;
               memory-overhead ( RO): 10485760
             memory-static-max ( RW): 1073741824
            memory-dynamic-max ( RW): 1073741824
            memory-dynamic-min ( RW): 1073741824
             memory-static-min ( RW): 1073741824
               recommendations ( RO): &lt;restrictions&gt;&lt;restriction field="memory-static-max" max="34359738368"&gt;&lt;restriction field="vcpus-max" max="16"&gt;&lt;restriction max="7" property="number-of-vbds"&gt;&lt;restriction max="7" property="number-of-vifs"&gt;&lt;/restriction&gt;&lt;/restriction&gt;&lt;/restriction&gt;&lt;/restriction&gt;&lt;/restrictions&gt;
                        memory (MRO): &lt;not database="" in=""&gt;
&lt;/not&gt;&lt;/expensive&gt;&lt;/not&gt;&lt;/expensive&gt;&lt;/expensive&gt;&lt;/pre&gt;
&lt;br /&gt;
It's not so useful yet, because we have only memory related value, but we don't know relation between them and VMs. Luckily, we can very easily extend our grep.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;# xe vm-list params=all| grep "label\|memory"
                    name-label ( RW): at10
                 memory-actual ( RO): 536870912
                 memory-target ( RO): &lt;expensive field=""&gt;
               memory-overhead ( RO): 6291456
             memory-static-max ( RW): 536870912
            memory-dynamic-max ( RW): 536870912
            memory-dynamic-min ( RW): 536870912
             memory-static-min ( RW): 536870912
               recommendations ( RO): &lt;restrictions&gt;&lt;restriction field="memory-static-max" max="34359738368"&gt;&lt;restriction field="vcpus-max" max="16"&gt;&lt;restriction max="7" property="number-of-vbds"&gt;&lt;restriction max="7" property="number-of-vifs"&gt;&lt;/restriction&gt;&lt;/restriction&gt;&lt;/restriction&gt;&lt;/restriction&gt;&lt;/restrictions&gt;
                        memory (MRO): 
                    name-label ( RW): Control domain on host: dt33
                 memory-actual ( RO): 500170752
                 memory-target ( RO): &lt;expensive field=""&gt;
               memory-overhead ( RO): 15728640
             memory-static-max ( RW): 789839872
            memory-dynamic-max ( RW): 500170752
            memory-dynamic-min ( RW): 500170752
             memory-static-min ( RW): 395313152
                        memory (MRO): &lt;not database="" in=""&gt;
                    name-label ( RW): at11
                 memory-actual ( RO): 1073741824
                 memory-target ( RO): &lt;expensive field=""&gt;
               memory-overhead ( RO): 10485760
             memory-static-max ( RW): 1073741824
            memory-dynamic-max ( RW): 1073741824
            memory-dynamic-min ( RW): 1073741824
             memory-static-min ( RW): 1073741824
               recommendations ( RO): &lt;restrictions&gt;&lt;restriction field="memory-static-max" max="34359738368"&gt;&lt;restriction field="vcpus-max" max="16"&gt;&lt;restriction max="7" property="number-of-vbds"&gt;&lt;restriction max="7" property="number-of-vifs"&gt;&lt;/restriction&gt;&lt;/restriction&gt;&lt;/restriction&gt;&lt;/restriction&gt;&lt;/restrictions&gt;
                        memory (MRO): &lt;not database="" in=""&gt;
&lt;/not&gt;&lt;/expensive&gt;&lt;/not&gt;&lt;/expensive&gt;&lt;/expensive&gt;&lt;/pre&gt;
&lt;br /&gt;
Now we know that the at10 has 0.5GB, the at11 1GB and the dom0 might have between 386 and 771 MB.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Summary&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Of course similar construction in grep query might be use for other variables.E.g. to have the list of live VMs try:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;xe vm-list params=all| grep -i -E '(label|\s+live)'&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-6095247752059696951?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/6095247752059696951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=6095247752059696951' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/6095247752059696951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/6095247752059696951'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2011/11/xenserver-xe-and-more-greping.html' title='XenServer, xe and more greping'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-5724544818275426270</id><published>2011-11-25T13:18:00.001+01:00</published><updated>2011-11-25T13:37:37.641+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='XenServer'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='xe'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>XenServer CLI and grep by name</title><content type='html'>One of the annoying thing in XenServer command line tool (xe) is lack of regexp/wildcards in filtering vm (and other objects) by name. However, there is easy way to work around thanks to &lt;b&gt;grep&lt;/b&gt;. Standard output have 3 lines per vm, with one line before (&lt;b&gt;-B 1&lt;/b&gt; in grep) and one after (&lt;b&gt;-A 1&lt;/b&gt;) line with name. So you can use following line to find information about VM with given name: &lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;xe vm-list | grep -B 1 -A 1 your-vm-name&lt;/pre&gt;
&lt;br /&gt;
You can also extend this command to get uuid of requested vm:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;xe vm-list | grep -B 1  your-vm-name| awk '/uuid/ {print $5}'&lt;/pre&gt;
&lt;br /&gt;
What can be use i.e. to take the snapshot:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;vm-uuid=`xe vm-list | grep -B 1  dowa| awk '/uuid/ {print $5}'`
xe vm-clone name-name-label='dowa-01-clone' uuid=$vm-uuid
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-5724544818275426270?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/5724544818275426270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=5724544818275426270' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5724544818275426270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5724544818275426270'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2011/11/xenserver-cli-and-grep-by-name.html' title='XenServer CLI and grep by name'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-1395906343060554550</id><published>2011-10-12T14:46:00.000+02:00</published><updated>2011-10-12T14:46:34.179+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><category scheme='http://www.blogger.com/atom/ns#' term='IPv6'/><title type='text'>Debian, DHCP and IPv6</title><content type='html'>It was big surprise for that in Debian &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;/etc/network/interface&lt;/span&gt; you cannot us 
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iface ethX inet6 dhcp&lt;/span&gt;
option to use DHCPv6 client to set IP address. If you need IPv6 address from DHCP server, you should can either define interface manually: &lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;iface eth1 inet6 manual
 up /sbin/ip link set eth1 up
 post-up /etc/init.d/wide-dhcpv6-client start
 pre-down /etc/init.d/wide-dhcpv6-client stop
 down /sbin/ip link set eth1 down&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
or plug it into IPv4 definition (i.e. &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;inet dhcp&lt;/span&gt;).&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;inet dhcp
&lt;pre&gt;iface eth1 inet dhcp
 post-up /etc/init.d/wide-dhcpv6-client start
 pre-down /etc/init.d/wide-dhcpv6-client stop
&lt;/pre&gt;
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-1395906343060554550?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/1395906343060554550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=1395906343060554550' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1395906343060554550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1395906343060554550'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2011/10/debian-dhcp-and-ipv6.html' title='Debian, DHCP and IPv6'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-7975037782305707935</id><published>2011-06-01T17:46:00.000+02:00</published><updated>2011-06-01T17:46:52.668+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='awk'/><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Another awk example</title><content type='html'>This time how to print all columns others than first one, but only for lines begins with i.e. &lt;b&gt;exim4-config&lt;/b&gt;.&lt;br /&gt;
&lt;pre&gt;hub-02:~# awk '/^exim4-config/ {$1=""; print }' test2&lt;/pre&gt;
And I got:
&lt;br /&gt;
&lt;pre&gt;&amp;nbsp;exim4/dc_smarthost string smtp.uk
&amp;nbsp;exim4/dc_relay_domains string
&amp;nbsp;exim4/dc_relay_nets string
&amp;nbsp;exim4/mailname string hub-01.uk
&amp;nbsp;exim4/dc_localdelivery select mbox format in /var/mail/
&amp;nbsp;exim4/dc_local_interfaces string 127.0.0.1
&amp;nbsp;exim4/dc_minimaldns boolean false
&amp;nbsp;exim4/dc_other_hostnames string
&amp;nbsp;exim4/dc_eximconfig_configtype select mail sent by smarthost; received via SMTP or fetchmail
&amp;nbsp;exim4/no_config boolean true
&amp;nbsp;exim4/hide_mailname boolean false
&amp;nbsp;exim4/dc_postmaster string toor
&amp;nbsp;exim4/dc_readhost string
&amp;nbsp;exim4/use_split_config boolean true&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
BTW. I need this list to filter responses used to configure Exim in Debian. And I need the answers to reuse them in pressed.&lt;br /&gt;
Oh, I obtained the list using: 
&lt;br /&gt;
&lt;pre&gt;debconf-get-selections  --install &amp;gt; test2&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-7975037782305707935?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/7975037782305707935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=7975037782305707935' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/7975037782305707935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/7975037782305707935'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2011/06/another-awk-example.html' title='Another awk example'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-1069148071336316155</id><published>2011-04-08T15:56:00.001+02:00</published><updated>2011-04-08T16:22:40.103+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XenServer'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Dell'/><title type='text'>Xenserver &amp; ipmitool</title><content type='html'>I found that to enable access BMC information locally from Xenserver you need to load following modules:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&amp;nbsp;modprobe ipmi_msghandler&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;b&gt;modprobe ipmi_devintf&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;b&gt;modprobe ipmi_si&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;and latter as normal:&lt;br /&gt;
&lt;b&gt;&amp;nbsp; ipmitool -I open channel info&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tested on Dell R310 without Drac module.&lt;br /&gt;
&lt;br /&gt;
&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;br /&gt;
&lt;strike&gt;Another thing worth to note&amp;nbsp; about Dell and it's BMC — it is not enable by default and you need to press Ctrl+E in the right moment and turn it on.&amp;nbsp;&lt;/strike&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;UPDATE&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Dell support was wrong I can turn on access to BMC over LAN without rebooting box:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;ipmitool -I open lan set 1 access on&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;ipmitool -I open lan set 1 user&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;ipmitool -I open lan set 1 ipsrc dhcp&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
I'm not sure if I needed all three command. I'll check another day.&lt;br /&gt;
&lt;br /&gt;
IPMITOOL man:&amp;nbsp; &lt;a href="http://ipmitool.sourceforge.net/manpage.html"&gt;http://ipmitool.sourceforge.net/manpage.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-1069148071336316155?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/1069148071336316155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=1069148071336316155' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1069148071336316155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1069148071336316155'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2011/04/xenserver-ipmitool.html' title='Xenserver &amp; ipmitool'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-6802479917397546931</id><published>2011-02-12T01:23:00.000+01:00</published><updated>2011-02-12T01:23:21.947+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='expect'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>not so talkative expect</title><content type='html'>I'm not sure how I could miss it, but just recently I learned how to set expect not to send everything to the standard output. In the expect file you have to set &lt;b&gt;log_user 0&lt;/b&gt;. you can change it but by &lt;b&gt;log_user 1&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
This is very helpful to write bash scripts i.e. using my &lt;a href="http://larryn.blogspot.com/2010/12/expect-ssh-and-two-passwords.html"&gt;remote_command.expect&lt;/a&gt; script - awking output is much easier.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-6802479917397546931?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/6802479917397546931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=6802479917397546931' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/6802479917397546931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/6802479917397546931'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2011/02/not-so-talkative-expect.html' title='not so talkative expect'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-6282266954868920244</id><published>2011-01-11T11:04:00.000+01:00</published><updated>2011-01-11T11:04:42.694+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='expect'/><category scheme='http://www.blogger.com/atom/ns#' term='Dell'/><category scheme='http://www.blogger.com/atom/ns#' term='ios'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Expect, telnet and Dell switch</title><content type='html'>Recently I've tried to find a way to obtain MAC addresses of computers attached to a Dell Switch. I've found that i.e. &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; &lt;/span&gt;&lt;b style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;show bridge address-table ethernet 1/g3&lt;/b&gt; returns&amp;nbsp; MAC addresses behind the port 3. I found small problem - it's not so easy to query all ports (or a chosen set of ports). Therefore, I decided to use expect. You can find the script below.&lt;br /&gt;
It connects to a switch run the command and finally print a mac address in the format with ':' between number doublets.&lt;br /&gt;
However, there are two issues. I don't know how to avoid sending everything to the standard output. Moreover, if there are more than one MAC address connected to the port (i.e. virtual machines), only first address will be print on the bottom of the output. To be precise the address&amp;nbsp; appears in the line 6 
of output (see line started with &lt;i&gt;set temp_mac&lt;/i&gt;).&lt;br /&gt;
&lt;br /&gt;

&lt;br /&gt;
&lt;pre&gt;#!/usr/bin/expect -f

set timeout -1

set machine [lindex $argv 0]
set port [lindex $argv 1]
set command "show bridge address-table ethernet 1/g$port\n"

#Connect to the server
spawn telnet $machine 

expect "User:"
exp_send "admin\r"
expect "Password:"
exp_send "myXEN\r"
expect "?*&amp;gt;"
exp_send "enable\r"
expect "?*#"
exp_send $command
expect "?*#"
set temp_mac [ lindex [ lindex [ split $expect_out(0,string) "\n"] 6] 1]
exp_send "exit\r"
exp_send "quit\r"

puts "\n"

# Creating mac address in DHCP format (with ':')
set mac [ string range $temp_mac 0 1 ]
append mac "."
append mac [ string range $temp_mac 2 6 ]
append mac "."
append mac [ string range $temp_mac 7 11 ]
append mac "."
append mac [ string range $temp_mac 12 13 ]

puts  "$machine/$port:  [ string map  {. :} $mac]"

exit
&lt;/pre&gt;
Oh one more thing. To make a list of all following it's good to run the script in loop and the following one should be good base to start with.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;for ((i=1;i&amp;lt;48;i++)) do mac-dell.expect esw44-1 $i| grep "esw44-1/$i"; done
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-6282266954868920244?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/6282266954868920244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=6282266954868920244' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/6282266954868920244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/6282266954868920244'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2011/01/expect-telnet-and-dell-switch.html' title='Expect, telnet and Dell switch'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-1639607634113769263</id><published>2011-01-05T14:15:00.000+01:00</published><updated>2011-01-05T14:15:54.548+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='BIOS'/><category scheme='http://www.blogger.com/atom/ns#' term='XenServer'/><category scheme='http://www.blogger.com/atom/ns#' term='Dell'/><title type='text'>Upgrade Dell BIOS from XenServer 5.6</title><content type='html'>I've just found that to upgrade the Dell BIOS for R310 (and I guess other servers) on XenServer 5.6  you have to provide the &lt;i&gt;lockfile&lt;/i&gt; file which comes from the &lt;i&gt;procmail&lt;/i&gt; RPM.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-1639607634113769263?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/1639607634113769263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=1639607634113769263' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1639607634113769263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1639607634113769263'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2011/01/upgrade-dell-bios-from-xenserver-56.html' title='Upgrade Dell BIOS from XenServer 5.6'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-1879153397480407496</id><published>2010-12-29T13:32:00.000+01:00</published><updated>2010-12-29T13:32:55.077+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='expect'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Expect, ssh and two passwords</title><content type='html'>Let say that you need to run a command on many remote machine and you cannot use any of specialist tools (I mean i.e. &lt;a href="https://fedorahosted.org/func/"&gt;func&lt;/a&gt;). In such situation expect might be helpful and I even &lt;a href="http://larryn.blogspot.com/2009/08/expect-and-operation-on-many-computers.html"&gt;has written about it&lt;/a&gt; already. Recently I had to modified my script, cause not all remote systems have the same root password.
&lt;br /&gt;
&lt;pre&gt;#!/usr/bin/expect -f

set timeout -1

set machine [lindex $argv 0]
set command [lindex $argv 1]

set pass "xen4ulez\r" 
puts $machine

spawn ssh -o "NumberOfPasswordPrompts 2" -o "ServerAliveCountMax 1" -l root $machine $command
match_max 100000

expect {
    "assword:" 
      {
        exp_send $pass 
        set pass "xen!king\r"
        exp_continue
    }
}
&lt;/pre&gt;
First, the script has a password set as a variable. It allows to change later. To to this I have expanded the 'expect password' part of the script.  Now the script sends the password and changes it after. If the password was fine, script executes the command. The change of the password is not important. If the password is wrong the script sends the variable $pass again, but this time it is new value. I have also added to option to ssh command for script to run a bit faster.&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;i&gt;NumberOfPasswordPrompts 2&lt;/i&gt; - ensure that ssh tries only twice to provide password.&lt;/li&gt;
&lt;li&gt;&lt;i&gt;ServerAliveCountMax 1&lt;/i&gt; - ensure that ssh sends only one Server Alive message&lt;/li&gt;
&lt;/ol&gt;
Finally I have set &lt;i&gt;StrictHostKeyChecking no&lt;/i&gt; and &lt;i&gt;UserKnownHostsFile /dev/null&lt;/i&gt; in the .ssh/config file for machines I'm going to use above scripts. This two options set ssh not to bother about checking Host Key. Please remember that it might be not secure.&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-1879153397480407496?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/1879153397480407496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=1879153397480407496' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1879153397480407496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1879153397480407496'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2010/12/expect-ssh-and-two-passwords.html' title='Expect, ssh and two passwords'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-2331570419747937948</id><published>2010-07-29T18:32:00.000+02:00</published><updated>2010-07-29T18:32:30.747+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Do something every minut in shell</title><content type='html'>Recently I've needed to do some statistic based on apache log file. I've wanted statistic to be update every minute and want to use only shell.&lt;br /&gt;
&lt;br /&gt;
The first idea was &lt;b&gt;cron&lt;/b&gt;.&amp;nbsp; Sounds nice but there is small problem. I want to be flexible. In theory I can add a job to crontab in the moment I want to start it and remove it (comment out) after finishing, but it's ideal. &lt;br /&gt;
&lt;br /&gt;
No cron, so maybe &lt;b&gt;sleep&lt;/b&gt;, especially sleep 60.... But there is another problem. My scripts runs few seconds, so after few minutes (approx. 60/time my scripts runs) I'll have a gap in results.&lt;br /&gt;
&lt;br /&gt;
No cron, no sleep. I needed another direction. Recently I've been playing a bit with &lt;b&gt;data&lt;/b&gt; formats. I write a bit of code and after few minutes – volia – I had a working scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;#!/bin/sh

min=`date  "+%M"`

while [ 1 ]
do
        ~/test.sh
        while (($min==`date  "+%M"`))
        do
                sleep 10
        done
        min=`date  "+%M"`
done&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp; &lt;/pre&gt;
One more thing which might be interesting for some. I used infinite loop based on&amp;nbsp; &lt;a href="http://blog.taragana.com/index.php/archive/how-to-write-infinite-loop-in-bash/"&gt;this blog entry&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-2331570419747937948?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/2331570419747937948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=2331570419747937948' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/2331570419747937948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/2331570419747937948'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2010/07/do-something-every-minut-in-shell.html' title='Do something every minut in shell'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-986865598940785380</id><published>2010-06-23T18:29:00.001+02:00</published><updated>2010-06-23T18:31:36.002+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><title type='text'>How to check a website from the commandline</title><content type='html'>Sometimes it's useful to check a website connectivity using only command line. I.e. when trying a website from remote host, or when you set up a new box you are going to put behind a loadbalancer. &lt;br /&gt;
&lt;br /&gt;
If you need HTTP connection, telnet will be enough:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&amp;gt; telnet 10.10.10.10 80&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
GET /index.html HTTP/1.1&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
host: important.site.com&lt;/div&gt;
&lt;br /&gt;
In the case of HTTPS you need openssl:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&amp;gt; openssl s_client&amp;nbsp; -connect 10.10.10.10:443 -prexit&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
GET /index.html HTTP/1.1&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
host: important.site.com&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;br /&gt;&lt;/div&gt;
This is entry for my extend my 'external memory', but you might find 
it useful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-986865598940785380?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/986865598940785380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=986865598940785380' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/986865598940785380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/986865598940785380'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2010/06/how-to-check-website-from-commandline.html' title='How to check a website from the commandline'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-4101506607600646762</id><published>2010-02-09T21:42:00.002+01:00</published><updated>2010-02-19T12:58:34.110+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='DNS'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Copy many lines in Emacs</title><content type='html'>I'm VIM not Emacs user, but use the later one to applied DNS changes. It has two nice feature helping to maintenance BIND zone files. First, built-in versioning in RCS, but even more helpful the mechanism of updating serial number.&lt;br /&gt;
&lt;br /&gt;
Anyway, I found it's very hard to copy more than one line in Emacs, until I found some suggestion &lt;a href="http://www.cs.rutgers.edu/LCSR-Computing/some-docs/emacs-chart.html"&gt;here&lt;/a&gt; and &lt;a href="http://www.emacswiki.org/emacs/CopyingWholeLines"&gt;here&lt;/a&gt;. So to copy the current line without the newline you have to one of two (depends if you want copy or move the lines):&lt;br /&gt;
&lt;pre&gt;C-a C-Space C-e M-w&lt;/pre&gt;
&lt;pre&gt;C-a C-Space C-e C-w&lt;/pre&gt;
It means: &lt;b&gt;C-a&lt;/b&gt; move to beginning of the line, &lt;b&gt;C-Space&lt;/b&gt; sat the mark, &lt;b&gt;C-e&lt;/b&gt; go to end line, &lt;b&gt;M-w/C-w&lt;/b&gt; save/delete(kill) the region. "OK, but it only one line" you may save and you would be right. But to mark more line you just need to i.e. use arrow before marking a text (by &lt;b&gt;M-w&lt;/b&gt;).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-4101506607600646762?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/4101506607600646762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=4101506607600646762' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/4101506607600646762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/4101506607600646762'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2010/02/copy-many-lines-in-emacs.html' title='Copy many lines in Emacs'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-5809845700506143345</id><published>2010-01-28T01:51:00.001+01:00</published><updated>2010-02-09T21:45:35.088+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><title type='text'>64 vs 32 rather then SSD vs HDD</title><content type='html'>&lt;br /&gt;
&lt;b&gt;Introduction&lt;/b&gt;
&lt;br /&gt;
&lt;a href="http://larryn.blogspot.com/2009/08/stone-redskin-comparision-of-apache2.html"&gt;Some time ago&lt;/a&gt; I promised to present results of the performance test  of an Apache serving content from HDD and SSD. The tests confirmed that SSD gives Apache serving static content significant performance boost, however the other remedy for I/O problem has been found.&lt;br /&gt;
&lt;br /&gt;
It's not so easy to test a system from inside. It also applies to the internet. The "image" you see is not exactly what your customers might see. There are some tools helping measure the "real image" of your website (i.e. &lt;a href="http://keynote.com/"&gt;KeyNote&lt;/a&gt;), but to test a difference of performance between two server visible as one entitle from outside (i.e. behind load-balancer) such test are not ideal. (Of course it is possible to prepare a A/B test when A means serving images from one server, B from another one). The web search hadn't brought any technique and parameters useful in such test (of course it might means that the search&amp;nbsp; was not very good). Therefore, the &lt;b&gt;serving speed [byte/microsecond]&lt;/b&gt; parameter were define as ratio of file size [bytes] and response time [microseconds], respectively &lt;code&gt;%B&lt;/code&gt; and &lt;code&gt;%D&lt;/code&gt; in &lt;a href="http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#formats"&gt;extended Apache log&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;SSD vs HDD&lt;/b&gt;
&lt;br /&gt;
In the first test the SSD box (&lt;a href="http://www.sun.com/servers/x64/x4150/"&gt;Sun X4150&lt;/a&gt; with 8 Xeon E5345 @ 2.33GHz cores and 8 GB of memory) was try out against &lt;a href="http://h20000.www2.hp.com/bizsupport/TechSupport/Home.jsp?lang=en&amp;amp;cc=us&amp;amp;prodTypeId=15351&amp;amp;prodSeriesId=1121516&amp;amp;submit.y=6&amp;amp;submit.x=6&amp;amp;lang=en&amp;amp;cc=us"&gt;HP ProLiant D380 G5&lt;/a&gt; with the same amount of memory and 4 similar processors/cores (Xeon 5148 @ 2.33GHz). The test were split into two phase. Results for both ones are collected in Table 1. The first day both boxes serve the same amount of requests. The SSD machine sent files two time faster. Next day the weight of connection to machine with SSD was increase on the load balancer, but it doesn't change the results. The SSD box was much faster again. The data presented in Table 1 ensure that both boxes worked with similar set of files (similar size and number of requests). &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Table 1. Comparison of server with SSD (SUN X4150) and HDD (HP D380 G5) drives.&lt;/b&gt;&lt;br /&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;&lt;b&gt;SSD machine &lt;/b&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;b&gt;HDD machine &lt;/b&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td align="center" colspan="3"&gt;&lt;b&gt;Day I&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Average speed &lt;b&gt;24.27563&lt;/b&gt;&lt;br /&gt;
Average time &lt;b&gt;13908.68485&lt;/b&gt;&lt;br /&gt;
Average size 7683.71685&lt;br /&gt;
Served files 14983388&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Average speed &lt;b&gt;12.23371&lt;/b&gt;&lt;br /&gt;
Average time &lt;b&gt;24674.27763&lt;/b&gt;&lt;br /&gt;
Average size 7702.66678&lt;br /&gt;
Served files 14987023&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align="center" colspan="3"&gt;&lt;b&gt;Day II&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Average speed &lt;b&gt;23.76447&lt;/b&gt;&lt;br /&gt;
Average time &lt;b&gt;13107.95822&lt;/b&gt;&lt;br /&gt;
Average size 7839.91839&lt;br /&gt;
Served files 21522835&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Average speed &lt;b&gt;11.10400&lt;/b&gt;&lt;br /&gt;
Average time &lt;b&gt;26001.08215&lt;/b&gt;&lt;br /&gt;
Average size 7829.47865&lt;br /&gt;
Served files 10758116&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
During next phase of research the SSD machine was tested again wider set of servers with HDD servers (machines with Apache using different MPM (prefork and worker), with 8 or 16 GB of memory and with slower and faster processors). SSD machine was faster than any of the server with a classical hard drive. Adding memory as well as changing MPM didn't change the difference in the performance. On the other hand, the machine with more and newer processor sent files much faster than the old ones, however still 50% slower than the SSD test kit. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Table 1. Comparison of Apache performance on machine with a SSD against different machine using a HDD. SUN SSD means the test boxs, OLD HP a box with 4 L5430@2.33Ghz core and NEW HP a server with 8 E5345 cores.&lt;/b&gt;&lt;br /&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th colspan="2"&gt;&lt;/th&gt;&lt;th&gt;OLD HP&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;NEW HP&lt;/th&gt;&lt;th&gt;SUN SSD&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;th&gt;speed&lt;/th&gt;
&lt;th&gt;16GB (prefork)&lt;/th&gt;
&lt;th&gt;8GB (prefork)&lt;/th&gt;
&lt;th&gt;8GB (worker)&lt;/th&gt;
&lt;th&gt;16GB (worker)&lt;/th&gt;
&lt;th&gt;8GB, (worker)&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="confluenceTd"&gt;Test 1&lt;/td&gt;
&lt;td class="confluenceTd" style="text-align: right;"&gt;9.73669&lt;/td&gt;
&lt;td class="confluenceTd" style="text-align: right;"&gt;10.99227&lt;/td&gt;
&lt;td class="confluenceTd" style="text-align: right;"&gt;10.82629&lt;/td&gt;
&lt;td class="confluenceTd" style="text-align: right;"&gt;16.81683&lt;/td&gt;
&lt;td class="confluenceTd" style="text-align: right;"&gt;24.18491&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="confluenceTd"&gt;Test 2&lt;/td&gt;
&lt;td class="confluenceTd" style="text-align: right;"&gt;9.56062&lt;/td&gt;
&lt;td class="confluenceTd" style="text-align: right;"&gt;10.57697&lt;/td&gt;
&lt;td class="confluenceTd" style="text-align: right;"&gt;10.51381&lt;/td&gt;
&lt;td class="confluenceTd" style="text-align: right;"&gt;16.32999&lt;/td&gt;
&lt;td class="confluenceTd" style="text-align: right;"&gt;24.41852&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="confluenceTd"&gt;Test 3&lt;/td&gt;
&lt;td class="confluenceTd" style="text-align: right;"&gt;8.69836&lt;/td&gt;
&lt;td class="confluenceTd" style="text-align: right;"&gt;9.83142&lt;/td&gt;
&lt;td class="confluenceTd" style="text-align: right;"&gt;9.65313&lt;/td&gt;
&lt;td class="confluenceTd" style="text-align: right;"&gt;16.16164&lt;/td&gt;
&lt;td class="confluenceTd" style="text-align: right;"&gt;24.39481&lt;/td&gt;
&lt;/tr&gt;
&lt;tr bgcolor=""&gt;
&lt;td class="confluenceTd"&gt;Test 4&lt;/td&gt;
&lt;td class="confluenceTd" style="text-align: right;"&gt;9.03057&lt;/td&gt;
&lt;td class="confluenceTd" style="text-align: right;"&gt;10.12731&lt;/td&gt;
&lt;td class="confluenceTd" style="text-align: right;"&gt;9.98168&lt;/td&gt;
&lt;td class="confluenceTd" style="text-align: right;"&gt;15.60127&lt;/td&gt;
&lt;td class="confluenceTd" style="text-align: right;"&gt;24.16711&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;32bit vs 64bit&lt;/b&gt;
&lt;br /&gt;
In the mean time another two things occurred. On the one hand, another test machine, this time with 64bit OS, was built.The first results showed significant decrease of the load and the number of I/O (read) operation. Figure 1 and 2 are good indicator how drastic it was change, even if they were prepared on latter production boxes. Moreover, a change in some of the production server settings exhibited that the machine do not properly caching content served by Apache.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;a href="http://picasaweb.google.co.uk/lh/photo/h0UyUPoUf0pDeOHhQ5-oUw?authkey=Gv1sRgCI6x__ry94GnhgE&amp;amp;feat=embedwebsite"&gt;&lt;img src="http://lh6.ggpht.com/_jJpaSM2nWTM/S0Zset5JpYI/AAAAAAAABTY/Bog4kr3TLn8/s400/io.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;Figure 1. Load on a production system before and after changing OS from 32 to 64 flavour.&lt;/b&gt; 
&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;

&lt;/center&gt;&lt;center&gt;&lt;a href="http://picasaweb.google.co.uk/lh/photo/cEWSaUizOFX-AWdfBnIM3g?authkey=Gv1sRgCI6x__ry94GnhgE&amp;amp;feat=embedwebsite"&gt;&lt;img src="http://lh6.ggpht.com/_jJpaSM2nWTM/S0Zr9aQKnfI/AAAAAAAABS0/28Fyu7kugU0/s400/load.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;Figure 2. I/O operation on a production system before and after changing OS from 32 to 64 flavour.&lt;/b&gt; 
&lt;br /&gt;
&lt;/center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Further investigation of both phenomena showed that the &lt;a href="http://larryn.blogspot.com/2009/08/stone-redskin-comparision-of-apache2.html"&gt;I/O problem mentioned in the first part of article&lt;/a&gt; was cause by inefficient
caching, what was cause by memory wasting on a server with 32bit OS. By
default Apache is using the sendfile() function rather than the
combination of read() and write() functions to transfer files from a
storage to a network interface (so called &lt;a href="http://www.ibm.com/developerworks/linux/library/j-zerocopy/"&gt;zero copy&lt;/a&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=19023061&amp;amp;postID=5809845700506143345" name="N100FA"&gt; approach&lt;/a&gt;). It speeds up a data transfer
by avoiding switching context from kernel to user space, but it also
means that Apache cache is limited because on 32-bit OS it cannot
allocate more than 3GB of memory. &lt;br /&gt;
&lt;br /&gt;
To confirm that a 32bit OS was causing of performance issues another test on live system was conduct. When comparing two identical servers with 16GB of memory and 8&lt;b&gt; &lt;/b&gt;E5345 Xeon cores, one running a 32bit and second 64bit OS, following observation was made: &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;The load decreases from around 2 to 0.5 (Figure 1).&lt;/li&gt;
&lt;li&gt;The read from disk decreases from 2.5  to 0.6 [megabytes/second]&amp;nbsp; (Figure 2).&lt;/li&gt;
&lt;li&gt;The memory usages increase from 2.5-3 to 16 (full memory) GB.&lt;/li&gt;
&lt;li&gt;The average Apache speed increase from around 12  to 30 [bytes/microsecond] (Figure 3).&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;
&lt;a href="http://picasaweb.google.co.uk/lh/photo/TYnxZG-8YonW59hFMKHqCQ?authkey=Gv1sRgCI6x__ry94GnhgE&amp;amp;feat=embedwebsite"&gt;&lt;img src="http://lh3.ggpht.com/_jJpaSM2nWTM/S0ZzrXXrVII/AAAAAAAABTw/Et_BDjTMAnc/s400/16-8.png" /&gt;&lt;/a&gt;
&lt;br /&gt;
&lt;b&gt;Figure 3. Comparison of the Apache speed (speed of sending static content) on 32 and 64 bit OS.&amp;nbsp;&lt;/b&gt;&lt;/center&gt;&lt;center&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/center&gt;&lt;center&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&lt;/center&gt;
&lt;br /&gt;
&lt;b&gt;Summary&lt;/b&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;span style="font-size: small;"&gt;During the tests the SSD showed its superiority to the classical HDD storages. However in the case of serving a static content from a web server using a distributed memory &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-size: small;"&gt;caching technique might be faster, more scalable&amp;nbsp; and even cheaper solution.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;span style="font-size: small;"&gt;Another conclusion f&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-size: small;"&gt;rom above research&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-size: small;"&gt;, probably less and less important as there are less and less of x86 32bit servers, that 64 bit OS might be really faster, especially in the case of system with big amount of memory.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-5809845700506143345?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/5809845700506143345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=5809845700506143345' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5809845700506143345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5809845700506143345'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2010/01/64-vs-32-rather-then-ssd-vs-hdd.html' title='64 vs 32 rather then SSD vs HDD'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_jJpaSM2nWTM/S0Zset5JpYI/AAAAAAAABTY/Bog4kr3TLn8/s72-c/io.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-768990519329568955</id><published>2010-01-07T23:23:00.000+01:00</published><updated>2010-01-07T23:23:07.704+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='awk'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><category scheme='http://www.blogger.com/atom/ns#' term='sed'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Short (mostly shell) fomulas</title><content type='html'>If you hit this website looking for a Linux/shell/UNIX related advice you might want to visit my &lt;a href="http://identi.ca/wawrzek/"&gt;identi.ca&lt;/a&gt; account. I post "short, magic", Linux formula there now. You know something like:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;How to split lines in &lt;span class="tag"&gt;&lt;a href="http://identi.ca/tag/vim" rel="tag"&gt;VIM&lt;/a&gt;&lt;/span&gt;?&lt;/i&gt;&lt;br /&gt;
&lt;pre&gt;
s/\,/,[ctrl-V][Enter]/g&lt;/pre&gt; 
where &lt;b&gt;[ctrl-V][Enter]&lt;/b&gt; - means type Ctrl+V and next Enter (you should see  s/\,/,^M/g)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-768990519329568955?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/768990519329568955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=768990519329568955' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/768990519329568955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/768990519329568955'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2010/01/short-mostly-shell-fomulas.html' title='Short (mostly shell) fomulas'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-4787795726190891456</id><published>2009-11-13T20:49:00.001+01:00</published><updated>2009-11-17T00:41:04.295+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><title type='text'>noatime</title><content type='html'>If you need I/O performance bust it might worth to turn on &lt;b&gt;noatime&lt;/b&gt; flag on important partitions. Look down to see how it pushed down the read level on a server with Apache serving a static content. &lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/_jJpaSM2nWTM/Sv22Jkm87MI/AAAAAAAABQY/_1MUklJZmI0/s1600-h/noatime.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_jJpaSM2nWTM/Sv22Jkm87MI/AAAAAAAABQY/_1MUklJZmI0/s640/noatime.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
Usually I add &lt;b&gt;noatime&lt;/b&gt; flag during a system installation, but this time forgot about it and had to remount the file system. Thanks that mistake I got this beautiful image ;)&lt;br /&gt;
You can go even further and turn on &lt;b&gt;nodiratime&lt;/b&gt;, it should decrease read even more. &lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-4787795726190891456?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/4787795726190891456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=4787795726190891456' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/4787795726190891456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/4787795726190891456'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2009/11/noatime.html' title='noatime'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_jJpaSM2nWTM/Sv22Jkm87MI/AAAAAAAABQY/_1MUklJZmI0/s72-c/noatime.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-400815014386359876</id><published>2009-11-13T17:53:00.000+01:00</published><updated>2009-11-13T17:53:27.843+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mutt'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='msmtp'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>GMAIL and msmtp (Mutt)</title><content type='html'>This is the example how to configure the &lt;b&gt;msmtp&lt;/b&gt; (i.e. for &lt;b&gt;Mutt&lt;/b&gt;) to use thegmail smtp server. Remember that you need the certificate. I have got mine from old Ubuntu installation (Saving &lt;code&gt;/etc&lt;/code&gt; directory before reinstallation a box is good idea). 

&lt;br /&gt;
&lt;pre&gt;account your.user
logfile ~/.msmtp.log

tls on
tls_starttls on    
tls_trust_file /etc/ssl/certs/ca-certificates.crt
auth on

host smtp.gmail.com
port 587 
from your.user@gmail.com
user your.user@gmail.com
password YOUR_password
&lt;/pre&gt;
BTW, in Ubuntu you can grab certificate by &lt;i&gt;sudo apt-get install ca-certificates&lt;/i&gt;.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-400815014386359876?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/400815014386359876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=400815014386359876' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/400815014386359876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/400815014386359876'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2009/11/gmail-and-msmtp-mutt.html' title='GMAIL and msmtp (Mutt)'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-3365012823299725754</id><published>2009-10-25T19:15:00.001+01:00</published><updated>2009-10-25T19:16:42.067+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='awk'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><category scheme='http://www.blogger.com/atom/ns#' term='nagios'/><title type='text'>Nagios plugin</title><content type='html'>Not so long ago I heard the question if (or rather how) it is possible to write a NRPE plugin checking the resources utilization of an application. I'm using Nagios on the daily basis, but I haven't needed to write any plugin yet. When I went through existing plugins most/all of them checked resources on a server level. It makes sense, you are not so interested what exactly doing you server if your website/database is available and response fast. It especially true if you have 100, 500, 1000, ... servers. Anyway, I found the question interesting, even if was rather theoretical than practical one.

After some research I found &lt;a href="http://trilug.oldos.org/nagios_plugins/check_process"&gt;Jason Faulkner&lt;/a&gt; plugin which should be a good base, modified it a bit and created this script:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;#!/bin/bash 
#
# Nagios plugin to monitor a process. Can easily be modified to do 
# pretty much whatever you want.
#
# Licensed under LGPL version 2
# Copyright 2006 Broadwick Corporation
# By: Jason Faulkner jasonf@broadwick.com
#
# Modified to measure CPU usage of chosen process.
#
# USAGE: cpu.sh process_name warning_level critical_level
#
# Licensed under LGPL version 2
# Copyright 2009 Wawrzyniec Niewodniczański
# Modification by: Wawrzyniec Niewodniczański wawrzek@gmail.com

process_name=$1
WARLVL=$2
CRITLVL=$3

OKMSG="STATUS OK: ${process_name} running"
CRITMSG="STATUS CRITICAL: ${process_name} using more than ${CRITLVL} % of Memory"
WARNMSG="STATUS WARNING: &amp;gt;1 ${process_name} using more than  ${WARLVL} % of Memory"
UNKMSG="STATUS UNKNOWN: ${process_name}, check if process is running"

PROCESS=`ps axu | grep  -v ${0}|grep -v grep | grep ${process_name}`
CPU=`echo ${PROCESS}| awk '{cpu+=$3} END {printf "%d", cpu}'`

if [[ $PROCESS != "" ]]  
then 
        if (($CPU &amp;lt; $WARLVL))
        then
                echo "$OKMSG"
                exit 0
        elif (( "$CPU" &amp;lt; $CRITLVL ))
        then 
                echo "$WARNMSG"
                exit 1
        else 
                echo "$CRITMSG"
                exit 2
        fi  
else
        echo "$UNKMSG"
        exit 3
fi
&lt;/pre&gt;
I would say that it's nothing excited. There are two important lines. The first one searching the process name in output of &lt;b&gt;ps&lt;/b&gt; command and excluding the lines with script name and grep from the list. The another one using &lt;b&gt;awk&lt;/b&gt; to add value of CPU usage from the list created in first line.  BTW if you would prefer to check memory usage rather then processor, change &lt;i&gt;{cpu+=$3}&lt;/i&gt; to &lt;i&gt;{cpu+=$4}&lt;/i&gt; (or even to &lt;i&gt;{mem+=$4}&lt;/i&gt;) in &lt;b&gt;awk&lt;/b&gt; command. 

I also wrote the nagios command which I believe should work. "believe" not "know", as I haven't try it yet ;)&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;# 'check_cpu' command definition
define command{
        command_name    check_cpu
        command_line    /usr/lib/nagios/plugins/check_cpu $ARG1$ $ARG2$ $ARG3$
ń}&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;b&gt;Useful links&lt;/b&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="http://www.nagios.org/documentation"&gt;http://www.nagios.org/documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://debianclusters.cs.uni.edu/index.php/Creating_Your_Own_Nagios_Plugin"&gt;http://debianclusters.cs.uni.edu/index.php/Creating_Your_Own_Nagios_Plugin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ibm.com/developerworks/aix/library/au-nagios/index.html"&gt;http://www.ibm.com/developerworks/aix/library/au-nagios/index.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://lena.franken.de/nagios/own_service.html"&gt;http://lena.franken.de/nagios/own_service.html&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-3365012823299725754?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/3365012823299725754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=3365012823299725754' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/3365012823299725754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/3365012823299725754'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2009/10/nagios-plugin.html' title='Nagios plugin'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-5491406521949514030</id><published>2009-09-22T00:44:00.000+02:00</published><updated>2009-09-22T00:44:02.482+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='awk'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Escape, Escape</title><content type='html'>I couldn't understand why following command was working on a local machine, but not through ssh (following form):&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;ssh server \
"ls -l /var/log/httpd/*-20* \
| awk 'BEGIN {tsum=0} /sizetime/ {tsum += $5;} END {print tsum}'"&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
I asked my workmate and he also had problems for some time, but finally he suggested that we needed to "escape" something. After some try we found that ssh don't like $ character so following command works. 

&lt;br /&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;ssh server \
"ls -l /var/log/httpd/*-20* \
| awk 'BEGIN {tsum=0} /sizetime/ {tsum += \$5;} END {print tsum}'"
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-5491406521949514030?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/5491406521949514030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=5491406521949514030' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5491406521949514030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5491406521949514030'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2009/09/escape-escape.html' title='Escape, Escape'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-4352461258789949551</id><published>2009-08-27T22:41:00.028+02:00</published><updated>2009-09-10T23:03:35.805+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><title type='text'>Stone Redskin: comparision of Apache2 performance on HDD and SSD</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Introduction&lt;/span&gt;
&lt;br /&gt;
Recently, I had a chance to test the performance of a static content web servers. The initial analysis showed that the most important issue were the speed of a disks, which started to have problems with handling I/O operations. The numbers of files were huge what means that hard drives were engaged in many random access operation.&lt;br /&gt;
&lt;br /&gt;
The latest tests has shown that the new Solid State Disk (&lt;a href="http://en.wikipedia.org/wiki/Solid_State_Drive"&gt;SSD)&lt;/a&gt; mass storage beat the classic Hard Drive Disk (&lt;a href="http://en.wikipedia.org/wiki/Hard_disk_drive"&gt;HDD&lt;/a&gt;) in such circumstances (in most others too). So it was quite natural to prepare a set of test helping to measure the effect of switch from a HDD to a SSD storage on the Apache performance.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Methodology&lt;/span&gt;
&lt;br /&gt;
It should be keep in mind, that I wasn't interesting in a general comparison of SSD vs HDD, but concentrated my tests on the Apache performance. The &lt;a href="http://grinder.sourceforge.net/"&gt;Grinder 3.2&lt;/a&gt; software was used to simulate a load on the web server. The list of requested URL based on the real Apache logs taken from the one of box serving the static content. To eliminate the influence of caching, before each test the memory cache was cleaned using following command &lt;code&gt;echo 3 &gt; /proc/sys/vm/drop_caches&lt;/code&gt; (suggested on &lt;a href="http://linux-mm.org/Drop_Caches"&gt;Linux-MM&lt;/a&gt;).&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Hardware&lt;/span&gt;
&lt;br /&gt;
The test machine was the &lt;a href="http://www.sun.com/servers/x64/x4150/"&gt;Sun X4150&lt;/a&gt; server with a 8GB memory and 2 4-core Xeon E5345 @ 2.33GHz processors working under control of the 32 bit version of &lt;span style="font-weight: bold;"&gt;CentOS 5.2&lt;/span&gt; and the standard version of &lt;b&gt;Apache2  (2.2.3)&lt;/b&gt;. Finally, all data were served from &lt;span style="font-weight: bold;"&gt;ext3&lt;/span&gt; partitions with the &lt;span style="font-weight: bold;"&gt;noatime&lt;/span&gt; flag.&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Disks&lt;/span&gt;
&lt;br /&gt;
Following disks were used for tests.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;RAID 1 matrix consist of 2 classical rotating HDD with the root file system and the partition storing files for Apache (on LVM2 volume).
&lt;pre&gt;Vendor: Sun       Model: root              Rev: V1.0
Type:   Direct-Access                      ANSI SCSI revision: 02
SCSI device sda: 286494720 512-byte hdwr sectors (146685 MB)
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.intel.com/design/flash/nand/mainstream/index.htm"&gt;Standard Intel SSD&lt;/a&gt; storage with the partition holding Apache data.
&lt;pre&gt;Vendor: ATA       Model: INTEL SSDSA2MH16  Rev: 045C
Type:   Direct-Access                      ANSI SCSI revision: 05
SCSI device sdc: 312581808 512-byte hdwr sectors (160042 MB)
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;2 &lt;a href="http://www.intel.com/design/flash/nand/extreme/index.htm"&gt;Intela SSD Extreme&lt;/a&gt; disks joined into the one LVM2 volume. It was necessary to create a partition big enough to keep all data for Apache.
&lt;pre&gt;Vendor: ATA       Model: SSDSA2SH064G1GC   Rev: 045C
Type:   Direct-Access                      ANSI SCSI revision: 05
SCSI device sdd: 125045424 512-byte hdwr sectors (64023 MB)
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="font-weight: bold;"&gt;Measured parameters&lt;/span&gt;
&lt;br /&gt;
In the both table following acronyms has been used to describe measured parameters. (More info about them on &lt;a href="http://grinder.sourceforge.net/"&gt;Grinder&lt;/a&gt; web site.)&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Test - Test name&lt;/li&gt;
&lt;li&gt;MTT (ms) - Mean Test Time&lt;/li&gt;
&lt;li&gt;TTSD (ms) - Test Time Standard Deviation&lt;/li&gt;
&lt;li&gt;TPS -Transactions Per Second &lt;/li&gt;
&lt;li&gt;RBPS - Response Bytes Per Second&lt;/li&gt;
&lt;li&gt;MTTFB (ms) - Mean Time to First Byte&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="font-weight: bold;"&gt;3oo - first test&lt;/span&gt;
&lt;br /&gt;
In the first phase of tests I compared the Apache's performance serving  300 000 request using data stored on classic HDD as well as SSD.  Kernels from the 2.6 tree allow to choose a I/O scheduler. In theory the best scheduler for&amp;nbsp; SSD devices is &lt;a href="http://en.wikipedia.org/wiki/Noop_scheduler"&gt;Noop&lt;/a&gt;, therefore in table below I compared results for the mentioned and default (CFQ) schedulers.
&lt;br /&gt;
&lt;div&gt;
&lt;table style="text-align: right;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th width="14%"&gt;Test&lt;/th&gt;
&lt;th width="15%"&gt;MTT (ms)&lt;/th&gt;
&lt;th width="15%"&gt;TTSD (ms)&lt;/th&gt;
&lt;th width="16%"&gt;TPS&lt;/th&gt;
&lt;th width="24%"&gt;RBPS&lt;/th&gt;
&lt;th width="16%"&gt;MTTFB (s)&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="s3"&gt;HDD CFQ&lt;/td&gt;
&lt;td&gt;5.53&lt;/td&gt;
&lt;td&gt;8.17&lt;/td&gt;
&lt;td&gt;179.51&lt;/td&gt;
&lt;td&gt;1231607.13&lt;/td&gt;
&lt;td&gt;5.3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="s3"&gt;HDD Noop&lt;/td&gt;
&lt;td&gt;5.53&lt;/td&gt;
&lt;td&gt;8.09&lt;/td&gt;
&lt;td&gt;179.30&lt;/td&gt;
&lt;td&gt;1230119.51&lt;/td&gt;
&lt;td&gt;5.29&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="s3"&gt;SSD CFQ&lt;/td&gt;
&lt;td&gt;0.77&lt;/td&gt;
&lt;td&gt;3.06&lt;/td&gt;
&lt;td&gt;1226.55&lt;/td&gt;
&lt;td&gt;8415044.64&lt;/td&gt;
&lt;td&gt;0.56&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="s3"&gt;SSDn Noop&lt;/td&gt;
&lt;td&gt;0.74&lt;/td&gt;
&lt;td&gt;2.77&lt;/td&gt;
&lt;td&gt;1280.17&lt;/td&gt;
&lt;td&gt;8782969.21&lt;/td&gt;
&lt;td&gt;0.56&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="s3"&gt;SSDe CFQ&lt;/td&gt;
&lt;td&gt;0.73&lt;/td&gt;
&lt;td&gt;2.55&lt;/td&gt;
&lt;td&gt;1280.23&lt;/td&gt;
&lt;td&gt;8783381.50&lt;/td&gt;
&lt;td&gt;0.52&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="s3"&gt;SSDe Noop&lt;/td&gt;
&lt;td&gt;0.71&lt;/td&gt;
&lt;td&gt;3.05&lt;/td&gt;
&lt;td&gt;1326.62&lt;/td&gt;
&lt;td&gt;9101643.04&lt;/td&gt;
&lt;td&gt;0.53&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
How we expected, the SSD disks (or rather Apache with content on them) proved to be much faster. The web server performance grown about 10 times when a HDD were substituted by a SSD. Another observation worth to note is that the results obtained using both sets of the SSD disks were very similar. Extreme Edition storages were few percent faster, but the different is probably too small to be the only reason to justify the higher cost. Additionally, it was clear that the Noop scheduler didn't dramatical change the Apache performance.&lt;/div&gt;
&lt;span style="font-weight: bold;"&gt;One hour data&lt;/span&gt;
&lt;br /&gt;
It's obvious that 300k requests may not enough to show the full and true image, therefore I repeated test with a bigger set of data based on 1 hour worthy log. During that hour the original server had responded to 1 341 489 queries, but during creation of the file with input data for Grinder I saved the list of URL twice, therefore grinder was sending 2 682 978 queries during the test.&lt;br /&gt;
The results are presented in the next table. To the data collected from Grinder I added one more number, TT — the total time of the test, that is how long  it took Grinder to send all the requests.

&lt;br /&gt;
&lt;div&gt;
&lt;table style="text-align: right;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th width="12%"&gt;Test&lt;/th&gt;
&lt;th width="12%"&gt;MTT (ms)&lt;/th&gt;
&lt;th width="12%"&gt;TTSD (ms)&lt;/th&gt;
&lt;th width="15%"&gt;TPS&lt;/th&gt;
&lt;th width="20%"&gt;RBPS&lt;/th&gt;
&lt;th width="15%"&gt;MTTFB (s)&lt;/th&gt;
&lt;th width="14%"&gt;TT (h:m)&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HDD CFQ&lt;/td&gt;
&lt;td&gt;2.65&lt;/td&gt;
&lt;td&gt;5.29&lt;/td&gt;
&lt;td&gt;371.71&lt;/td&gt;
&lt;td&gt;2145301.3&lt;/td&gt;
&lt;td&gt;2.45&lt;/td&gt;
&lt;td&gt;02:00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SSDn CFQ&lt;/td&gt;
&lt;td&gt;0.63&lt;/td&gt;
&lt;td&gt;3.19&lt;/td&gt;
&lt;td&gt;1495.3&lt;/td&gt;
&lt;td&gt;8630105.68&lt;/td&gt;
&lt;td&gt;0.43&lt;/td&gt;
&lt;td&gt;00:29&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SSDn Noop&lt;/td&gt;
&lt;td&gt;0.64&lt;/td&gt;
&lt;td&gt;2.52&lt;/td&gt;
&lt;td&gt;1478.77&lt;/td&gt;
&lt;td&gt;8534692.28&lt;/td&gt;
&lt;td&gt;0.43&lt;/td&gt;
&lt;td&gt;00:30&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SSDe CFQ&lt;/td&gt;
&lt;td&gt;0.59&lt;/td&gt;
&lt;td&gt;2.93&lt;/td&gt;
&lt;td&gt;1594.06&lt;/td&gt;
&lt;td&gt;9200064.95&lt;/td&gt;
&lt;td&gt;0.42&lt;/td&gt;
&lt;td&gt;00:28&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SSDe Noop&lt;/td&gt;
&lt;td&gt;0.61&lt;/td&gt;
&lt;td&gt;2.62&lt;/td&gt;
&lt;td&gt;1530.84&lt;/td&gt;
&lt;td&gt;8835205.22&lt;/td&gt;
&lt;td&gt;0.42&lt;/td&gt;
&lt;td&gt;00:29&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
The increase of the queries number diminished the difference between the SSD and HDD disk performance, but also in second test the former storage was firm winner. I.e. the Total Time of test was 4 time shorter for any version of the SSD compare to the traditional disks. Another interesting observation is that difference in performance of Mainstream and Extreme disks decreased. Finally,   the Noop scheduler didn't improve the results of that test too.&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Summary&lt;/span&gt;
&lt;br /&gt;
The results shown in the current study, as well as other not presented above, confirmed the hypothesis that SSD disks might be a good remedy for observed I/O problems. In the few weeks time you might expect some kind of appendix in which I will describe if baptism of fire on the battlefield of the web come off as well as the preliminary tests.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-4352461258789949551?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/4352461258789949551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=4352461258789949551' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/4352461258789949551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/4352461258789949551'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2009/08/stone-redskin-comparision-of-apache2.html' title='Stone Redskin: comparision of Apache2 performance on HDD and SSD'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-1299464709141962640</id><published>2009-08-25T23:16:00.005+02:00</published><updated>2009-08-26T00:44:14.176+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Linux Works in Cambridge</title><content type='html'>Some time ago I created the "Linux Jobs in Cambridge" map on Google Maps, but something was wrong. Recently, I decided that the title was not very propriety. It's not the map of Linux related opportunities, but the map showing how important is Linux and general Open Sources for Cambridge. So I changed the name to "Linux Work in Cambridge" and it seems to be the right idea. There are some new very interesting entries (even one pub). Cheek it out yourself, and maybe add or correct something.&lt;/p&gt;
&lt;p&gt;
&lt;iframe marginheight="0" marginwidth="0" src="http://www.google.co.uk/maps/ms?ie=UTF8&amp;amp;hl=en&amp;amp;msa=0&amp;amp;msid=116257976395264086847.0004593ed5b1f40f48fd4&amp;amp;t=h&amp;amp;ll=52.18915,0.148049&amp;amp;spn=0.111251,0.112166&amp;amp;output=embed" scrolling="no" width="525" frameborder="0" height="420"&gt;&lt;/iframe&gt;
&lt;small&gt;View &lt;a href="http://www.google.co.uk/maps/ms?ie=UTF8&amp;amp;hl=en&amp;amp;msa=0&amp;amp;msid=116257976395264086847.0004593ed5b1f40f48fd4&amp;amp;t=h&amp;amp;ll=52.18915,0.148049&amp;amp;spn=0.111251,0.112166&amp;amp;source=embed" style="color: rgb(0, 0, 255); text-align: left;"&gt;Linux Works in Cambridge&lt;/a&gt; in a larger map.&lt;/small&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-1299464709141962640?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/1299464709141962640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=1299464709141962640' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1299464709141962640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1299464709141962640'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2009/08/linux-works-in-cambridge.html' title='Linux Works in Cambridge'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-2073803039387658167</id><published>2009-08-21T21:35:00.004+02:00</published><updated>2009-08-21T23:11:00.720+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='expect'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Expect and operation on many computers</title><content type='html'>Recently, I had to delete a directory on around 200 computers. The directory belonged to root, so using my account with public key authentication wasn't possible. I googled a bit, found the &lt;a href="http://expect.nist.gov/"&gt;expect&lt;/a&gt; and wrote the following script.
&lt;pre&gt;#!/usr/bin/expect -f

set machine [lindex $argv 0]
set command [lindex $argv 1]
set timeout -1
spawn ssh -l root $machine $command
match_max 100000

expect "?*assword: $"
send "password\n"

expect eof
&lt;/pre&gt; The script sets the name of a remote machine &lt;code&gt;(set machine [lindex $argv 0])&lt;/code&gt; and a command &lt;code&gt;(set command [lindex $argv 1])&lt;/code&gt; to execute from  arguments it is started with. Next tries to connect to the remote machine (&lt;code&gt;spawn ssh -l root $machine $command&lt;/code&gt;) and when it's asked  for the password (&lt;code&gt;expect "?*assword: $"&lt;/code&gt;) send it (&lt;code&gt;send "password\n"&lt;/code&gt;). Of course you have to change the password to the root password. Finally, it waits for the EOF from ssh (&lt;code&gt;expect eof&lt;/code&gt;). I have confess that I don't remember what exactly &lt;code&gt;set timeout -1&lt;/code&gt; and &lt;code&gt;match_max 100000&lt;/code&gt;  means ;)

The script can be called with loop similar to one below.
&lt;pre&gt;for cell in 1{0..3}{0..9} ;\
do for box in {1..4} ;\
do echo  c${bc}-box0${app} ; \
./command.script bc${bc}app-0${app} "ls /var/log/httpd" ; \
done; \
done
&lt;/pre&gt;One more thing. The script assumes that you has connected at least one to all machines or rather  that the machines has been added to your &lt;code&gt;.ssh/know_hosts&lt;/code&gt; file. If you plan to use script to initialize the first connection you should add following line
&lt;pre&gt;expect "Are you sure you want to continue connecting (yes/no)?"
send "yes\n"&lt;/pre&gt;
before the line &lt;code&gt;expect "?*assword: $"&lt;/code&gt;, but in such case all machine haven't to be present in &lt;code&gt;.ssh/know_hosts&lt;/code&gt; file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-2073803039387658167?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/2073803039387658167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=2073803039387658167' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/2073803039387658167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/2073803039387658167'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2009/08/expect-and-operation-on-many-computers.html' title='Expect and operation on many computers'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-846361293394842449</id><published>2009-08-18T11:11:00.004+02:00</published><updated>2009-08-18T11:37:34.536+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>How to find the not commented line using Vim</title><content type='html'>The significant part of &lt;a href="http://www.theregister.co.uk/odds/bofh/"&gt;BOFH's&lt;/a&gt; live consist of editing config files. It's not so uncommon that you need find not commented lines (i.e. to find it something is set). With &lt;span style="font-weight:bold;"&gt;vim&lt;/span&gt; it's very easy:
&lt;pre&gt;
/^[^#]
&lt;/pre&gt;
The above line command the editor to: &lt;span style="font-style:italic;"&gt;find a line which doesn't start with &lt;code&gt;#&lt;/code&gt;&lt;/span&gt; or rather: &lt;span style="font-style:italic;"&gt;find a string which is at the beginning of a line with the first character anything else then &lt;code&gt;#&lt;/code&gt;&lt;/span&gt;.

This advice will work not only for vim i.e. you can use it in &lt;span style="font-weight:bold;"&gt;grep&lt;/span&gt; as well:
&lt;pre&gt;
[user@server]$ grep  "^[^#]" modprobe.conf 
alias eth0 tg3
alias eth1 tg3
alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptspi
&lt;/pre&gt;

I discussed the similar case some time ago in this note: &lt;a href="http://larryn.blogspot.com/2009/03/how-to-find-line-not-starting-with-x-in.html"&gt;How to find line not starting with X in Vim&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-846361293394842449?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/846361293394842449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=846361293394842449' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/846361293394842449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/846361293394842449'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2009/08/how-to-find-not-commented-line-using.html' title='How to find the not commented line using Vim'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-2339315420660126317</id><published>2009-08-04T20:47:00.005+02:00</published><updated>2009-08-05T12:15:49.622+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Reading from rather big files in Python</title><content type='html'>Recently I needed to open the big file (apache log - 14 GB or so) and cut some information from it. Of course use of &lt;span style="font-weight: bold;"&gt;file.read()&lt;/span&gt; and/or &lt;span style="font-weight: bold;"&gt;file.readlines()&lt;/span&gt; method wasn't possible. On the other hand, using&lt;span style="font-weight: bold;"&gt; file.readline()&lt;/span&gt; few (rather more than 20) million times doesn't sound right. Therefore, I looked for another resolution and found that you can limit the size of &lt;span style="font-weight: bold;"&gt;readlines&lt;/span&gt;().
&lt;pre&gt;
f=open('filename','r')
opensize=2**27
longlist=[]
while 1:
   shortlist=[[l.split()[n] for n in [0,4,-2,-1]] for l in f.readlines(opensize)]
   if not list:
       break
   else:
       longlist.extend(shortlist)

&lt;/pre&gt;The script open the 'filename' file and next in the loop:
&lt;ul&gt;&lt;li&gt;read from that file lines of size close to 128 Mb (2**27),
&lt;/li&gt;&lt;li&gt;cut first, fifth, next to last and last column from each line,&lt;/li&gt;&lt;li&gt;add created (temporary) list to the output list.
&lt;/li&gt;&lt;/ul&gt;It's worth to note that if &lt;pre&gt;shortlist&lt;/pre&gt; is not created the script will leave the loop (lines 6 and 7).
It not obligatory, but I like to work with 2 powers, therefore opensize=2**27.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-2339315420660126317?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/2339315420660126317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=2339315420660126317' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/2339315420660126317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/2339315420660126317'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2009/08/reading-from-rather-big-files-in-python.html' title='Reading from rather big files in Python'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-3446730060097546970</id><published>2009-06-22T17:15:00.008+02:00</published><updated>2009-07-31T22:03:32.715+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='awk'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='subversion'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>one for AWK and one for SVN</title><content type='html'>Another two useful one liner.

First &lt;span style="font-weight:bold;"&gt;awk&lt;/span&gt;. Sometimes you need to grab last "element" of lines in a file which has different numbers of spaces (or other separator). In such case use variable &lt;span style="font-weight:bold;"&gt;$NF&lt;/span&gt; (or &lt;span style="font-weight:bold;"&gt;$NF-1&lt;/span&gt;, &lt;span style="font-weight:bold;"&gt;$NF-2&lt;/span&gt;...). Good example for such situation might be apache log file, where user agent description is a string with various number of spaces, so it's hard to get columns after that. But you can use something similar to:

&lt;pre&gt; tail bo-access_log.2009-06-22 | \
awk '{print "size:\t"$(NF-1) "\t time:\t" $NF}'&lt;/pre&gt;

In the example log file the time is the last and size of file next to last field. Of course you can type it in one line. But Then you have to remove '\' character from end of first line.


Second advice is related to &lt;span style="font-weight:bold;"&gt;SVN&lt;/span&gt;. I found reverting last submitted changes quite not clear there. Revert works only with no committed changes, so I used the command similar to below one.

&lt;pre&gt; svn merge -r HEAD:{2009-06-21} .&lt;/pre&gt;

The example reverts everything what has been submitted between 21st June 2009 and 'now'. However, today I found that &lt;span style="font-weight:bold;"&gt;PREV&lt;/span&gt; 'variable', so the following command should do I had wanted to achieve. Interesting how could I missed it?

&lt;pre&gt; svn merge -r HEAD:PREV .&lt;/pre&gt;

And one more update. In &lt;span style="font-weight:bold;"&gt;petke&lt;/span&gt; comments to this &lt;a href="http://aralbalkan.com/1381"&gt;entry&lt;/a&gt; in Aral Balkan blog I found another one liner, which looks event easier:

&lt;pre&gt;svn update -r 2689&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-3446730060097546970?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/3446730060097546970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=3446730060097546970' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/3446730060097546970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/3446730060097546970'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2009/06/awk-and-svn.html' title='one for AWK and one for SVN'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-1216272668605788347</id><published>2009-05-06T11:04:00.009+02:00</published><updated>2009-05-28T10:59:26.205+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Vim substitution</title><content type='html'>Let say that you want to add string 'bprdp' and the end of each line beginning with string 'bc' and ending with comma you should use following command:
&lt;pre&gt;:% g/^bc/s/\,$/, bprdp/&lt;/pre&gt;&lt;span style="font-weight: bold;"&gt;%&lt;/span&gt; means the whole file
&lt;span style="font-weight: bold;"&gt;g/&lt;/span&gt; for each line with pattern after '/' in above case pattern is &lt;span style="font-weight: bold;"&gt;^bc&lt;/span&gt; line beginning with bc
&lt;span style="font-weight: bold;"&gt;s/\,$/, bprdb/&lt;/span&gt; substitute comma (&lt;span style="font-weight: bold;"&gt;\,&lt;/span&gt;) followed by end of line character (&lt;span style="font-weight: bold;"&gt;$&lt;/span&gt;) with ', bprdb'.&lt;/p&gt;
&lt;p&gt;
I wrote this message based on &lt;a href="http://www.geocities.com/volontir/"&gt;Vim regular expression&lt;/a&gt; and &lt;a href="http://bullium.com/support/vim.html"&gt;Vim Command Cheat Sheet&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-1216272668605788347?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/1216272668605788347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=1216272668605788347' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1216272668605788347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1216272668605788347'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2009/05/vim-substitution.html' title='Vim substitution'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-1412549929378738795</id><published>2009-03-11T16:35:00.006+01:00</published><updated>2011-02-12T01:24:52.775+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Control the Vim from the edited file</title><content type='html'>One of the very nice Vim feature I've learnt recently is the possibility of controlling the Vim from a edited file. Chosen Vim commands may to be put in one of the first (specially formatted) file lines. The line format is describe in 'modeline' help keyword (&lt;code&gt;:help modeline&lt;/code&gt;). It worth to remember that text before and after main part has to be commenting out directive. Therefore, for example the line in HTML might looks similar to:
&lt;br /&gt;
&lt;pre&gt;&amp;lt;-- vim: set tabstop=4 noexpandtab:--&amp;gt;&lt;/pre&gt;
for python:&lt;br /&gt;
&lt;pre&gt;# vim: tabstop=4 noexpandtab:&lt;/pre&gt;
If you like to learn more please check the &lt;span style="font-style: italic;"&gt;modeline&lt;/span&gt; keyword in Vim help.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;update&lt;/b&gt;: I forgot to add that you need to &lt;b&gt;set modeline&lt;/b&gt; in .vimrc file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-1412549929378738795?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/1412549929378738795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=1412549929378738795' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1412549929378738795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1412549929378738795'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2009/03/control-vim-from-edited-file.html' title='Control the Vim from the edited file'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-5379625911490970844</id><published>2009-03-10T17:42:00.004+01:00</published><updated>2009-03-11T17:26:15.407+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>My first Perl script</title><content type='html'>It's nothing big, but it's the first one and, as Perl is write only language, I'd better add the short description.

The script takes a list of files passed as arguments to the command; reads all lines (http addresses) from them and creates the list of unique domains names. 

&lt;pre&gt;#!/usr/bin/env perl

%seen = ();
foreach (@ARGV)
{
open (LFILE,"$_");

for $line (&lt;lfile&gt;)
{
       @sline=split(/\//,$line);
       print ("@sline[2]\n") unless $seen{@sline[2]}++;
}

close LFILE;
}&lt;/lfile&gt;&lt;/pre&gt;

Perl tutorial from &lt;a href="http://www.tizag.com/perlT/index.php"&gt;tizag.com&lt;/a&gt; was helpful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-5379625911490970844?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/5379625911490970844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=5379625911490970844' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5379625911490970844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5379625911490970844'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2009/03/my-first-perl-script.html' title='My first Perl script'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-687839597133526911</id><published>2009-03-09T16:26:00.005+01:00</published><updated>2009-09-10T23:05:20.107+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MacOSX'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>DarwinPorts via proxy</title><content type='html'>Recently, I needed a perl module not present on my MacOSX computer, which was behind a proxy. The &lt;a href="http://brunorc.wordpress.com/"&gt;friend&lt;/a&gt; suggested to use the &lt;a href="http://darwinports.com/"&gt;Darwin ports&lt;/a&gt; rather the Perl from Apple. I downloaded and installed it to found I cannot install any port. The problem was due to the combination of using a proxy and the sudo rather then the root user. I guess such combination is rather common among MacOSX-perl users. So below I present the command which allows to use the Darwin ports from a normal MacOSX account. Generally note, you have to export both the &lt;b&gt;RSYNC_PROXY&lt;/b&gt; as well as the &lt;b&gt;http_proxy&lt;/b&gt; in the sudo environment.
&lt;pre&gt;
sudo sh -c "export RSYNC_PROXY=proxy.server:port; \
export http_proxy=http://proxy.server:port; \
port install perl5.10 "
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-687839597133526911?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/687839597133526911/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=687839597133526911' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/687839597133526911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/687839597133526911'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2009/03/darwinports-via-proxy.html' title='DarwinPorts via proxy'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-643482868006227333</id><published>2009-03-06T16:05:00.003+01:00</published><updated>2009-08-18T11:10:55.986+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>How to find the line not starting with "X" in Vim</title><content type='html'>I don't know why but most of Vim's search examples say nothing about how to find the line not starting with string "&lt;span style="font-style: italic;"&gt;X&lt;/span&gt;". Finally, I found how to do this. I.e. following line find anything not started from &lt;span style="font-style: italic;"&gt;del&lt;/span&gt;:
&lt;pre&gt;
^[^d][^e][^l].*
&lt;/pre&gt;
For people not advance in regex. The consecutive signs means:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;^&lt;/code&gt; - a line starting with&lt;/li&gt;
&lt;li&gt;&lt;code&gt;[^d]&lt;/code&gt; - character other than d;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;[^e]&lt;/code&gt; - character other than e;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;[^l]&lt;/code&gt; - character other than l;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.*&lt;/code&gt; - any string (any character repeated any times).&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-643482868006227333?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/643482868006227333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=643482868006227333' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/643482868006227333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/643482868006227333'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2009/03/how-to-find-line-not-starting-with-x-in.html' title='How to find the line not starting with &quot;X&quot; in Vim'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-3571926298217010447</id><published>2009-02-24T17:54:00.003+01:00</published><updated>2009-05-06T15:43:23.814+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='awk'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Total size of quite new files</title><content type='html'>Following command count the size of all files (-type f) newer than 10 days (-mtime -10). The size is printed in megabytes. "%k" argument of printf returns size in kilobytes, but "a/1024" in awk change it to megabytes.

&lt;pre&gt;
find -type f -mtime -10 -printf "%k\n"| \
 awk 'BEGIN {a=0} {a=a+$1} END {print a/1024}'&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-3571926298217010447?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/3571926298217010447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=3571926298217010447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/3571926298217010447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/3571926298217010447'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2009/02/total-size-of-quite-new-files.html' title='Total size of quite new files'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-328485943745949609</id><published>2009-01-28T16:52:00.005+01:00</published><updated>2009-09-10T23:06:34.637+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Remote diff</title><content type='html'>When you are working as a Linux SysAdmin quite often you have to compare files from two different machines. I found (&lt;a href="http://www.barneyb.com/barneyblog/2005/09/20/remote-diff/%20"&gt;here&lt;/a&gt;) the script which made my life easier, but after some time decided to customize and extent it a bit.

Usually I compare file in the same location therefore the first argument of my script is file path. I also gave chance user to pass an argument for the diff command (4th argument, the default is '-b').
&lt;pre&gt;
#!/bin/bash
#
# this acts as a remote diff program, accepting two files and displaying
# a diff for them.  Zero, one, or both files can be remote.  File paths
# must be in a format `scp` understands: [[user@]host:]file

[ -n "$1" ] || [ -n "$2" ] || [ -n "$3" ] || \
{ echo "Usage: `basename $0` file1 server1 server2" &amp;amp;&amp;amp; exit 1;}

if test -e $4 
then
       opt="-b"
else
       opt=$4
fi

scp "$2:$1" rdiff.1 &gt;&amp;amp; /dev/null
scp "$3:$1" rdiff.2 &gt;&amp;amp; /dev/null
diff $opt rdiff.1 rdiff.2
rm -f rdiff.1 rdiff.2
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-328485943745949609?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/328485943745949609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=328485943745949609' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/328485943745949609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/328485943745949609'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2009/01/remote-diff.html' title='Remote diff'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-2038072967808648728</id><published>2008-12-29T16:25:00.005+01:00</published><updated>2009-01-15T15:02:22.585+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='pictures'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>How to create pictures thums in the one line</title><content type='html'>The following command can be paste as a one line
&lt;pre&gt;for i in `find /path/to/directory/with/pictures  -iname "*.JPG"`;\
do\
convert $i -resize 800x600 `dirname $i`/thumb-`basename $i`;\
done&lt;/pre&gt;
The &lt;code&gt;find&lt;/code&gt; command return a whole path to a file. But we want to add &lt;span style="font-weight: bold; font-style: italic;"&gt;thumb-&lt;/span&gt; before the actual name of a file. Therefore &lt;code&gt;`dirname $i`&lt;/code&gt; ensure that &lt;code&gt;convert&lt;/code&gt; get the proper path and &lt;code&gt;`basename $i`&lt;/code&gt; the actual file name (preceded by &lt;span style="font-weight:bold; font-style: italic;"&gt;thumb-&lt;/span&gt;).

It is also worth to note the &lt;span style="font-weight: bold; font-style: italic;"&gt;iname&lt;/span&gt; option of find command. It is case insensitive version of the &lt;code&gt;name&lt;/code&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-2038072967808648728?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/2038072967808648728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=2038072967808648728' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/2038072967808648728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/2038072967808648728'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/12/how-to-create-pictures-thums-in-one.html' title='How to create pictures thums in the one line'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-5650597923455119224</id><published>2008-12-22T11:58:00.005+01:00</published><updated>2008-12-22T14:52:56.695+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='awk'/><category scheme='http://www.blogger.com/atom/ns#' term='gnuplot'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Another Awk one-liner</title><content type='html'>This one-liner printing third word from the lines beginning with "Mem:" (precisely the lines which first word is "Mem:") but adding the serial number before the word.
&lt;pre&gt;awk 'BEGIN {a=1} \
{if ( $1 == "Mem:" ) \
  {printf "%4d  %s\n",  a, $3; a++}}' \
free-prefork.log &gt;mem-prefork.log&lt;/pre&gt;

BTW. This script is to help me to plot a &lt;a style="font-weight: bold;" href="http://gnuplot.info/"&gt;gnuplot&lt;/a&gt; graph based on "used memory" number from &lt;span style="font-weight: bold;"&gt;free&lt;/span&gt; command. &lt;code&gt;plot "mem-prefork.log"&lt;/code&gt; will do the rest of job.

&lt;span style="font-weight:bold;"&gt;UPDATE&lt;/span&gt;
&lt;a href="http://glandium.org/blog/?p=220"&gt;Mike Hommey post&lt;/a&gt; force me to rethink my scripts and I found easy way to eliminate if clause:
&lt;pre&gt;awk 'BEGIN {a=1} \
/^Mem:/  {printf "%4d  %s\n",  a, $3; a++}' \
free-prefork.log &gt;mem-prefork.log&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-5650597923455119224?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/5650597923455119224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=5650597923455119224' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5650597923455119224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5650597923455119224'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/12/another-awk-one-liner.html' title='Another Awk one-liner'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-6428917289982067903</id><published>2008-12-08T18:15:00.005+01:00</published><updated>2008-12-29T12:44:39.352+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MacOSX'/><category scheme='http://www.blogger.com/atom/ns#' term='gnuplot'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><category scheme='http://www.blogger.com/atom/ns#' term='sed'/><title type='text'>Gnuplot with readline on MacOSX</title><content type='html'>Recently, I tried to use &lt;a href="http://gnuplot.info/"&gt;gnuplot&lt;/a&gt; on a Mac, and, of course, it wasn't working properly. Apple prepared and shipped with MacOS its own (broken) version of readline library with didn't work with gnuplot (known bug). So I grabbed the sources of readline, applied all of patches and built mine version of readline. Next, I added the proper option to gnuplot &lt;font style="font-weight: bold;"&gt;configure&lt;/font&gt; file, but it wasn't pass to makefile. I looked into the Makefiles and found the the &lt;font style="font-style: italic;"&gt;TERMLIBS&lt;/font&gt; option had to be change. I.e. using such command:
&lt;pre&gt;find . -name Makefile \
-exec sed -i.old "s/TERMLIBS\ =/TERMLIBS = -L\/usr\/local\/lib/" {} \; &lt;/pre&gt;

Two more things about gnuplot and MacOSX.
&lt;ol&gt;&lt;li&gt;I started to think to make a gnuplot.app for MacOSX, but sure how it should work.
&lt;/li&gt;&lt;li&gt;I found that X11 term is much better then Aqua, in particular, it's allow to rotate 3D (s)plots.
&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-6428917289982067903?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/6428917289982067903/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=6428917289982067903' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/6428917289982067903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/6428917289982067903'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/12/gnuplot-with-readline-on-macosx.html' title='Gnuplot with readline on MacOSX'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-3324508847998360678</id><published>2008-12-02T14:36:00.005+01:00</published><updated>2011-01-07T14:55:38.296+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Header for bonnie++ csv file</title><content type='html'>Recently I started to use &lt;a href="http://www.coker.com.au/bonnie++/"&gt;bonnie++&lt;/a&gt; to perform some disk tests. One of the thing annoy me is that bonnie++ output has no the 'csv header' describing what is in which column. It makes overview of results in a spreadsheet rather hard. Therefore I created my own one. 
&lt;pre&gt;,,Sequential,Output,,,,,Sequential,Input,,,Random,,Sequential,Create,,,,,Random,Create,
,,Per Chr, ,Block, ,Rewrite, ,Per Chr, ,Block, ,Seeks, ,Create, ,Read, ,Delete, ,Create, ,Read, ,Delete
Machine,Size,K/sec,%CP,K/sec,%CP,K/sec,%CP,K/sec,%CP,K/sec,%CP,/sec,%CP,files,/sec,%CP,/sec,%CP,/sec,%CP,/sec,%CP,/sec,%CP,/sec,%CP&lt;/pre&gt;You can save above lines in the file called i.e. &lt;span style="font-style: italic;"&gt;bonnie-header.csv&lt;/span&gt; and then cat it before csv part of &lt;span style="font-style: italic;"&gt;bonnie.out&lt;/span&gt; file (of course it can have different name), by:
&lt;pre&gt;cat bonnie-header.csv `tail -1 bonnie.out` &gt;bonnie.csv&lt;/pre&gt;
After that the output should looks similar to this one:
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_jJpaSM2nWTM/STU-EYoQT-I/AAAAAAAAAxQ/42siN_gnlQQ/s1600-h/Picture+2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 53px;" src="http://1.bp.blogspot.com/_jJpaSM2nWTM/STU-EYoQT-I/AAAAAAAAAxQ/42siN_gnlQQ/s400/Picture+2.png" alt="" id="BLOGGER_PHOTO_ID_5275190783586095074" border="0" /&gt;&lt;/a&gt;

BTW. I found that default number of files creating for metadata benchmarks is low, so I increased it to 128.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-3324508847998360678?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/3324508847998360678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=3324508847998360678' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/3324508847998360678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/3324508847998360678'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/12/header-for-bonnie-csv-file.html' title='Header for bonnie++ csv file'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_jJpaSM2nWTM/STU-EYoQT-I/AAAAAAAAAxQ/42siN_gnlQQ/s72-c/Picture+2.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-2921582415413229801</id><published>2008-11-25T10:53:00.005+01:00</published><updated>2008-12-02T15:10:08.160+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pictures'/><category scheme='http://www.blogger.com/atom/ns#' term='astronomy'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>BigPicture</title><content type='html'>I don't know how I might not to add this earlier but I didn't.

&lt;a href="http://www.boston.com/bigpicture/"&gt;The Big Picture&lt;/a&gt; it's a on-line addition to &lt;a href="http://boston.com/"&gt;Boston Globe&lt;/a&gt; (I guess it only on-line, but I don't reader Boston Globe, as I'm leaving in proper Cambridge, at least at the moment). 
I saw it first time on &lt;a href="http://blogs.discovermagazine.com/badastronomy/"&gt;Bad Astronomy Blog&lt;/a&gt;. That story was about picture of &lt;a href="http://www.boston.com/bigpicture/2008/06/the_sky_from_above.html"&gt;our sky but made from above&lt;/a&gt;. The pictures were amazing, but what more important that Big Picture brings new great pictures month after month. It's quite interesting how many of them are space/astronomy related, i.e. this one:


&lt;div style="text-align: center;"&gt;&lt;a href="http://cache.boston.com/universal/site_graphics/blogs/bigpicture/jup_07_25/jup1.jpg"&gt;&lt;img style="max-width: 450px;" src="http://cache.boston.com/universal/site_graphics/blogs/bigpicture/jup_07_25/jup1.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-2921582415413229801?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/2921582415413229801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=2921582415413229801' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/2921582415413229801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/2921582415413229801'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/11/bigpicture.html' title='BigPicture'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-1137175364480480455</id><published>2008-10-24T01:10:00.004+02:00</published><updated>2008-10-31T14:42:39.073+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='desktop'/><category scheme='http://www.blogger.com/atom/ns#' term='X11'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Polish UK X11 keybord layout</title><content type='html'>The UK and US keyboard layout are different. Polish one, as probably most other ones based on American. It's fine in Poland, but not so fine in UK. Therefore, I decided to create Polish layout, but based on UK keyboard. I based on Mikoła Kosmulski &lt;a href="http://hektor.umcs.lublin.pl/~mikosmul/computing/articles/custom-keyboard-layouts-xkb.html"&gt;article&lt;/a&gt; describing how to prepare mixture of Polish and German layouts. 

My kebord setting looks this way:
&lt;pre&gt;
partial default alphanumeric_keys
xkb_symbols "basic" {

    include "latin"

    name[Group1]="Poland based on GB";

    key &lt;AD01&gt;  { [         q,          Q ] };
    key &lt;AD02&gt;  { [         w,          W ] };
    key &lt;AD03&gt;  { [         e,          E,      eogonek,      Eogonek ] };
    key &lt;AD09&gt;  { [         o,          O,       oacute,       Oacute ] };

    key &lt;AC01&gt;  { [         a,          A,      aogonek,      Aogonek ] };
    key &lt;AC02&gt;  { [         s,          S,       sacute,       Sacute ] };
    key &lt;AC04&gt;  { [         f,          F ] };

    key &lt;AB01&gt;  { [         z,          Z,    zabovedot,    Zabovedot ] };
    key &lt;AB02&gt;  { [         x,          X,       zacute,       Zacute ] };
    key &lt;AB03&gt;  { [         c,          C,       cacute,       Cacute ] };
    key &lt;AB06&gt;  { [         n,          N,       nacute,       Nacute ] };

    key &lt;AE02&gt;  { [         2,   quotedbl,  twosuperior,    oneeighth ] };
    key &lt;AE03&gt;  { [         3,   sterling, threesuperior,    sterling ] };
    key &lt;AE04&gt;  { [         4,     dollar,     EuroSign,   onequarter ] };

    key &lt;AC11&gt;  { [apostrophe,         at, dead_circumflex, dead_caron] };
    key &lt;TLDE&gt;  { [     grave,    notsign,          bar,          bar ] };

    key &lt;BKSL&gt;  { [numbersign, asciitilde,   dead_grave,   dead_breve ] };
    key &lt;LSGT&gt;  { [ backslash,        bar,          bar,    brokenbar ] };

    include "kpdl(comma)"

    include "level3(ralt_switch)"
};
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-1137175364480480455?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/1137175364480480455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=1137175364480480455' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1137175364480480455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1137175364480480455'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/10/uk-and-us-keyboard-layout-are-different.html' title='Polish UK X11 keybord layout'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-5299033444305842784</id><published>2008-09-11T19:01:00.004+02:00</published><updated>2008-10-16T00:41:50.180+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='desktop'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Trash in Ubuntu</title><content type='html'>My father had a strange problem. He couldn't delete few files from his Trash. First we figured out that he didn't have 'write' rights to them, even if he saved them from a mail. My first suggestion was to change permissions, but he couldn't (using Nautilus). Today I had a chance to sit in front of dad's computer, but I couldn't find where is the Trash. I decided to check if there were any similar bug report in the &lt;a href="http://launchpad.net/"&gt;launchpad&lt;/a&gt;. I found &lt;a href="https://answers.launchpad.net/ubuntu/+question/44037"&gt;this&lt;/a&gt; suggestion, which work for me (of course I need to make &lt;span style="font-style:italic;"&gt;chmod -R +w ~/.local/share/Trash/files/*&lt;/span&gt;).

And the point I would like to save here is that the trash in Ubuntu is in: &lt;pre&gt;~/.local/share/Trash/files/&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-5299033444305842784?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/5299033444305842784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=5299033444305842784' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5299033444305842784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5299033444305842784'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/09/trash-in-ubuntu.html' title='Trash in Ubuntu'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-4861140224202503069</id><published>2008-09-09T00:02:00.007+02:00</published><updated>2008-11-25T11:27:02.992+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='desktop'/><title type='text'>Cordless USB phone - not working with Ubuntu</title><content type='html'>&lt;span style="font-weight: bold;"&gt;This time no-success story.&lt;/span&gt;

I bought the &lt;span style="font-style: italic;"&gt;WP-01 VoIP Dect Cordless Handset&lt;/span&gt; on ebay (from shop4USB). In Product Description there was an info that it works with "Linux2.4 above". In reality it was working only partly, very partly. Indeed the only part working was sound (as normal sound card), it means I could  hear and speak after /choose a number/pick up a call/ using Skype software. Anything ( ring, Keyboard and LCD) wasn't working. Phone was recognize by system and asign to USB HID module:&lt;br&gt;

&lt;code&gt;dmesg |grep hid
[ 33.859714] usbcore: registered new interface driver hiddev
[ 33.866820] hiddev96hidraw0: USB HID v1.00 Device [HID 06e6:c31c] on usb-0000:00:1f.4-2.2&lt;/code&gt;
&lt;br&gt;
I tried to make &lt;span style="font-style: italic;"&gt;yealink&lt;/span&gt; module controlling phone.
&lt;br&gt;
&lt;code&gt;
rmmod ubhid
modprobe yealink&lt;/code&gt;
&lt;br&gt;
But, how I expected, it didn't help.


Finally, the phone USB info was/is&lt;br&gt;
&lt;code&gt;06e6:c31c Tiger Jet Network, Inc.&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
PS. The seller was OK and gave me my money back.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-4861140224202503069?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/4861140224202503069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=4861140224202503069' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/4861140224202503069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/4861140224202503069'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/09/cordless-usb-phone-not-working-with.html' title='Cordless USB phone - not working with Ubuntu'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-7255681802044390488</id><published>2008-08-13T13:48:00.004+02:00</published><updated>2008-08-13T14:16:20.450+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ccdc'/><category scheme='http://www.blogger.com/atom/ns#' term='virtualization'/><title type='text'>Swap - VMware effects and parallelization</title><content type='html'>&lt;b&gt;VMare and swap&lt;/b&gt;
&lt;p&gt;To present our software marketing and scientific represents use Windows laptopts with Linux in VMWare. They need Linux because our web based product (&lt;a href="http://www.ccdc.cam.ac.uk/products/life_sciences/relibase/"&gt;Relibase+&lt;/a&gt;, &lt;a href="http://www.ccdc.cam.ac.uk/products/csd_system/isostar/"&gt;IsoStar&lt;/a&gt; and incoming WebCSD) working only on it. Using virtualization shouldn't be a problem as a machine has 2GB of memory and we can assign 1GB to guest OS. However, recently we couldn't start WebCSD, not only guest was affected but also host froze. VMWare has problem with I/O operation so we were suspicious about disk usage, but the server  didn't need to much of it.  Anyway I went I/O trace and decided to turn off the swap. After that server started to work as a rocket!&lt;/p&gt;

&lt;b&gt;Parallelization of a swap partitions&lt;/b&gt;
&lt;p&gt;I was browins through &lt;a href="https://www.ibm.com/developerworks/"&gt;IBM developersWorks&lt;/a&gt; and found &lt;a href="http://www.ibm.com/developerworks/linux/library/l-swaptip2.html"&gt;info&lt;/a&gt; that you can parallelize a swap partition.&lt;/p&gt;&lt;p style="font-style: italic;"&gt;Amazingly, all modern Linux kernels, by default (with no special kernel options or patches) allow you to parallelize swap, just like a RAID 0 stripe. By using the pri option in /etc/fstab to set multiple swap partitions to the same priority, we tell Linux to use them in parallel:&lt;/p&gt;
&lt;pre class="displaycode"&gt;/dev/sda2 none swap sw,pri=3 0 0
/dev/sdb2 none swap sw,pri=3 0 0
/dev/sdc2 none swap sw,pri=3 0 0
/dev/sdd2 none swap sw,pri=1 0 0&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-7255681802044390488?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/7255681802044390488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=7255681802044390488' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/7255681802044390488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/7255681802044390488'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/08/swap-vmware-effects-and-parallelization.html' title='Swap - VMware effects and parallelization'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-6432476653259625160</id><published>2008-08-11T18:22:00.010+02:00</published><updated>2008-08-15T16:56:20.644+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ccdc'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Creating service starting script</title><content type='html'>One of our customer ask what to do to start &lt;a href="http://www.ccdc.cam.ac.uk/products/csd_system/isostar/"&gt;IsoStar&lt;/a&gt; server during system start.

Our customer was using Centos (RedHat derivative) so I suggested to use the command line tool called &lt;span style="font-style: italic; font-weight: bold;"&gt;chkconfig &lt;/span&gt;[&lt;a href="http://linux.die.net/man/8/chkconfig"&gt;1&lt;/a&gt;, &lt;a href="http://spiralbound.net/2006/11/15/controlling-services-with-chkconfig"&gt;2&lt;/a&gt;]. TO use this tool you need a special script starting Isostar Apache server. The sample of such script can be found here [&lt;a href="http://spiralbound.net/2007/07/23/example-linux-init-script"&gt;3&lt;/a&gt;].

Here is the example instruction. Let me assume that isostar is going to &lt;span style="font-style: italic;"&gt;/opt &lt;/span&gt;directory.
&lt;ol&gt;&lt;li&gt;Copy the script from link [&lt;a href="http://spiralbound.net/2007/07/23/example-linux-init-script"&gt;3&lt;/a&gt;] to your HDD and call it isostar_server&lt;/li&gt;&lt;li&gt;Change line:&lt;pre&gt;/path/to/command/to/start/new-service&lt;/pre&gt;to:&lt;pre&gt;/opt/csd/isostar/APACHE/bin/ccdc_apache start&lt;/pre&gt;and line:&lt;pre&gt;/path/to/command/to/stop/new-service&lt;/pre&gt;to:&lt;pre&gt;/opt/csd/isostar/APACHE/bin/ccdc_apache stop&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Remove following lines (from both start and stop subsection):
&lt;pre&gt;      #Or to run it as some other user:
/bin/su - username -c /path/to/command/to/start/new-service
echo "."&lt;/pre&gt;&lt;/li&gt;  &lt;li&gt;Change 'new-service' in 'echo -n' lines to 'isostar_server'.&lt;/li&gt;&lt;li&gt;Now as a root copy isostar_server file into &lt;i class="moz-txt-slash"&gt;&lt;span class="moz-txt-tag"&gt;/&lt;/span&gt;etc/init.d&lt;span class="moz-txt-tag"&gt;/&lt;/span&gt;&lt;/i&gt;&lt;/li&gt;&lt;li&gt;Again as a root invoke chkconfig and add isostar_server:
&lt;span style="font-style: italic;"&gt;/sbin/chkconfig --add isostar_server&lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;

There are very similar tool for Debian (Ubuntu etc.) called &lt;span style="font-weight: bold; font-style: italic;"&gt;update-rc.d&lt;/span&gt; [&lt;a href="http://wiki.linuxquestions.org/wiki/Update-rc.d"&gt;4&lt;/a&gt;, &lt;a href="http://www.annodex.net/cgi-bin/man/man2html?update-rc.d+8"&gt;5&lt;/a&gt;]. You should be able to use following command with the same (very similar script):
&lt;span style="font-style:italic;"&gt;update-rc.d isostar_server start 90 2 3 4 5 . stop 10 0 1 6.&lt;/span&gt;

&lt;div style="font-size: 130%; font-weight: bold;"&gt;Links&lt;/div&gt;

[1] &lt;a class="moz-txt-link-freetext" href="http://linux.die.net/man/8/chkconfig"&gt;http://linux.die.net/man/8/chkconfig&lt;/a&gt;&lt;br/&gt;
[2] &lt;a class="moz-txt-link-freetext" href="http://spiralbound.net/2006/11/15/controlling-services-with-chkconfig"&gt;http://spiralbound.net/2006/11/15/controlling-services-with-chkconfig&lt;/a&gt;&lt;br/&gt;
[3] &lt;a class="moz-txt-link-freetext" href="http://spiralbound.net/2007/07/23/example-linux-init-script"&gt;http://spiralbound.net/2007/07/23/example-linux-init-script&lt;/a&gt;&lt;br/&gt;
[4] &lt;a href="http://wiki.linuxquestions.org/wiki/Update-rc.d"&gt;http://wiki.linuxquestions.org/wiki/Update-rc.d&lt;/a&gt;&lt;br/&gt;
[5] &lt;a href="http://www.annodex.net/cgi-bin/man/man2html?update-rc.d+8"&gt;http://www.annodex.net/cgi-bin/man/man2html?update-rc.d+8&lt;/a&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-6432476653259625160?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/6432476653259625160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=6432476653259625160' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/6432476653259625160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/6432476653259625160'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/08/creating-service-starting-script.html' title='Creating service starting script'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-4968605388843649299</id><published>2008-07-29T15:04:00.005+02:00</published><updated>2008-07-29T15:18:20.613+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='awk'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Count a sum of sizes of selected files in a directory</title><content type='html'>I would like to count how much space taking Qt4 libraries for the MacOSX universal build of one from our application. So I used following command:
&lt;pre&gt;du -m * | sort -nr | grep Qt | awk '{sum+=$1} END {print sum}'&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;du -m&lt;/span&gt; - print used size in megabytes (for directory do not forgot about &lt;span style="font-weight: bold;"&gt;-s &lt;/span&gt;option);&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;sort -nr&lt;/span&gt; - sort in reverse, numerical order;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;grep Qt&lt;/span&gt; - left only lines with Qt (you can also first grep and next sort lines);&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;{sum+=$1}&lt;/span&gt; - adding a value from first column of each line to variable sum;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;END {print sum}&lt;/span&gt; - printing variable sum on after going through all of lines.
&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-4968605388843649299?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/4968605388843649299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=4968605388843649299' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/4968605388843649299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/4968605388843649299'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/07/count-sume-of-sizes-of-selected-files.html' title='Count a sum of sizes of selected files in a directory'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-5839339550660138738</id><published>2008-07-14T01:30:00.006+02:00</published><updated>2008-08-08T02:04:41.849+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='quantum chemistry'/><category scheme='http://www.blogger.com/atom/ns#' term='chemistry'/><title type='text'>The electronic structure of  selected betaine dyes. A quantum chemical study</title><content type='html'>&lt;p&gt;This thesis presents electronic absorption spectra, non linear optical properties and geometrical parameters of betaine dyes obtained by quantum chemical calculations.
&lt;/p&gt;
&lt;p&gt;Four betaines [4-(1-piridinium-phenolan), 3-(1-piridinium-phenolan), 2-(1-piridinium-phenolan) and 4-(1-piridinium-thiophenolan)] were selected for the study.


&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_jJpaSM2nWTM/SHqaVoo-GMI/AAAAAAAAAg8/EScm8fQhQNo/s1600-h/koniec-notes.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_jJpaSM2nWTM/SHqaVoo-GMI/AAAAAAAAAg8/EScm8fQhQNo/s400/koniec-notes.png" alt="" id="BLOGGER_PHOTO_ID_5222656414366701762" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;During the research various ab initio methods were applied. The Hartee-Fock method (HF) and the second order Møller-Plesset perturbation theory (MP2) were used to determine a geometrical and NLO properties. Moreover, the NLO were obtained using chosen variants of the coupled cluster metod (CC2, CCSD) and the geometry optimizations were perform using the Density Functional Theory (DFT/B3LYP) as well as complete active space methods (CASSCF and CASPT2). In the case of spectroscopic properties the CC and CASSCF/CASPT2 methods along with Time-Dependant DFT (with B3LYP, PBE0 and CAM-B3LYP functionals) and the Configuration Interaction with Singles (CIS and CIS(D)) were used.&lt;/p&gt;

&lt;p&gt;Results obtained during the study indicate that the correct description of betaine dyes' electronic structure is an unusually demanding test for present quantum chemical methods. It is safe to say, that, for all of the investigated parameters, the electron correlation has to be take into account. It is also worth to notify that basis set selection is less important. However, diffuse and polarisation functions should be included in the case of spectroscopic and optical properties.&lt;/p&gt;

&lt;p&gt;The presented computational result confirmed the very strong interaction between a betaine molecule and its environment. One of the outcome of this phenomena is a large difference between experimental results (usually obtained in condense phases) and theoretical data (calculated in vacuum). Another observation verified during project is the significant increase of the betaines' NLO by the conformational shifting. Finally, it is worth notify that the largest NLO response was obtained for 4-(1-piridinium-thiophenolan).&lt;/p&gt;

&lt;p&gt;
&lt;span style="font-style: italic;"&gt;How you can quest I'm a doctor now! I defended my thesis (abstract above) 19th of June 2008 and my degree was confirmed by faculty of Chemistry board 26th of June. Thesis was written in Polish, so it isn't  very useful for most of the world. However, there is the appendix with all available theoretical data of geometrical and spectroscopic parameters of betaine dyes. Additionally, some of results was published in following articles: &lt;a href="http://dx.doi.org/10.1007/s00894-005-0274-5"&gt;JMM-11&lt;/a&gt;, &lt;a href="http://dx.doi.org/10.1007/s00894-007-0198-3"&gt;JMM-13&lt;/a&gt; and &lt;a href="http://dx.doi.org/10.1016/j.cplett.2005.06.004"&gt;LETT-411&lt;/a&gt; (I hope to write one, maybe more). PDF with thesis can be download &lt;a href="http://www.dbc.wroc.pl/dlibra/docmetadata?id=2340&amp;amp;from=&amp;amp;dirids=1"&gt;here&lt;/a&gt;.
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If I find some time I will might prepare English version of mentioned appendix, and of course, I will share my LaTeX, gnuplot, computational experience.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-5839339550660138738?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/5839339550660138738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=5839339550660138738' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5839339550660138738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5839339550660138738'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/07/electronic-structure-of-selected.html' title='The electronic structure of  selected betaine dyes. A quantum chemical study'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_jJpaSM2nWTM/SHqaVoo-GMI/AAAAAAAAAg8/EScm8fQhQNo/s72-c/koniec-notes.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-4566459329264488326</id><published>2008-06-24T21:51:00.003+02:00</published><updated>2008-06-24T22:06:12.639+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='grub'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>GRUB and why root!=root</title><content type='html'>It one of the this 'keep in mind notes'.

I tried to install the Fedora 9 along the Ubuntu 8.04. The Fedora went onto the sdb3 partition or (hd1,2) in the GRUB notation. I added following lines to the Ubuntu &lt;span style="font-style: italic;"&gt;/boot/grub/menu.lst&lt;/span&gt; file. (I didn't install GRUB from Fedora).
&lt;pre&gt;title        Fedora 9
root        (hd1,2)
kernel        /boot/vmlinuz-2.6.25-14.fc9.i686 root=/dev/sdb3 ro
initrd        /boot/initrd-2.6.25-14.fc9.i686.img
&lt;/pre&gt;
But it wanted to work. All the time, I got
 &lt;span style="font-style: italic;"&gt;Error 2 : Bad file or directory type&lt;/span&gt;.
After trying many things I figured out that problem is lack of the GRUB files at the Fedora partition, so I updated grub config file.
&lt;pre&gt;title        Fedora 9
root        (hd0,0)
kernel        (hd1,2)/boot/vmlinuz-2.6.25-14.fc9.i686 root=/dev/sdb3 ro
initrd        (hd1,2)/boot/initrd-2.6.25-14.fc9.i686.img&lt;/pre&gt;
Finally, the Fedora started to boot.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-4566459329264488326?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/4566459329264488326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=4566459329264488326' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/4566459329264488326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/4566459329264488326'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/06/grub-and-why-rootroot.html' title='GRUB and why root!=root'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-8179053624019464913</id><published>2008-06-05T00:57:00.004+02:00</published><updated>2008-06-05T01:14:29.288+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gnuplot'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Yet Another Gnuplot Script</title><content type='html'>I'm preparing presentation for the Public Defence of my PhD thesis. I'm creating few plots and of course I'm using &lt;a href="http://gnuplot.info/"&gt;gnuplot&lt;/a&gt; for them. One of plots is seems to be really simple: three 'columns' each in other colour, but it took me few hours to make it.

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_jJpaSM2nWTM/SEcf6MgiWSI/AAAAAAAAAcY/FAPnoUAXyB0/s1600-h/nlo.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_jJpaSM2nWTM/SEcf6MgiWSI/AAAAAAAAAcY/FAPnoUAXyB0/s400/nlo.png" alt="" id="BLOGGER_PHOTO_ID_5208166578727835938" border="0" /&gt;&lt;/a&gt;

I'm glad that I finally did it so I'm sharing my scripts with you (I needed Postscript for Greek's symbols):
&lt;pre&gt;set term postscript eps enhanced color
set output "nlo-rhb-cc.eps"
set ylabel '{/Symbol b} [10^{-30} esu]'
set style data histogram
set style histogram cluster gap 1
set style fill solid border -1
set boxwidth
unset xtics

plot [-0.5:.7][-15000:0] "cc.csv" using 1 ti col, '' using 2 ti col, '' using 3 ti col
&lt;/pre&gt;
If you would like to try use the data below:
and data:&lt;pre&gt;HF/FF MP2/FF CCSD
-14720.51945800 -6960.7083277 -10843.140 &lt;/pre&gt;
BTW. I noted three new interesting website related to the gnuplot:
&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.cs.ucr.edu/%7Etitus/pyxTutorial/"&gt;http://www.cs.ucr.edu/~titus/pyxTutorial/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.ibm.com/developerworks/library/l-gnuplot/"&gt;http://www.ibm.com/developerworks/library/l-gnuplot/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.duke.edu/%7Ehpgavin/gnuplot.html"&gt;http://www.duke.edu/~hpgavin/gnuplot.html&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-8179053624019464913?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/8179053624019464913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=8179053624019464913' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/8179053624019464913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/8179053624019464913'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/06/yet-another-gnuplot-script.html' title='Yet Another Gnuplot Script'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_jJpaSM2nWTM/SEcf6MgiWSI/AAAAAAAAAcY/FAPnoUAXyB0/s72-c/nlo.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-5727878019587377008</id><published>2008-05-15T03:11:00.005+02:00</published><updated>2008-05-18T03:06:38.371+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='GRID'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><category scheme='http://www.blogger.com/atom/ns#' term='computing'/><title type='text'>Ian Foster blog</title><content type='html'>When I was preparing to the exam from GRID computing one of me friend sent me a link to the &lt;a href="http://ianfoster.typepad.com/blog/"&gt;Ian Foster&lt;/a&gt; blog, and I think that it is great that you can follow thoughts one of the GRID fathers. 
At the moment he is at the "&lt;strong&gt;Open Source Grid &amp;amp; Cluster Conference&lt;/strong&gt;". It is very interesting that you can grab pdf/videos/ppt from all &lt;a href="http://www.opensourcegridcluster.org/programming.html"&gt;point of programme&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-5727878019587377008?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/5727878019587377008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=5727878019587377008' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5727878019587377008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5727878019587377008'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/05/grid-and-hpc-blogs.html' title='Ian Foster blog'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-5756383844422007533</id><published>2008-05-05T16:17:00.004+02:00</published><updated>2008-05-05T16:24:36.025+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><title type='text'>And Now For Something Not-Completely Different</title><content type='html'>&lt;a href="http://hehe2.net/wp-content/uploads/2008/04/anime-linux-distros.png"&gt;&lt;img src="http://lh3.ggpht.com/wawrzek/SB8XpYgiDaI/AAAAAAAAAZc/GMXdIVen7ls/s400/anime-linux-distros.png" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-5756383844422007533?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/5756383844422007533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=5756383844422007533' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5756383844422007533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5756383844422007533'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/05/and-now-for-something-not-completely.html' title='And Now For Something Not-Completely Different'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/wawrzek/SB8XpYgiDaI/AAAAAAAAAZc/GMXdIVen7ls/s72-c/anime-linux-distros.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-7690975419574771856</id><published>2008-04-29T11:15:00.006+02:00</published><updated>2008-04-29T12:43:20.577+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='awk'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><category scheme='http://www.blogger.com/atom/ns#' term='sed'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Sed one liners</title><content type='html'>I'm using &lt;a href="http://sed.sourceforge.net/sed1line.txt"&gt;this set of sed one liners&lt;/a&gt; very hardly. Today I found that I hasn't added it to my blog so I cannot find it easily. (You know I use this blog as a some kind of memory extension ;)

I was trying to find sed command capitalized a variable, I couldn't find it at mentioned page. Farther searching pointed to very interesting thread at &lt;a href="http://www.unix.com/shell-programming-scripting/38049-only-uppercase-first-character.html"&gt;Unix .com forum&lt;/a&gt;. The was script doing something similar in python, perl, sed and awk. I chosen perl:

&lt;pre&gt;echo $myvar | perl -p -e '$_ = ucfirst'&lt;/pre&gt;

However, python looks also nice:

&lt;pre&gt;echo $myvar | python -c "print raw_input().capitalize()"&lt;/pre&gt;

Awk one is also nice, but a bit more complicated (one line):

&lt;pre&gt;echo $myvar |awk '{(sub("^.",substr(toupper($1),1,1),$1)); print }'&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-7690975419574771856?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/7690975419574771856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=7690975419574771856' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/7690975419574771856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/7690975419574771856'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/04/sed-one-liners.html' title='Sed one liners'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-9005292612796182961</id><published>2008-04-15T12:14:00.004+02:00</published><updated>2008-04-15T15:31:56.706+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MacOSX'/><title type='text'>Very useful MacOSX key shortcut</title><content type='html'>The &lt;span style="font-family:courier new;"&gt;apple+tab&lt;/span&gt; key combination change between apps on MacOSX, but it works for one windows per application. What if you have more than one window for app? It is quite common when you are using X11 applications or try to use more than one terminal. To change between active window of one app you can use &lt;span style="font-family:courier new;"&gt;apple+'&lt;/span&gt;, but it seems works only for windows on one desktop. It also not work for X11 app, but for them you can use &lt;span style="font-family:courier new;"&gt;apple+left/right arrows&lt;/span&gt;.

One more thing. In some instruction related to MacOSX &lt;span style="font-family:courier new;"&gt;apple&lt;/span&gt; key is called &lt;span style="font-family:courier new;"&gt;comm&lt;/span&gt; and &lt;span style="font-family: courier new;"&gt;alt - option&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-9005292612796182961?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/9005292612796182961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=9005292612796182961' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/9005292612796182961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/9005292612796182961'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/04/very-useful-macosx-key-shortcut.html' title='Very useful MacOSX key shortcut'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-2551748841830790865</id><published>2008-03-14T14:34:00.004+01:00</published><updated>2008-04-10T17:26:09.874+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='povray'/><category scheme='http://www.blogger.com/atom/ns#' term='ccdc'/><category scheme='http://www.blogger.com/atom/ns#' term='chemistry'/><category scheme='http://www.blogger.com/atom/ns#' term='science'/><title type='text'>Povray export in Mercury CSD</title><content type='html'>One of the nice, new feature of Mercury CSD 2.0 is export to &lt;a href="http://www.povray.org"&gt;Povray&lt;/a&gt;. You can create high quality picture like one below.
&lt;center&gt;
&lt;a href="http://picasaweb.google.com/wawrzek/WawrzyniecNiewodniczaSkiInEnglish/photo?authkey=hk4Hvy9f2I4#5177590442410399426"&gt;&lt;img src="http://lh6.ggpht.com/wawrzek/R9p_E0hUVsI/AAAAAAAAAK8/fchUtfx8e5c/s400/MATCQI04.png" /&gt;&lt;/a&gt;
&lt;/center&gt;
I used refcode MATCQI04 and Display-&gt;Voids and Calculate-&gt;Packing&amp;Slicing option to produce the picture. If you are interesting in these as well other features of Mercury please check the article in J. Appl. Cryst. [&lt;a href="http://scripts.iucr.org/cgi-bin/paper?S0021889807067908"&gt;DOI: 10.1107/S0021889807067908&lt;/a&gt;].&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-2551748841830790865?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/2551748841830790865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=2551748841830790865' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/2551748841830790865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/2551748841830790865'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/03/povray-export-in-mercury-csd.html' title='Povray export in Mercury CSD'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/wawrzek/R9p_E0hUVsI/AAAAAAAAAK8/fchUtfx8e5c/s72-c/MATCQI04.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-8016894306638150783</id><published>2008-03-10T13:54:00.005+01:00</published><updated>2008-03-10T14:12:08.957+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='awk'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><category scheme='http://www.blogger.com/atom/ns#' term='sed'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Unix tips</title><content type='html'>Today I would like to share two link related to UNIX. 
The first one is IBM tips &lt;a href="http://www.ibm.com/developerworks/aix/library/au-badunixhabits.html?ca=dgr-lnxw97tenunixtips&amp;amp;S_TACT=105AGX59&amp;amp;S_CMP=GR"&gt; how learn 10 good UNIX usage habits&lt;/a&gt;.  
The second one is &lt;a href="http://www.scottklarr.com/topic/115/linux-unix-cheat-sheets---the-ultimate-collection/"&gt;The ultimate collection of UNIX cheat sheets&lt;/a&gt; by Scott Klarr.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-8016894306638150783?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/8016894306638150783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=8016894306638150783' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/8016894306638150783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/8016894306638150783'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/03/unix-tips.html' title='Unix tips'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-6721125735158749823</id><published>2008-02-25T00:13:00.003+01:00</published><updated>2008-02-25T00:26:24.724+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Gamess'/><category scheme='http://www.blogger.com/atom/ns#' term='Gaussian'/><category scheme='http://www.blogger.com/atom/ns#' term='quantum chemistry'/><category scheme='http://www.blogger.com/atom/ns#' term='chemistry'/><category scheme='http://www.blogger.com/atom/ns#' term='computing'/><title type='text'>Introductions not only to Quantum Chemistry</title><content type='html'>Supercomputer Institute at University of Minnesota  presents set of  PDF files being nice introduction to  resources available there. Most of them are related to Quantum Chemistry, but there is also CSD System and Material Studio. If you are interested please check the &lt;a href="http://www.msi.umn.edu/tutorial/chemistryphysics/index.html"&gt;link&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-6721125735158749823?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/6721125735158749823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=6721125735158749823' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/6721125735158749823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/6721125735158749823'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/02/introductions-not-only-to-quantum.html' title='Introductions not only to Quantum Chemistry'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-4105402885740948973</id><published>2008-02-21T14:04:00.006+01:00</published><updated>2008-02-21T14:52:09.189+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='chemistry'/><category scheme='http://www.blogger.com/atom/ns#' term='astronomy'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><category scheme='http://www.blogger.com/atom/ns#' term='science'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>4 blogs - 4 maybe not so different subject</title><content type='html'>I would like to present 4 interesting blogs from 4 different area:
&lt;ol&gt;&lt;li&gt;&lt;a href="http://bashcurescancer.com/"&gt;Bash Cures Cancer&lt;/a&gt;, how it is easy to guests, is a nice blog mostly about Bash tips&amp;amp;trick. However, you can also find infos about other FOSS.&lt;/li&gt;&lt;li&gt; I'm not sure if you can call &lt;a id="gn22_6" href="http://www.3dchem.com/motm.asp" title="http://www.3dchem.com/motm.asp"&gt;Molecules of the Month @ 3DChem&lt;/a&gt; a blog. I think it's older than idea of blog (it has been started in 1996). The subtitle (molecules of the month) indicates one molecule per month, but molecules have been added in random manner - no molecule between October  2007 and January 2008 and 4 in January. Anyway, the choose of molecules are quite good and the additional information can be really useful.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.badastronomy.com/bablog/"&gt;Bad Astronomy Blog &lt;/a&gt; is a good blog about  astronomy. I visited it first because of &lt;a href="http://www.badastronomy.com/bablog/2006/12/27/the-top-ten-astronomy-images-of-2006/"&gt;this entry&lt;/a&gt;, especially because of this picture.

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://ciclops.org/view.php?id=2230"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_jJpaSM2nWTM/R72AnxjjbAI/AAAAAAAAAGA/umAspbCokwA/s320/saturn.jpg" alt="" id="BLOGGER_PHOTO_ID_5169429368096910338" border="0" /&gt;&lt;/a&gt;
Just be aware that from time to time there are some politics/religion related entries.&lt;/li&gt;&lt;li&gt;Finally, &lt;a href="http://www.nature.com/nature/videoarchive/index.html"&gt;Online Video Streaming Archive&lt;/a&gt; is looking promising place where Nature (one of the best/the best scientific journal on Earth ;) presents streaming videos that feature interviews with scientists behind the most important present research.
&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-4105402885740948973?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/4105402885740948973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=4105402885740948973' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/4105402885740948973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/4105402885740948973'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/02/4-blogs-4-maybe-not-so-different.html' title='4 blogs - 4 maybe not so different subject'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_jJpaSM2nWTM/R72AnxjjbAI/AAAAAAAAAGA/umAspbCokwA/s72-c/saturn.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-8175192701395925108</id><published>2008-01-30T01:49:00.000+01:00</published><updated>2008-01-30T02:26:55.456+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='quantum chemistry'/><category scheme='http://www.blogger.com/atom/ns#' term='Dalton'/><title type='text'>Dalton problems 2: Too long input record (ERI)</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Problem&lt;/span&gt;
&lt;p&gt;My CC calculations stopped with the &lt;code&gt;forrtl: severe (22): input record too long, unit 9, file /tmp/niewod/RhbCCS/betaccs_rhb631+gd/CCSD_IAJB&lt;/code&gt; error message.&lt;/p&gt;  
&lt;span style="font-weight: bold;"&gt;Answer&lt;/span&gt;
&lt;p&gt;I changed four things and the job finished properly.
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;First I changed a machine, but both were Itanium.&lt;/li&gt;&lt;li&gt;Next I lowered the print level from 3 to 2.&lt;/li&gt;&lt;li&gt;In the original jobfile I requested a direct calculation in a CC part, in the new one I put .DIRECT keyword in a main part (for all calculations).&lt;/li&gt;&lt;li&gt;Finally I requested more memory (1900mb).&lt;/li&gt;&lt;/ul&gt;I got the proper results but the calculations end with &lt;b&gt;error 32&lt;/b&gt;. It means &lt;code&gt;forrtl: severe (32): invalid logical unit number, unit -10001, file unknown&lt;/code&gt;  
I reran jobs with new commands at the first machine, and it worked. Next I upgraded print level to 3 and job finished with success. So the issue could be cause by small amount of requested memory or direct/non-direct calculation in a HF,MP2 or CC calculation.&lt;p&gt;&lt;/p&gt;&lt;span style="font-weight: bold;"&gt;Files&lt;/span&gt;
  &lt;ul&gt;&lt;li&gt;&lt;a href="http://www.blogger.com/02/betaccs.dal"&gt;betacssi-old.dal&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;a href="http://www.blogger.com/02/betaccs-2.dal"&gt;betacssi-new.dal&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;a href="http://www.blogger.com/02/rhb631+gd.mol"&gt;rhb631+gd.mol&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;a href="http://www.blogger.com/02/betaccs_rhb631+gd.out"&gt;betaccs_rhb631+gd.out&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;a href="http://www.blogger.com/02/RhbCCS.e127210"&gt;RhbCCS.e127210&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;a href="http://www.blogger.com/02/RhbCCS.o127210"&gt;RhbCCS.o127210&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;a href="http://www.blogger.com/02/betaccs_h2co.out"&gt;betaccs_h2co.out&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-8175192701395925108?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/8175192701395925108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=8175192701395925108' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/8175192701395925108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/8175192701395925108'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/01/dalton-problems-2-too-long-input-record.html' title='Dalton problems 2: Too long input record (ERI)'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-2745698237250919949</id><published>2008-01-21T02:33:00.000+01:00</published><updated>2008-01-30T02:15:49.552+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='quantum chemistry'/><category scheme='http://www.blogger.com/atom/ns#' term='Dalton'/><title type='text'>Dalton problems 1: Direct and NonDirect HF</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Short introduction&lt;/span&gt;
&lt;p&gt;Once, I tried to create a website with notes on my Dalton's problems. I have had not time to upgraded it because Quantum Chemistry (and Dalton) has become much less important for me. Recently, I've decided that the best way to save my notes would be to add them as entries in my English blog. So they are.&lt;/p&gt;
&lt;span style="font-weight: bold;"&gt;Problem&lt;/span&gt;
&lt;p&gt;&lt;span style="font-style: italic;"&gt;I found difference between direct and non-direct Hartree-Fock results. The direct calculation didn't converge when non-direct did (look into the files below).&lt;/span&gt;&lt;/p&gt;
&lt;span style="font-weight: bold;"&gt;Answer&lt;/span&gt;
&lt;p&gt;The reason of my problems was a very sharp convergence criteria. The screening in the direct SCF gives round-off errors, which makes it impossible to converge to 1.0D-10. (The default screening is 1.0D-14, which is usually safe, unless users ask for very sharp convergence,as I did!) Disable screening in the direct SCF, resolve my problem. I had to add:&lt;code&gt;
**INTEGRALS
*TWOINT
.IFTHRS
20
&lt;/code&gt;When convergence was set to 1.0D-09 the difference between direct and non-direct results disappear and both calculations converged in 28 iterations, with (nearly) the same energy:&lt;/p&gt;  &lt;ul&gt;&lt;li&gt; direct_rhb631+gd.out:        -551.031670938128&lt;/li&gt;  &lt;li&gt; nodirect_rhb631+gd.out:      -551.031670938119&lt;/li&gt; &lt;/ul&gt;&lt;p&gt; I would like thanks Kenneth Ruud and Hans Jorgen Aa. Jensen for help.&lt;/p&gt;
&lt;b&gt;Files&lt;/b&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.blogger.com/01/nodirect.dal"&gt;nodirect.dal&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;a href="http://www.blogger.com/01/direct.dal"&gt;direct.dal&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;a href="http://www.blogger.com/01/rhb631+gd.mol"&gt;rhb631+gd.mol&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;a href="http://www.blogger.com/01/direct_rhb631+gd.out"&gt;direct_rhb631+gd.out&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;a href="http://www.blogger.com/01/nodirect_rhb631+gd.out"&gt;nodirect_rhb631+gd.out&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-2745698237250919949?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/2745698237250919949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=2745698237250919949' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/2745698237250919949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/2745698237250919949'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2008/01/dalton-problems-1-direct-and-nondirect.html' title='Dalton problems 1: Direct and NonDirect HF'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-7175008564212656540</id><published>2007-12-28T11:40:00.001+01:00</published><updated>2007-12-28T13:11:48.009+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Gamess'/><category scheme='http://www.blogger.com/atom/ns#' term='quantum chemistry'/><category scheme='http://www.blogger.com/atom/ns#' term='computing'/><title type='text'>PC GAMESS benchmarks</title><content type='html'>&lt;p&gt;Alex Granovsky presented the results of the &lt;a href="http://classic.chem.msu.su/gran/gamess/"&gt;PC GAMESS&lt;/a&gt; (version of Gamess US designed to work better on x86 architecture) benchmarks on new AMD Opteron and Intel Core2 processors. You can find them &lt;a href="http://classic.chem.msu.su/gran/gamess/barcelona.html"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;The most important observations are:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Intel CPUs are much faster,&lt;/li&gt;&lt;li&gt;but AMDs scale better with number of cores.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;BTW. You can find other interesting benchmark in the&lt;span style="font-style: italic;"&gt; Performance&lt;/span&gt; section of the &lt;a href="http://classic.chem.msu.su/gran/gamess/"&gt;PC GAMESS&lt;/a&gt; website.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-7175008564212656540?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/7175008564212656540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=7175008564212656540' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/7175008564212656540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/7175008564212656540'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2007/12/pc-gamess-benchmarks.html' title='PC GAMESS benchmarks'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-784052579381473137</id><published>2007-12-21T15:16:00.000+01:00</published><updated>2007-12-28T01:22:49.407+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MacOSX'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Tips for starting MacOSX apps</title><content type='html'>&lt;ol&gt;
&lt;li&gt;If you want to start a MacOSX applications from a terminal (or a shell script) you have to use the &lt;span style="font-weight:bold;"&gt;open&lt;/span&gt; command, i.e.:
&lt;code&gt;open /Application/Firefox.app&lt;/code&gt;
(&lt;span style="font-style:italic;"&gt;based on &lt;a href="http://xahlee.org/UnixResources_dir/macosx.html"&gt;xahlee.org&lt;/a&gt;&lt;/span&gt;)
&lt;/li&gt;
&lt;li&gt;If you need to write a wrapper starting a binary file (which is inside of a MacOSX app) with some options you can use following construction:
&lt;code&gt;HERE=`dirname $0`; $HERE/name.x -options&lt;/code&gt;
The same construction is useful if you need to set some environment variables.&lt;/li&gt;
&lt;li&gt;Sometimes is it necessary to have a location of an app, but apps can be place in a very strange places. MacOSX binaries are located third level deep inside of an app, so the following command save location of an app in the TOPDIR variable:  
&lt;code&gt;TOPDIR=`cd $HERE/../../../; pwd`&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-784052579381473137?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/784052579381473137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=784052579381473137' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/784052579381473137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/784052579381473137'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2007/12/tips-for-starting-macosx-apps.html' title='Tips for starting MacOSX apps'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-5855996207177623374</id><published>2007-12-09T03:00:00.000+01:00</published><updated>2007-12-09T03:03:59.197+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>3D in Linux</title><content type='html'>There is a very interesting overview of present state (Nov 2007) of 3D graphic card drivers on &lt;a href="http://www.freesoftwaremagazine.com/blogs/more_3d_desktops"&gt;Mitch Meyran's blog&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-5855996207177623374?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/5855996207177623374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=5855996207177623374' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5855996207177623374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5855996207177623374'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2007/12/3d-in-linux.html' title='3D in Linux'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-7313916351201410780</id><published>2007-12-05T01:42:00.000+01:00</published><updated>2007-12-05T13:57:23.154+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Gamess'/><category scheme='http://www.blogger.com/atom/ns#' term='Gaussian'/><category scheme='http://www.blogger.com/atom/ns#' term='quantum chemistry'/><category scheme='http://www.blogger.com/atom/ns#' term='chemistry'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><category scheme='http://www.blogger.com/atom/ns#' term='computing'/><title type='text'>Two chemical links</title><content type='html'>This time two links to websites related to chemistry.
&lt;ul&gt;
&lt;li&gt;The Supercomputing Institute from University of Minnesota prepared kit of &lt;a href="http://www.msi.umn.edu/tutorial/chemistryphysics/index.html"&gt;Tutorials&lt;/a&gt; for Computational Chemistry and Physics Sciences.&lt;/li&gt;
&lt;li&gt;Vitalii Vanovschi created the &lt;a href="http://www.webqc.org/"&gt;website&lt;/a&gt; with many important chemical informations.&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-7313916351201410780?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/7313916351201410780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=7313916351201410780' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/7313916351201410780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/7313916351201410780'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2007/12/two-chemical-links.html' title='Two chemical links'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-8351611727203087818</id><published>2007-11-02T14:39:00.001+01:00</published><updated>2008-04-08T15:50:17.019+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='opengl'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>OpenGL and Windows</title><content type='html'>I'm starting to me more interesting in 3D graphic. Looking for some information about OpenGL on Windows I found Lucian Wischik old &lt;a href="http://wischik.com/lu/programmer/wingl.html"&gt;webpage&lt;/a&gt;. Maybe information collected on it isn't the latest news, but at least one thing is quite interesting. There is a register key which keep information about which library provided OpenGL functionality on your computer. &lt;code&gt;HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\OpenGLDrivers&lt;/code&gt;.

The another interesting finding is &lt;a href="http://www.realtech-vr.com/glview/"&gt;OpenGL Extension Viewer&lt;/a&gt; provided by RealTech-Vr. It works on Windows, MacOSX and under Wine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-8351611727203087818?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/8351611727203087818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=8351611727203087818' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/8351611727203087818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/8351611727203087818'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2007/11/opengl-and-windows.html' title='OpenGL and Windows'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-623165005545830880</id><published>2007-09-10T22:29:00.000+02:00</published><updated>2007-09-12T01:41:27.416+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='awk'/><category scheme='http://www.blogger.com/atom/ns#' term='quantum chemistry'/><category scheme='http://www.blogger.com/atom/ns#' term='Molcas'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><category scheme='http://www.blogger.com/atom/ns#' term='computing'/><title type='text'>Getting the Molcas CASPT2 exciation energy</title><content type='html'>This is the short bash/awk script printing an energy of excitation to a first excited stated obtain by CASPT2 method in Molcas6:
&lt;pre&gt;for i in *.log
do echo $i
grep "Total energy:" $i| gawk ' BEGIN {l=1} {if (l==1) {a=$3} else if (l==2) \
{b=$3; print 27.2097*(b-a)} l++} '
done&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-623165005545830880?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/623165005545830880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=623165005545830880' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/623165005545830880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/623165005545830880'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2007/09/this-is-short-bashawk-script-printing.html' title='Getting the Molcas CASPT2 exciation energy'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-5087235028268438999</id><published>2007-08-17T14:00:00.000+02:00</published><updated>2007-08-17T15:02:41.389+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='latex'/><category scheme='http://www.blogger.com/atom/ns#' term='fonts'/><title type='text'>LaTeX font catalog</title><content type='html'>If you need nice, non-standard fonts for LaTeX visit Palle Jørgensen &lt;a href="http://www.tug.dk/FontCatalogue/about.html"&gt;LaTeX Font Catalogue&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-5087235028268438999?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/5087235028268438999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=5087235028268438999' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5087235028268438999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5087235028268438999'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2007/08/latex-font-catalog.html' title='LaTeX font catalog'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-5705021955793370031</id><published>2007-07-07T02:29:00.000+02:00</published><updated>2007-07-07T03:13:17.870+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='tex'/><title type='text'>I Gited my PhD</title><content type='html'>From the beginning of writing my PhD thesis I've been using RCS to store revision of my tex files. I even add settings to my GVIM that Ctrl+S make a new revision. Recently, when I started to finishing Phd ;), I found lack information about files other than main tex files (tabels, figures etc). I also wanted to be sure that change prepered on one machines can be easily reach from other ones. I decided to use something more complex than RCS and chose git. It is very easy to send  commits to my academic server (&lt;code&gt;git push ssh://user@server/~/PhD&lt;/code&gt;) and getting the latest version from it (&lt;code&gt;git pull ssh://user@server/~/PhD&lt;/code&gt;). However, I found that it isn't so easy to edit files on my server. Directory doesn't change after pushing it from remote repository.
My first work around was on the server first committing changes - it means reverting files to state before pushing, and latter reverting to previous version -it means last version committed from remote machine.

Does it sound complicated? 
Yes!

So I was trying find the other way. Today I found it. 
On remote machine I do:
&lt;code&gt;git add filename&lt;/code&gt;(if needed)
&lt;code&gt;git commit -a&lt;/code&gt; 
&lt;code&gt;git push ssh://user@server/~/PhD&lt;/code&gt;
Later on server:
&lt;code&gt;git reset --hard HEAD&lt;/code&gt;

And now I has the same files at server and any remote machines. Nice. And I need only ssh to do it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-5705021955793370031?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/5705021955793370031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=5705021955793370031' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5705021955793370031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5705021955793370031'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2007/07/i-gited-my-phd.html' title='I Gited my PhD'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-8373402445989962824</id><published>2007-04-20T00:25:00.000+02:00</published><updated>2007-04-20T00:29:38.920+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='IRIX'/><category scheme='http://www.blogger.com/atom/ns#' term='solaris'/><title type='text'>Nekochan.Net</title><content type='html'>If you like IRIX and other old UNIX systems, &lt;a href="http://nekochan.net"&gt;Nekochan.Net&lt;/a&gt; is a place for you. There are a lot of software for IRIX, very interesting forum (not only about IRIX) and nice screenshots, like this one:
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.nekochan.net/albums/irix/onyx2_032007_02.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px;" src="http://www.nekochan.net/albums/irix/onyx2_032007_02.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-8373402445989962824?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/8373402445989962824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=8373402445989962824' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/8373402445989962824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/8373402445989962824'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2007/04/nekochannet.html' title='Nekochan.Net'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-7334014601243573004</id><published>2007-04-04T13:59:00.000+02:00</published><updated>2007-04-04T14:05:34.963+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Comparing two list of files</title><content type='html'>I had to compare list of files, which was stored in two files. I wrote a small shell script. &lt;pre&gt;for i in `cat ~buildman/WhiteList`
do
        grep $i ~buildman/BlackList
done&lt;/pre&gt;But beware it is taking each line of WhiteList as a substring. So if you have &lt;span style="font-weight:bold;"&gt;aaa&lt;/span&gt; in WhiteList that &lt;span style="font-weight:bold;"&gt;aaaaa&lt;/span&gt; from BlackList will be printed out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-7334014601243573004?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/7334014601243573004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=7334014601243573004' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/7334014601243573004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/7334014601243573004'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2007/04/comparing-two-list-of-files.html' title='Comparing two list of files'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-8238961481084024974</id><published>2007-03-20T18:17:00.000+01:00</published><updated>2007-03-20T18:23:43.402+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Find</title><content type='html'>Unix &lt;span style="font-weight:bold;"&gt;find&lt;/span&gt; command is powerful tool. Recently, I learn how to use it to fix wrong permission of a whole directory tree (hundres of files). If you will be in similar situation try to use:
&lt;span style="font-weight:bold;"&gt;find -nouser&lt;/span&gt; - looking for files (directories) not belongs to user.
&lt;span style="font-weight:bold;"&gt;find -type f -not -perm 644&lt;/span&gt;  - looking for files with permision other that 644
&lt;span style="font-weight:bold;"&gt;find -type d -not -perm 755&lt;/span&gt; - looking for directories with permision other that 755&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-8238961481084024974?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/8238961481084024974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=8238961481084024974' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/8238961481084024974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/8238961481084024974'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2007/03/find.html' title='Find'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-1341046166847250351</id><published>2007-03-01T13:57:00.000+01:00</published><updated>2007-03-01T14:17:14.542+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNIX'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>10 nice shell command</title><content type='html'>&lt;a href='http://bashcurescancer.com/10-linux-commands-youve-never-used.html'&gt;Here&lt;/a&gt; you can find 10 nice, but not very other using shell command. Personally, I was using &lt;span style="font-weight:bold;"&gt;bc&lt;/span&gt; and &lt;span style="font-weight:bold;"&gt;lsof&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-1341046166847250351?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/1341046166847250351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=1341046166847250351' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1341046166847250351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1341046166847250351'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2007/03/10-nice-shell-command.html' title='10 nice shell command'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-7586677123520070541</id><published>2007-02-20T12:37:00.000+01:00</published><updated>2007-02-20T13:08:55.325+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='solaris'/><category scheme='http://www.blogger.com/atom/ns#' term='computing'/><title type='text'>Solaris vs. Linux for Application Developers</title><content type='html'>At &lt;a href="http://developers.sun.com/index.html"&gt;Sun Developer Network&lt;/a&gt; there is quite the &lt;a href="http://developers.sun.com/solaris/articles/solaris_linux_app.html"&gt;
article&lt;/a&gt; examines similarities and differences in the development environments between Linux  and Solaris operating systems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-7586677123520070541?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/7586677123520070541/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=7586677123520070541' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/7586677123520070541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/7586677123520070541'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2007/02/solaris-vs-linux-for-application.html' title='Solaris vs. Linux for Application Developers'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-8248975276427373664</id><published>2007-02-01T20:02:00.000+01:00</published><updated>2007-02-01T20:06:15.729+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='computing'/><title type='text'>Another interesting blog about HPC</title><content type='html'>John West, the Director of the DoD Major Shared Resource Center at
ERDC in Vicksburg, MS has created a &lt;a href="http://insidehpc.com/"&gt;blog&lt;/a&gt; where he discusses new developments in HPC.  Check it out - very interesting info.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-8248975276427373664?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/8248975276427373664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=8248975276427373664' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/8248975276427373664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/8248975276427373664'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2007/02/another-interesting-blog-about-hpc.html' title='Another interesting blog about HPC'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-279590479090204354</id><published>2006-12-29T17:19:00.000+01:00</published><updated>2006-12-29T17:52:04.457+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Gaussian'/><category scheme='http://www.blogger.com/atom/ns#' term='quantum chemistry'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Geometries from Gaussian Scan</title><content type='html'>Reading geometries from Gaussian file storing information about Potential Energy Scan (PES) isn't easy. I was sure that there were some tools to do this, but I cannot find any yesterday, so I prepared &lt;a href="http://mml.ch.pwr.wroc.pl/%7Eniewod/Python/scaner-0.1.py"&gt;my own&lt;/a&gt;. It is writing in python, of course ;). Right now have very basic features. It reads input file and created output xyz files (as many as stationary points was found). You are using it simply writing in command line:&lt;pre&gt;scaner-0.1.py inputfile&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-279590479090204354?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/279590479090204354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=279590479090204354' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/279590479090204354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/279590479090204354'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/12/geometries-from-gaussian-scan.html' title='Geometries from Gaussian Scan'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-9041921328931551620</id><published>2006-12-29T00:44:00.000+01:00</published><updated>2006-12-29T00:52:44.546+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Gaussian'/><category scheme='http://www.blogger.com/atom/ns#' term='quantum chemistry'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Greping excitation energy from Gaussian output</title><content type='html'>I've already &lt;a href="http://larryn.blogspot.com/2006/01/excited-state-parameters-in-gaussian.html"&gt;written&lt;/a&gt; about CIS energies, but my suggestion is more general. You can use that command also for TDDFT calculations. But if you need energies from perturbative correction of CIS method (CIS(D) method) you have to use this:&lt;pre&gt; grep "CIS(D) Exc\. E" *.log&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-9041921328931551620?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/9041921328931551620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=9041921328931551620' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/9041921328931551620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/9041921328931551620'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/12/greping-excitation-energy-from-gaussian.html' title='Greping excitation energy from Gaussian output'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-7948766340141955627</id><published>2006-12-14T16:54:00.000+01:00</published><updated>2006-12-14T17:02:12.489+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='physic'/><category scheme='http://www.blogger.com/atom/ns#' term='latex'/><category scheme='http://www.blogger.com/atom/ns#' term='chemistry'/><title type='text'>'Symmetry' font in LaTeX</title><content type='html'>If you need nice font for symmetry group names use &lt;b&gt;mathrsfs&lt;/b&gt; package and next (example for C2 group) &lt;b&gt;$\mathscr{C}_2$&lt;/b&gt; in the text. Of course you can use it for many other purpose.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-7948766340141955627?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/7948766340141955627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=7948766340141955627' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/7948766340141955627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/7948766340141955627'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/12/symmetry-font-in-latex.html' title='&apos;Symmetry&apos; font in LaTeX'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-7965657743874492726</id><published>2006-12-07T19:35:00.000+01:00</published><updated>2007-06-11T22:52:13.331+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rox'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='desktop'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Hack a Rox</title><content type='html'>I like &lt;a href="http://rox.sourceforge.net/desktop/static.html"&gt;Rox&lt;/a&gt;, but it has some annoying small problems. One of them is that the program which open the file is running from home directory. Now I write short script which fix it for &lt;a href="http://www.vim.org/"&gt;gvim&lt;/a&gt; and I'm thinking how to do global...
&lt;pre&gt;
#!/bin/sh
cd `dirname "$@"`
gvim `basename "$@"`
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-7965657743874492726?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/7965657743874492726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=7965657743874492726' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/7965657743874492726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/7965657743874492726'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/12/hack-rox.html' title='Hack a Rox'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-895171986609327834</id><published>2006-12-06T23:18:00.000+01:00</published><updated>2006-12-06T23:21:25.057+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Vim's colorscheme</title><content type='html'>I've found nice &lt;a href="http://www.cs.cmu.edu/~maverick/VimColorSchemeTest/" title="created by Shan Leung Maverick Woo"&gt;site&lt;/a&gt; with sample of Vim's colorschemse. I miss only python samples.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-895171986609327834?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/895171986609327834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=895171986609327834' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/895171986609327834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/895171986609327834'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/12/vims-colorscheme.html' title='Vim&apos;s colorscheme'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-6296135504259407787</id><published>2006-12-03T22:10:00.000+01:00</published><updated>2007-03-06T23:40:18.817+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='latex'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='chemistry'/><title type='text'>XymTeX: example</title><content type='html'>I'm using XymTeX to creating chemical structures in PhD thesis. I'm not fully satisfe, but it create structures' counter , which can be use for numbering and refering to structures. Recently I created Reichardt Betaine subtituted by eter crown.
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_jJpaSM2nWTM/RXNILwpGQLI/AAAAAAAAAAM/e73oFWZuTMg/s1600-h/korona.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_jJpaSM2nWTM/RXNILwpGQLI/AAAAAAAAAAM/e73oFWZuTMg/s400/korona.png" alt="" id="BLOGGER_PHOTO_ID_5004422977811792050" border="0" /&gt;&lt;/a&gt;The command which create this picture is below. Is nice, isn't it ;)

&lt;span style="font-style: italic;"&gt;\begin{XyMcompd}(800,2000)(,-1400){zw:korona}{}&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;\sixheterov[ace]{4==\upnobond{N}{$\oplus$}} %&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;{1==Ph;3==Ph;5==Ph; %&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;4==\cyclohexanev[ace %&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;{c\sixfusev[ %&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;  {c\sixfusev[ %&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;    {d\sixfusev{2==O;5==\null}{}{A}[ef]} %&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;             ]{1==\null;4==\null}{}{F}[de]} %&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;            ]{3==O}{}{F}[cde]} %&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;{d\sixfusev[ %&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;  {d\sixfusev[ %&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;    {c\sixfusev{3==O;6==O}{}{F}[ab]} %&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;             ]{1==\null;4==\null}{}{A}[bc]} %&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;           ]{5==O}{}{A}[bcd]} %&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;] %&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;{4D=={\hspace*{-1.5mm}$| \underline{\mathrm{O}}|^{\ominus}$};1==(yl)}} &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;\end{XyMcompd}&lt;/span&gt;&lt;br /&gt;

If you don't like XymTeX you can try &lt;a href="http://konwerter.exroot.org/"&gt;konwerter&lt;/a&gt; very nice program by Piotr Wawrzyniak.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-6296135504259407787?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/6296135504259407787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=6296135504259407787' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/6296135504259407787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/6296135504259407787'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/12/im-using-xymtex-to-creating-chemical.html' title='XymTeX: example'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_jJpaSM2nWTM/RXNILwpGQLI/AAAAAAAAAAM/e73oFWZuTMg/s72-c/korona.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-4194437673598136278</id><published>2006-11-20T16:54:00.000+01:00</published><updated>2006-11-20T17:16:17.921+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='chemistry'/><title type='text'>Energy converter v0.1</title><content type='html'>I've just created small Python/Tkinter program to convert  values of energies. At the moment you can convert from (to) &lt;span style="font-weight: bold;"&gt;au, eV, nm &lt;/span&gt;and&lt;span style="font-weight: bold;"&gt; cm&lt;/span&gt;&lt;sup style="font-weight: bold;"&gt;-1&lt;/sup&gt;. Not much, but it is beginning :).
Program can be download from &lt;a href="http://mml.ch.pwr.wroc.pl/%7Eniewod/Python/energie-0.1.py"&gt;mml website&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-4194437673598136278?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/4194437673598136278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=4194437673598136278' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/4194437673598136278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/4194437673598136278'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/11/energy-converter-v01.html' title='Energy converter v0.1'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-1641365347550516272</id><published>2006-11-20T15:32:00.000+01:00</published><updated>2006-11-20T15:41:19.544+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>How to list files in subdirectories</title><content type='html'>I wrote a shell script which allow to list files and only files in all of &lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;subdirectiories&lt;/span&gt; of current directory. I don't know if it useful but it nice piece of shell code:
&lt;pre&gt;
#!/bin/sh
for i in `find $&lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;PWD&lt;/span&gt; -&lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;maxdepth&lt;/span&gt; 1 -type d`
do
    (&lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;cd&lt;/span&gt; $i; echo $i; find -&lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;maxdepth&lt;/span&gt; 1 -type f| &lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;wc&lt;/span&gt; -l)
done&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-1641365347550516272?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/1641365347550516272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=1641365347550516272' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1641365347550516272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1641365347550516272'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/11/how-to-list-files-in-subdirectories.html' title='How to list files in subdirectories'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-1434977048021714313</id><published>2006-11-19T00:31:00.000+01:00</published><updated>2006-11-19T00:37:51.549+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>The Python Challenge</title><content type='html'>I nearly become addicted. To what? To &lt;a href=" http://www.pythonchallenge.com/"&gt;Python Challenge&lt;/a&gt;. It is a set of puzzle which can be resolved with Python (you can use other language, but it is design for Python). I don't remember when I have so much fun. It is great think if you what to learn Python or just test your skills.

&lt;span style="font-weight: bold;"&gt;It is my 50&lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;th&lt;/span&gt; note and I started write this blog 1 year and 3 days ago!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-1434977048021714313?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/1434977048021714313/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=1434977048021714313' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1434977048021714313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1434977048021714313'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/11/python-challenge.html' title='The Python Challenge'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-1077948388063006329</id><published>2006-11-18T16:46:00.000+01:00</published><updated>2006-11-18T16:59:38.570+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='quantum chemistry'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Molekel 5.0 alpha</title><content type='html'>I &lt;a href="http://larryn.blogspot.com/2006/04/molekel.html"&gt;wrote&lt;/a&gt; that Molekel was rebirth and version 4.6 was release. Recently, I found that the project has been moved and alpha version of Molekel 5.0 can be found &lt;a href="http://bioinformatics.org/molekel/wiki/Main/HomePage"&gt;hear&lt;/a&gt;. So, right now we have:
&lt;ol&gt;&lt;li&gt;4.3. It is very old version and the sources are close. &lt;a href="http://www.cscs.ch/molekel/"&gt;[website]&lt;/a&gt;&lt;/li&gt;&lt;li&gt;4.6. The whole project has been rewritten and it is alpha version, not all functions from 4.3 version are working &lt;a href="http://www.cscs.ch/a-display.php?id=138"&gt;[website]&lt;/a&gt;&lt;/li&gt;&lt;li&gt;5.0 New, not ready yet version with open source (GPL).  &lt;a href="http://bioinformatics.org/molekel/wiki/Main/HomePage"&gt;[website]&lt;/a&gt;.
&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-1077948388063006329?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/1077948388063006329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=1077948388063006329' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1077948388063006329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1077948388063006329'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/11/molekel-50-alpha.html' title='Molekel 5.0 alpha'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-9083687455067535627</id><published>2006-11-14T23:42:00.000+01:00</published><updated>2006-11-14T23:59:38.033+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='physic'/><category scheme='http://www.blogger.com/atom/ns#' term='science'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Physics for 'normal'</title><content type='html'>I found another interesting blog related to science. This time some &lt;a href="http://physicsbuzz.blogspot.com/"&gt;physics&lt;/a&gt;. You can find there a lot of interesting news: i.e. the info about &lt;a href="http://physicsbuzz.blogspot.com/2006/11/physicists-reveal-fundamental-flaws-in.html"&gt;physics of new NBA ball&lt;/a&gt; or &lt;a href="http://physicsbuzz.blogspot.com/2006/10/fastest-waves-ever-photographed.html"&gt;fastest waves ever photographed&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-9083687455067535627?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/9083687455067535627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=9083687455067535627' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/9083687455067535627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/9083687455067535627'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/11/physic-for-normal.html' title='Physics for &apos;normal&apos;'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-2231748638203562608</id><published>2006-11-04T01:19:00.000+01:00</published><updated>2006-11-04T01:29:26.417+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Loooong bash command</title><content type='html'>I like bash command. This one is quite long:
&lt;pre&gt;for ((i=1;i&lt;36;i++)); do if [ $i -lt 10 ]; then j=0"$i" ; else j="$i" ; fi ; wget --no-check-certificate https://www.linux-magazine.pl/issue/$j/; done&lt;/pre&gt;
It could be interesting for someone, because in one line there are loop (C-style) and if command. This command  download the contents of all Polish LinuxMagazine issues. I have got most of LM issues, but searching some information thru them are quite boring. So I thinking about making some kind of 'searching machine' because one from LM website is weak.
My command once more, but this in more readable form: 
&lt;pre&gt;for ((i=1;i&lt;36;i++)); \
do \
 if [ $i -lt 10 ]; \
    then j=0"$i"; \
    else j="$i" ; \
 fi; \ 
 wget --no-check-certificate https://www.linux-magazine.pl/issue/$j/; \
done&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-2231748638203562608?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/2231748638203562608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=2231748638203562608' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/2231748638203562608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/2231748638203562608'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/11/loooong-bash-command.html' title='Loooong bash command'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-8957098312769980035</id><published>2006-11-01T23:59:00.000+01:00</published><updated>2006-11-02T12:29:52.203+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mencoder'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Mencoder (part II)</title><content type='html'>&lt;span style="font-weight:bold;"&gt;My second example of using mencoder&lt;/span&gt;:
I had the problem with large avi file which didn't fit CD (it had 1.4 gb). I used mencoder to split this file(console rulez ;). Creating of the first part was quite easy (I found the advices &lt;a href="http://www.mail-archive.com/szluug@lists.szluug.org/msg00778.html"&gt;here&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/MEncoder"&gt;here&lt;/a&gt;).
&lt;pre&gt;mencoder -ovc copy -oac copy -ss 0 -endpos 700mb -o movie_part1.avi movie.avi&lt;/pre&gt;
But there were no info where I should start the second part. I watched the end of the part 1 and manually (eyelly ;) chose the best point to split the movie (for example 1:05:25). This time I could creat two parts.
&lt;pre&gt;mencoder -ovc copy -oac copy -endpos 01:05:25 -o movie_part1.avi movie.avi
mencoder -ovc copy -oac copy -ss 01:05:25 -o movie_part2.avi movie.avi&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-8957098312769980035?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/8957098312769980035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=8957098312769980035' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/8957098312769980035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/8957098312769980035'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/11/mencoder-part-ii.html' title='Mencoder (part II)'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-1565361440418599545</id><published>2006-11-01T22:12:00.000+01:00</published><updated>2006-11-19T00:38:51.636+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mencoder'/><category scheme='http://www.blogger.com/atom/ns#' term='camera'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='chemistry'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Mencoder (part I)</title><content type='html'>I like console. So I'm using it even to manipulate video files ;).

&lt;span style="font-weight: bold;"&gt;My first example of using mencoder&lt;/span&gt;: I'm recoding files from my camera (Fuji FinePix 5600/5200). It use two passes technique (it should give smaller out file). I don't know if my options are optimal, I found it somewhere (I don't remember where). The input file is the first argument and output file is second argument of my script.
&lt;pre&gt;#!/bin/sh
mencoder $1 -ovc lavc -lavcopts \
vcodec=mpeg4:vpass=1:vbitrate=1000:vlelim=-4:vcelim=9:lumi_mask=0.05:dark_mask=0.01 \
-oac copy -o /dev/null
mencoder $1 -ovc lavc -lavcopts \
vcodec=mpeg4:mbd=2:trell:vpass=2:vbitrate=2000:vlelim=-4:vcelim=9:lumi_mask=0.05:dark_mask=0.01 \
-oac copy -o $2&lt;/pre&gt;                                
Sailing through the net (I tried to find the place with mencoder option) I reached Mario Valle &lt;a href="http://www.cscs.ch/%7Emvalle/index.html"&gt;website&lt;/a&gt;. It seems very interesting. I have to read it careful and write more about it. Right now, I'm adding his blog to my list.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-1565361440418599545?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/1565361440418599545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=1565361440418599545' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1565361440418599545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/1565361440418599545'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/11/mencoder-part-i.html' title='Mencoder (part I)'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-5076520837829279331</id><published>2006-10-19T12:06:00.001+02:00</published><updated>2009-06-05T16:18:08.407+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>SwapFile</title><content type='html'>Most of people (even Klauss Knopper [&lt;a href="#1"&gt;1&lt;/a&gt;]) think that swap partition has better performance compare to swapfile (Ok. Most of people don't know what is swap file or swap partition ;). However, it isn't true, at least for 2.6 linux kernel. Check thread at Linux-Kernel Mailing list [&lt;a href="#2"&gt; 2&lt;/a&gt;]. I think the most important is the 3rd point &lt;br /&gt;
&lt;code&gt;Does creating the swapfile on a journaled filesystem (e.g. ext3 or reiser) incur a significant performance hit?&lt;/code&gt;&lt;br /&gt;
 and answer &lt;br /&gt;
&lt;code&gt;None at all. The kernel generates a map of swap offset -&gt; disk blocks at swapon time and from then on uses that map to perform swap I/O directly against the underlying disk queue, bypassing all  caching, metadata and filesystem code.&lt;/code&gt;&lt;br /&gt;

&lt;a name="1"&gt;[1]&lt;/a&gt; Klaus Knopper, "Questions and Answers", Linux Magazine Polish ed., 3(25) March 2006, pp 38-40.&lt;br /&gt;
&lt;a name="2"&gt;[2]&lt;/a&gt; Andre Morton &lt;i&gt;et al.&lt;/i&gt;, &lt;a href="http://linux.derkeiler.com/Mailing-Lists/Kernel/2005-07/1758.html"&gt;"Swap partition vs swap file"&lt;/a&gt; thread Linux-Kernel Mailing List, July 2005.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-5076520837829279331?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/5076520837829279331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=5076520837829279331' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5076520837829279331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5076520837829279331'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/10/swapfile.html' title='SwapFile'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-5756120026536674115</id><published>2006-10-07T01:01:00.001+02:00</published><updated>2006-10-07T01:01:32.362+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='camera'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Camera.sh v2</title><content type='html'>I rewrite my script for converting raw format pictures. Now, it is converting files from raw to jpg in loop. Doing first convert of all raw files take a lot of space (ppm files are BIG). Right now I need space for one ppm file. Morover, ppm-&gt;jpg converting and resizing are made in one step. I found very nice perl program (&lt;a href="http://www.sno.phy.queensu.ca/~phil/exiftool/"&gt;ExifTool&lt;/a&gt;) to managing exif info.  &lt;pre&gt;
#!/bin/sh

EXIFPATH=/opt/Image-ExifTool-6.36
for raf in *.raf
do 
        dcraw -w $raf
        name=`basename $raf .raf`
        jpg=`basename $name`.jpg
        ppm=`basename $name`.ppm
        echo $name
        convert -resize 800x600 $ppm $jpg
        $EXIFPATH/exiftool -TagsFromFile $raf $jpg
        rm $ppm $jpg"_original"
done&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-5756120026536674115?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/5756120026536674115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=5756120026536674115' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5756120026536674115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/5756120026536674115'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/10/camerash-v2.html' title='Camera.sh v2'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-3938602813555580814</id><published>2006-10-04T00:25:00.001+02:00</published><updated>2008-02-24T23:47:23.051+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Overwriting a line in Vim</title><content type='html'>Finally, I've learn how to overwrite the whole line in Vim. First you have to yank the line you would like to copy (&lt;span style="font-weight: bold;"&gt;yy&lt;/span&gt;), next to mark the destination line (&lt;span style="font-weight: bold;"&gt;V&lt;/span&gt;) and paste the first line (&lt;span style="font-weight: bold;"&gt;P&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;p&lt;/span&gt; on it), what gives &lt;span style="font-weight: bold;"&gt;VP&lt;/span&gt;.
I found it &lt;a href="http://www.gatago.com/comp/editors/3693680.html"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-3938602813555580814?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/3938602813555580814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=3938602813555580814' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/3938602813555580814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/3938602813555580814'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/10/overwriting-line-in-vim.html' title='Overwriting a line in Vim'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-115857962338833703</id><published>2006-09-18T13:35:00.000+02:00</published><updated>2006-11-19T00:39:44.294+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='physic'/><category scheme='http://www.blogger.com/atom/ns#' term='chemistry'/><category scheme='http://www.blogger.com/atom/ns#' term='science'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Blog with many science video lectures</title><content type='html'>Sometime ago I found &lt;a href="http://freescienceonline.blogspot.com/"&gt;Free Science and Video Lectures Online!&lt;/a&gt;. It's the place where Peteris Krumins try to list video courses which are related to physics, mathematics, chemistry etc. from all over the world (MIT, Berkeley).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-115857962338833703?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/115857962338833703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=115857962338833703' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/115857962338833703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/115857962338833703'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/09/blog-with-many-science-video-lectures.html' title='Blog with many science video lectures'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-115754612171803113</id><published>2006-09-06T14:22:00.000+02:00</published><updated>2006-09-06T14:35:21.730+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fonts'/><category scheme='http://www.blogger.com/atom/ns#' term='desktop'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Fonts in Linux</title><content type='html'>There is great &lt;a href="http://avi.alkalay.net/linux/docs/font-howto/Font.html"&gt;HowTo&lt;/a&gt; about fonts in Linux.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-115754612171803113?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/115754612171803113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=115754612171803113' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/115754612171803113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/115754612171803113'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/09/fonts-in-linux.html' title='Fonts in Linux'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-115749637832495729</id><published>2006-09-06T00:32:00.000+02:00</published><updated>2006-09-06T00:54:18.090+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>ls and find</title><content type='html'>I'm all the time learning new things about unix command. Recently, I found new feature of ls and find command.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight: bold;"&gt;ls -Ssh&lt;/span&gt;&lt;br /&gt;
-S lists files and directories in size order,&lt;br /&gt;
-s prints size,&lt;br /&gt;
-h does it in human readable  way.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight: bold;"&gt;find -mtime -1&lt;/span&gt;&lt;br /&gt;
-mtime looks for files modificated later/earlier/exactly n days from now (in my example today and yesterday).&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-115749637832495729?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/115749637832495729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=115749637832495729' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/115749637832495729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/115749637832495729'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/09/ls-and-find.html' title='ls and find'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-115721375613114573</id><published>2006-09-02T18:12:00.000+02:00</published><updated>2006-09-02T18:15:56.140+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Benchmarking Filesystems - part II</title><content type='html'>There is &lt;a href="http://www.debian-administration.org/articles/388"&gt;another&lt;/a&gt; article benchmarking Linux's filesystems. And the winner is XFS - again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-115721375613114573?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/115721375613114573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=115721375613114573' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/115721375613114573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/115721375613114573'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/09/benchmarking-filesystems-part-ii.html' title='Benchmarking Filesystems - part II'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-115625301110631905</id><published>2006-08-22T15:20:00.000+02:00</published><updated>2006-08-22T15:23:31.136+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Crux'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Mcabber</title><content type='html'>I've found  very nice, small but powerful console jabber client. It's name is &lt;a href="http://www.lilotux.net/~mikael/mcabber/"&gt;Mcabber&lt;/a&gt;. I also created its &lt;a href="http://wawrzek.name/Crux/Ports/"&gt;port&lt;/a&gt; for Crux.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-115625301110631905?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/115625301110631905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=115625301110631905' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/115625301110631905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/115625301110631905'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/08/mcabber.html' title='Mcabber'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-115589954985725605</id><published>2006-08-18T12:58:00.000+02:00</published><updated>2006-08-18T13:12:39.996+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='quantum chemistry'/><category scheme='http://www.blogger.com/atom/ns#' term='Dalton'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>My dalton's problems</title><content type='html'>I created a &lt;a href="http://www.mml.ch.pwr.wroc.pl/%7Eniewod/Dalton/"&gt;website&lt;/a&gt;, where I share some info about my problems with Dalton. At the moment there is only one point (problems with HF direct convergence).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-115589954985725605?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/115589954985725605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=115589954985725605' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/115589954985725605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/115589954985725605'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/08/my-daltons-problems.html' title='My dalton&apos;s problems'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-115529508988574307</id><published>2006-08-11T12:37:00.000+02:00</published><updated>2006-08-11T13:18:09.910+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='awk'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><category scheme='http://www.blogger.com/atom/ns#' term='sed'/><category scheme='http://www.blogger.com/atom/ns#' term='computing'/><title type='text'>Full info about your jobs in PBS</title><content type='html'>To get full info about job in PBS you have to use &lt;b&gt;-f&lt;/b&gt; option, but it doesn't work with &lt;b&gt;-u $USER&lt;/b&gt; option, so you get a list of all jobs, or you have to know yours job id. To get around this problem I created this one line 'script':&lt;pre&gt;qstat -f `qstat -u $USER |grep $USER |awk {'print $1'} |sed 's/[a-z.]//g'`&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;qstat -u $USER&lt;/b&gt; - create the list of all user jobs,&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;grep $USER&lt;/span&gt; - cut lines with usernames,&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;awk {'print $1'}&lt;/span&gt; - prints only column with job id (first one),&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;sed 's/[a-z.]//g' &lt;/span&gt;- delete all letters and dots from it.
&lt;/li&gt;&lt;/ul&gt; After that you have only id numbers which can be use with &lt;span style="font-weight: bold;"&gt;qstat -f&lt;/span&gt;. You can extent this command further, i.e. to get info about host where you job is running, by adding &lt;span style="font-weight: bold;"&gt;grep host&lt;/span&gt; (it can be very useful at a cluster).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-115529508988574307?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/115529508988574307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=115529508988574307' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/115529508988574307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/115529508988574307'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/08/full-info-about-your-jobs-in-pbs.html' title='Full info about your jobs in PBS'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19023061.post-115339685301668011</id><published>2006-07-20T13:58:00.000+02:00</published><updated>2006-11-19T00:40:15.961+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Gamess'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Gaussian'/><category scheme='http://www.blogger.com/atom/ns#' term='quantum chemistry'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><category scheme='http://www.blogger.com/atom/ns#' term='computing'/><title type='text'>CCLib</title><content type='html'>The new version (0.5) of &lt;a href="http://cclib.sf.net/"&gt;CCLib&lt;/a&gt; has been release. CCLib is  an open source library, written in Python, for parsing and interpreting the results of computational chemistry packages. It                                                  currently parses output files from ADF, GAMESS (US), Gaussian, and PC GAMESS.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19023061-115339685301668011?l=larryn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://larryn.blogspot.com/feeds/115339685301668011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19023061&amp;postID=115339685301668011' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/115339685301668011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19023061/posts/default/115339685301668011'/><link rel='alternate' type='text/html' href='http://larryn.blogspot.com/2006/07/cclib.html' title='CCLib'/><author><name>Wawrzyniec Niewodniczański</name><uri>https://profiles.google.com/116413000559005987182</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-jtjPfzGg_EQ/AAAAAAAAAAI/AAAAAAAAAAA/1KeTqjPipDI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
