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

<channel>
	<title>KarkomaOnline &#187; Tips and Tricks</title>
	<atom:link href="http://www.karkomaonline.com/index.php/category/tips-and-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.karkomaonline.com</link>
	<description>a Blog for SysAdmins and Unix stuff in general</description>
	<lastBuildDate>Thu, 25 Nov 2010 07:49:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>vnstat</title>
		<link>http://www.karkomaonline.com/index.php/2010/11/vnstat/</link>
		<comments>http://www.karkomaonline.com/index.php/2010/11/vnstat/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 11:07:12 +0000</pubDate>
		<dc:creator>karkoma</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux Debian]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[stats]]></category>

		<guid isPermaLink="false">http://www.karkomaonline.com/?p=286</guid>
		<description><![CDATA[vnStat is a wonderful tool that will allow you to grab traffic information from you network interfaces]]></description>
			<content:encoded><![CDATA[<p>vnStat is a wonderful tool that will allow you to grab traffic information from you network interfaces.</p>
<p>From its homepage&#8230;</p>
<blockquote><p>vnStat is a console-based network traffic monitor for Linux and BSD that keeps a log of network traffic for the selected interface(s). It uses the network interface statistics provided by the kernel as information source. This means that vnStat won&#8217;t actually be sniffing any traffic and also ensures light use of system resources. However, in Linux at least a 2.2 series kernel is required.</p></blockquote>
<p><span id="more-286"></span></p>
<p>Now let&#8217;s install it, for example in Debian:</p>
<p><code>apt-get install vnstat</code></p>
<p>Then create a new database to store data:</p>
<p><code>vnstat -u -i eth0</code></p>
<p>Please take note to change eth0 with the interface you want to monitor.</p>
<p>When vnstat has collected enough data you can start using it.</p>
<p>Show daily stats:</p>
<p><code>vnstat -d</code></p>
<p><code>eth0  /  daily</p>
<p><code><br />
day         rx      |     tx      |  total<br />
------------------------+-------------+-------------------------<br />
18.10.     24.37 MB  |   40.08 MB  |   64.45 MB   %::<br />
19.10.     25.38 MB  |   52.44 MB  |   77.82 MB   %:::<br />
20.10.     31.53 MB  |   48.58 MB  |   80.11 MB   %%::<br />
21.10.     29.74 MB  |   60.76 MB  |   90.50 MB   %%:::<br />
22.10.     26.58 MB  |   39.07 MB  |   65.65 MB   %::<br />
23.10.     27.87 MB  |   39.51 MB  |   67.38 MB   %::<br />
24.10.     21.90 MB  |   33.94 MB  |   55.83 MB   %::<br />
25.10.    360.79 MB  |   69.73 MB  |  430.52 MB   %%%%%%%%%%%%%%%%%%%%%::::<br />
26.10.     31.44 MB  |   58.90 MB  |   90.34 MB   %%:::<br />
27.10.     29.08 MB  |   39.57 MB  |   68.65 MB   %::<br />
28.10.     28.98 MB  |   39.78 MB  |   68.76 MB   %::<br />
29.10.     27.16 MB  |   40.00 MB  |   67.16 MB   %::<br />
30.10.     26.07 MB  |   68.56 MB  |   94.63 MB   %::::<br />
31.10.     24.53 MB  |   29.31 MB  |   53.84 MB   %::<br />
01.11.     27.73 MB  |   37.07 MB  |   64.79 MB   %::<br />
02.11.     31.18 MB  |   53.65 MB  |   84.84 MB   %:::<br />
03.11.     36.02 MB  |   56.06 MB  |   92.08 MB   %%:::<br />
04.11.     33.21 MB  |   54.05 MB  |   87.26 MB   %%:::<br />
05.11.     29.01 MB  |   39.66 MB  |   68.67 MB   %::<br />
06.11.     26.97 MB  |   45.86 MB  |   72.83 MB   %:::<br />
07.11.     25.08 MB  |   32.49 MB  |   57.57 MB   %::<br />
08.11.     65.92 MB  |   44.18 MB  |  110.09 MB   %%%%::<br />
09.11.     29.99 MB  |   58.19 MB  |   88.18 MB   %%:::<br />
10.11.     31.84 MB  |   58.90 MB  |   90.74 MB   %%:::<br />
11.11.     29.44 MB  |   50.83 MB  |   80.28 MB   %:::<br />
12.11.     28.17 MB  |   36.99 MB  |   65.16 MB   %::<br />
13.11.     26.67 MB  |   31.74 MB  |   58.42 MB   %::<br />
14.11.     26.06 MB  |   30.40 MB  |   56.46 MB   %::<br />
15.11.     31.31 MB  |   45.36 MB  |   76.67 MB   %%::<br />
16.11.     26.83 MB  |   45.36 MB  |   72.20 MB   %:::<br />
------------------------+-------------+-------------------------<br />
estimated       31 MB  |      54 MB  |      85 MB<br />
</code></p>
<p>Show monthly stats:</p>
<p><code>vnstat -m</code></p>
<p><code>eth0  /  monthly</code></p>
<p><code><br />
month         rx      |      tx      |   total<br />
-------------------------+--------------+-----------------------<br />
Dec '09     780.78 MB  |     1.33 GB  |     2.10 GB   %%%%%::::::::<br />
Jan '10     888.01 MB  |     2.50 GB  |     3.37 GB   %%%%%%::::::::::::::::<br />
Feb '10     702.00 MB  |     1.30 GB  |     1.98 GB   %%%%::::::::<br />
Mar '10     776.67 MB  |     1.42 GB  |     2.18 GB   %%%%%:::::::::<br />
Apr '10       1.01 GB  |     1.54 GB  |     2.55 GB   %%%%%%::::::::::<br />
May '10     831.43 MB  |     1.56 GB  |     2.37 GB   %%%%%::::::::::<br />
Jun '10     831.70 MB  |     1.34 GB  |     2.15 GB   %%%%%:::::::::<br />
Jul '10     859.46 MB  |     1.61 GB  |     2.45 GB   %%%%%:::::::::::<br />
Aug '10     870.38 MB  |     1.50 GB  |     2.35 GB   %%%%%::::::::::<br />
Sep '10     814.80 MB  |     1.39 GB  |     2.19 GB   %%%%%:::::::::<br />
Oct '10       1.13 GB  |     1.34 GB  |     2.47 GB   %%%%%%%:::::::::<br />
Nov '10     505.44 MB  |   720.80 MB  |     1.20 GB   %%%::::<br />
-------------------------+--------------+-----------------------<br />
estimated       959 MB  |     1.33 GB  |     2.27 GB<br />
</code></p>
<p>Show the top 10:</p>
<p><code>vnstat -t</code></p>
<p><code>eth0  /  top 10</code></p>
<p><code><br />
#       day         rx      |     tx      |  total<br />
-------------------------------+-------------+------------------<br />
1    23.06.09     64.76 MB  |    1.95 GB  |    2.02 GB   %:::::::::::::::::<br />
2    06.01.10     50.75 MB  |    1.13 GB  |    1.18 GB   ::::::::::<br />
3    25.10.10    360.79 MB  |   69.73 MB  |  430.52 MB   %%%<br />
4    19.04.10    130.48 MB  |  156.69 MB  |  287.17 MB   %:<br />
5    20.05.09     76.08 MB  |  177.39 MB  |  253.48 MB   %:<br />
6    27.08.09    142.93 MB  |   50.10 MB  |  193.03 MB   %<br />
7    28.04.10    134.25 MB  |   58.06 MB  |  192.31 MB   %<br />
8    06.11.09    132.06 MB  |   59.30 MB  |  191.35 MB   %<br />
9    25.05.09     49.61 MB  |  124.27 MB  |  173.88 MB   :<br />
10    21.05.09     30.63 MB  |  139.71 MB  |  170.34 MB   :<br />
-------------------------------+-------------+------------------<br />
</code></p>
<p>For more info:</p>
<ul>
<li><code>vnstat --help</code></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.karkomaonline.com/index.php/2010/11/vnstat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Description of the file system hierarchy</title>
		<link>http://www.karkomaonline.com/index.php/2009/08/description-of-the-file-system-hierarchy/</link>
		<comments>http://www.karkomaonline.com/index.php/2009/08/description-of-the-file-system-hierarchy/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 22:14:57 +0000</pubDate>
		<dc:creator>karkoma</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Unix facts]]></category>
		<category><![CDATA[File system]]></category>

		<guid isPermaLink="false">http://www.karkomaonline.com/?p=269</guid>
		<description><![CDATA[Description of the file system hierarchy]]></description>
			<content:encoded><![CDATA[<blockquote><p>man hier</p></blockquote>
<p> <img src='http://www.karkomaonline.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.karkomaonline.com/index.php/2009/08/description-of-the-file-system-hierarchy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash script: effectively check if a filesystem is mounted</title>
		<link>http://www.karkomaonline.com/index.php/2009/08/bash-script-effectively-check-if-a-filesystem-is-mounted/</link>
		<comments>http://www.karkomaonline.com/index.php/2009/08/bash-script-effectively-check-if-a-filesystem-is-mounted/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 21:39:41 +0000</pubDate>
		<dc:creator>karkoma</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://www.karkomaonline.com/?p=265</guid>
		<description><![CDATA[Check if file system is mounted]]></description>
			<content:encoded><![CDATA[<p>Whenever you want to check if a file system is mounted and perform some action in you script based on this, the simplest and most accurate way to do it in Linux is to check <em>/proc/mounts</em>:</p>
<blockquote><p>
if grep -qs &#8216;/mnt/sda2&#8242; /proc/mounts; then<br />
     echo &#8220;fs mounted&#8221;<br />
else<br />
     echo &#8220;fs not mounted&#8221;<br />
fi
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.karkomaonline.com/index.php/2009/08/bash-script-effectively-check-if-a-filesystem-is-mounted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to disable IPv6 in Debian</title>
		<link>http://www.karkomaonline.com/index.php/2009/04/how-to-disable-ipv6-in-debian/</link>
		<comments>http://www.karkomaonline.com/index.php/2009/04/how-to-disable-ipv6-in-debian/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 17:08:32 +0000</pubDate>
		<dc:creator>karkoma</dc:creator>
				<category><![CDATA[Linux Debian]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[IPv6]]></category>

		<guid isPermaLink="false">http://www.karkomaonline.com/?p=259</guid>
		<description><![CDATA[Disable IPv6 in Debian]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently installed a new <a href="http://www.openldap.org/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.openldap.org/?referer=');">LDAP</a> server on <a href="http://www.debian.org/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.debian.org/?referer=');">Debian</a> Lenny and I wanted to disable <a href="http://en.wikipedia.org/wiki/IPv6" target="_blank" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/IPv6?referer=');">IPv6</a> as it is unnecessary for me in this moment. With <em>netstat</em> I checked the listening processes:</p>
<blockquote><p>netstat -tunlp</p></blockquote>
<p><code>Active Internet connections (only servers)<br />
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name<br />
tcp        0      0 0.0.0.0:389             0.0.0.0:*               LISTEN      2226/slapd<br />
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      2215/sshd<br />
tcp6       0      0 :::389                  :::*                    LISTEN      2226/slapd<br />
tcp6       0      0 :::22                   :::*                    LISTEN      2215/sshd</code></p>
<p>and <em>lsmod</em> showed something like this:</p>
<p><code>Module                  Size  Used by<br />
ipv6                  235364  12<br />
...</code></p>
<p>So, to disable IPv6 I changed <em>/etc/modprobe.d/aliases</em>:<br />
<code>...<br />
# alias net-pf-10 ipv6<br />
# Disable ipv6<br />
alias net-pf-10 off<br />
alias ipv6 off<br />
...</code></p>
<p>I also disabled these lines in <em>/etc/hosts</em> to avoid confusions:</p>
<p><code>...<br />
## The following lines are desirable for IPv6 capable hosts<br />
#::1     localhost ip6-localhost ip6-loopback<br />
#fe00::0 ip6-localnet<br />
#ff00::0 ip6-mcastprefix<br />
#ff02::1 ip6-allnodes<br />
#ff02::2 ip6-allrouters<br />
#ff02::3 ip6-allhosts</code></p>
<p>Finally I restarted the server.</p>
<blockquote><p>shutdown -r now</p></blockquote>
<p>Now the situation is like this:</p>
<blockquote><p>netstat -tunlp</p></blockquote>
<p><code>Active Internet connections (only servers)<br />
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name<br />
tcp        0      0 0.0.0.0:389             0.0.0.0:*               LISTEN      2233/slapd<br />
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      2216/sshd</code></p>
<blockquote><p>lsmod|grep ipv6</p></blockquote>
<p><code>...</code></p>
<p>No IPv6.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.karkomaonline.com/index.php/2009/04/how-to-disable-ipv6-in-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dig: basic usage</title>
		<link>http://www.karkomaonline.com/index.php/2009/04/dig-basic-usage/</link>
		<comments>http://www.karkomaonline.com/index.php/2009/04/dig-basic-usage/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 21:21:35 +0000</pubDate>
		<dc:creator>karkoma</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[dig]]></category>

		<guid isPermaLink="false">http://www.karkomaonline.com/?p=214</guid>
		<description><![CDATA[Today we are going to take a quick look at dig. According to the man pages: dig (domain information groper) is a flexible tool for interrogating DNS name servers. It performs DNS lookups and displays the answers that are returned from the name server(s) that were queried. Most DNS administrators use dig to troubleshoot DNS [...]]]></description>
			<content:encoded><![CDATA[<p>Today we are going to take a quick look at dig. According to the man pages:</p>
<blockquote><p>dig (domain information groper) is a flexible tool for interrogating DNS name servers. It performs DNS lookups and displays the answers that are returned from the name server(s) that were queried. Most DNS administrators use dig to troubleshoot DNS problems because of its flexibility, ease of use and clarity of output.</p></blockquote>
<p>Let&#8217;s see how to lookup the DNS servers for the domain karkomaonline.com:</p>
<p><code>dig karkomaonline.com -t ns</code></p>
<p>The <em>-t</em> option specifies the query type (<em>a</em>, <em>any</em>, <em>mx</em>, <em>ns</em>, <em>txt</em>&#8230; ), being <em>a</em> the default. The <em>-t ns</em> option will look-up the Name Servers for the domain karkomaonline.com. You should get something like this:</p>
<p><code>; &lt;&lt;&gt;&gt; DiG 9.4.2-P2 &lt;&lt;&gt;&gt; karkomaonline.com -t ns<br />
;; global options:  printcmd<br />
;; Got answer:<br />
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 4825<br />
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1<br />
</code><br />
<code><br />
;; QUESTION SECTION:<br />
;karkomaonline.com.        IN    NS<br />
</code><br />
<code><br />
;; ANSWER SECTION:<br />
karkomaonline.com.    172800    IN    NS    dns010.d.register.com.<br />
karkomaonline.com.    172800    IN    NS    dns024.c.register.com.<br />
karkomaonline.com.    172800    IN    NS    dns071.a.register.com.<br />
karkomaonline.com.    172800    IN    NS    dns150.b.register.com.<br />
</code><br />
<code><br />
;; ADDITIONAL SECTION:<br />
dns010.d.register.com.    48    IN    A    216.21.236.10<br />
</code><br />
<code><br />
;; Query time: 172 msec<br />
;; SERVER: 192.168.1.9#53(192.168.1.9)<br />
;; WHEN: Wed Apr 15 22:46:35 2009<br />
;; MSG SIZE  rcvd: 152<br />
</code></p>
<p>The interesting part is the ANSWER SECTION, that lists the name servers for the mentioned domain. You can get a shorter output of the same command:</p>
<p><code>dig karkomaonline.com -t ns +short</code></p>
<p><code>dns010.d.register.com.<br />
dns071.a.register.com.<br />
dns024.c.register.com.<br />
dns150.b.register.com.</code></p>
<p>Now look up the mail servers for the same domain:</p>
<p><code>dig karkomaonline.com -t mx</code></p>
<p><code>...<br />
;; ANSWER SECTION:<br />
karkomaonline.com.    86400    IN    MX    0 mailhost.karkomaonline.com.<br />
...</code></p>
<p>From the output of the first example you can see that by default dig queried my internal DNS server (configured in <em>/etc/resolv.conf</em>):</p>
<p><code>...<br />
;; SERVER: 192.168.1.9#53(192.168.1.9)<br />
...<br />
</code><br />
You can change this behaviour by instructing dig to query a specific name server:</p>
<p><code>dig @dns010.d.register.com karkomaonline.com -t mx</code></p>
<p><code>...<br />
;; ANSWER SECTION:<br />
karkomaonline.com.    86400    IN    MX    0 mailhost.karkomaonline.com.<br />
</code><br />
<code><br />
;; ADDITIONAL SECTION:<br />
mailhost.karkomaonline.com. 86400 IN    A    94.75.208.171<br />
</code><br />
<code><br />
;; Query time: 181 msec<br />
;; SERVER: 216.21.236.10#53(216.21.236.10)<br />
...<br />
</code></p>
<p>Note that the queried server now is 216.21.236.10.</p>
<p><strong>More info:</strong>:</p>
<ul>
<li><a href="http://www.manpagez.com/man/1/dig/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.manpagez.com/man/1/dig/?referer=');">man page</a></li>
<li><a href="http://www.madboa.com/geek/dig/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.madboa.com/geek/dig/?referer=');"> howto</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.karkomaonline.com/index.php/2009/04/dig-basic-usage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ISO image as a filesystem</title>
		<link>http://www.karkomaonline.com/index.php/2009/01/iso-image-as-a-filesystem/</link>
		<comments>http://www.karkomaonline.com/index.php/2009/01/iso-image-as-a-filesystem/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 17:59:37 +0000</pubDate>
		<dc:creator>karkoma</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[mount]]></category>

		<guid isPermaLink="false">http://www.karkomaonline.com/?p=196</guid>
		<description><![CDATA[If you want to mount an ISO image as a filesystem, simply proceed as follows: mkdir /mnt/iso0 mount -o loop -t iso9660 /tmp/debian-40r6-amd64-netinst.iso  /mnt/iso0]]></description>
			<content:encoded><![CDATA[<p>If you want to mount an ISO image as a filesystem, simply proceed as follows:</p>
<blockquote><p>
mkdir /mnt/iso0<br />
mount -o loop -t iso9660 /tmp/debian-40r6-amd64-netinst.iso  /mnt/iso0
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.karkomaonline.com/index.php/2009/01/iso-image-as-a-filesystem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>System stats with saidar</title>
		<link>http://www.karkomaonline.com/index.php/2008/04/system-stats-with-saidar/</link>
		<comments>http://www.karkomaonline.com/index.php/2008/04/system-stats-with-saidar/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 10:38:50 +0000</pubDate>
		<dc:creator>karkoma</dc:creator>
				<category><![CDATA[Linux Debian]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[saidar]]></category>

		<guid isPermaLink="false">http://www.karkomaonline.com/?p=183</guid>
		<description><![CDATA[saidar is a top like tool. It provides a curses based interface for viewing system statistics such as network I/O, disk I/O, CPU, memory and more. The core of the functionality is provided by the libstatgrab library: libstatgrab is a library that provides cross platform access to statistics about the system on which it's run. [...]]]></description>
			<content:encoded><![CDATA[<p>saidar is a top like tool. It provides a curses based interface for viewing system statistics such as network I/O, disk I/O, CPU, memory and more. The core of the functionality is provided by the <a href="http://www.i-scream.org/libstatgrab/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.i-scream.org/libstatgrab/?referer=');">libstatgrab</a> library:</p>
<p><code>libstatgrab is a library that provides cross platform access to statistics about the system on which it's run. It's written in C and presents a selection of useful interfaces which can be used to access key system statistics. The current list of statistics includes CPU usage, memory utilisation, disk usage, process counts, network traffic, disk I/O, and more.</code></p>
<p>On a Debian system install the package as usual:</p>
<blockquote><p>apt-get install saidar</p></blockquote>
<p>and then run:</p>
<blockquote><p>saidar</p></blockquote>
<p><a href='http://www.karkomaonline.com/wp-content/uploads/2008/04/saidar2.png'><img src="http://www.karkomaonline.com/wp-content/uploads/2008/04/saidar2.png" alt="Saidar in action" title="saidar2" width="500" height="307" class="aligncenter size-full wp-image-185" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.karkomaonline.com/index.php/2008/04/system-stats-with-saidar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Serial terminal support in GRUB</title>
		<link>http://www.karkomaonline.com/index.php/2008/02/serial-terminal-support-in-grub/</link>
		<comments>http://www.karkomaonline.com/index.php/2008/02/serial-terminal-support-in-grub/#comments</comments>
		<pubDate>Sat, 09 Feb 2008 08:45:13 +0000</pubDate>
		<dc:creator>karkoma</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Grub]]></category>

		<guid isPermaLink="false">http://www.karkomaonline.com/index.php/2008/02/09/serial-terminal-support-in-grub/</guid>
		<description><![CDATA[In some situations it is very useful to have the possibility to access the GRUB boot menu from a serial line. For example you could remotely reboot your machine with the new kernel you just compiled. In my case I have a couple of remote machines linked together by a serial cable. I can log [...]]]></description>
			<content:encoded><![CDATA[<p>In some situations it is very useful to have the possibility to access the GRUB boot menu from a serial line. For example you could remotely reboot your machine with the new kernel you just compiled.</p>
<p>In my case I have a couple of remote machines linked together by a serial cable. I can log into machine A via ssh and get the Grub menu of machine B through <a href="http://alioth.debian.org/projects/minicom/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/alioth.debian.org/projects/minicom/?referer=');">minicom</a>. Thus I can boot whatever OS/kernel I want as if I were in front of the machine. Kind of KVM IP for the rest of us.</p>
<p>Simply add this to Grub&#8217;s menu.lst:</p>
<blockquote><p> serial &#8211;unit=0 &#8211;speed=9600 &#8211;word=8 &#8211;parity=no &#8211;stop=1<br />
terminal serial</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.karkomaonline.com/index.php/2008/02/serial-terminal-support-in-grub/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL: quick replacement</title>
		<link>http://www.karkomaonline.com/index.php/2007/12/mysql-quick-replacement/</link>
		<comments>http://www.karkomaonline.com/index.php/2007/12/mysql-quick-replacement/#comments</comments>
		<pubDate>Thu, 06 Dec 2007 04:45:44 +0000</pubDate>
		<dc:creator>karkoma</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://www.karkomaonline.com/index.php/2007/12/06/mysql-quick-replacement/</guid>
		<description><![CDATA[Say that you have a table called myTable with several rows and a column called URL that contains the IP address of a log server. Now imagine that you want to change the value of URL so IP address is substituted by the server name. One way to do that is as follows: use dbname [...]]]></description>
			<content:encoded><![CDATA[<p>Say that you have a table called myTable with several rows and a column called URL that contains the IP address of a log server. Now imagine that you want to change the value of URL so IP address is substituted by the server name. One way to do that is as follows:</p>
<blockquote><p>use dbname</p>
<p>update myTbl set URL=replace(URL,&#8217;172.16.1.10&#8242;,&#8217;logserver&#8217;);</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.karkomaonline.com/index.php/2007/12/mysql-quick-replacement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenSSH: simplifying logins</title>
		<link>http://www.karkomaonline.com/index.php/2007/12/openssh-simplifying-logins/</link>
		<comments>http://www.karkomaonline.com/index.php/2007/12/openssh-simplifying-logins/#comments</comments>
		<pubDate>Thu, 06 Dec 2007 04:21:09 +0000</pubDate>
		<dc:creator>karkoma</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[OpenSSH]]></category>

		<guid isPermaLink="false">http://www.karkomaonline.com/index.php/2007/12/06/openssh-simplifying-logins/</guid>
		<description><![CDATA[OpenSSH provides a per-user configuration file usually located in ~/.ssh/config. This file can help ease your life as Sysadmin. Let&#8217;s say that you frequently connect to a server in this way: ssh admin@boring-servername.boring-domain.com With OpenSSH there is an easy way to do the job. Edit or create a config file: vi ~/.ssh/config and then add [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.openbsd.org/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.openbsd.org/?referer=');">OpenSSH</a> provides a per-user configuration file usually located in ~/.ssh/config. This file can help ease your life as Sysadmin. Let&#8217;s say that you frequently connect to a server in this way:</p>
<blockquote><p>ssh admin@boring-servername.boring-domain.com</p></blockquote>
<p>With OpenSSH there is an easy way to do the job. Edit or create a <em>config</em> file:</p>
<blockquote><p>vi ~/.ssh/config</p></blockquote>
<p>and then add the following:</p>
<blockquote><p> Host servername<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;User admin<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HostName boring-servername.boring-domain.com</p></blockquote>
<p>Where Host is the alias for the remote server you want to connect to, HostName is the full name of the remote server and User is the login name.</p>
<p><strong>References</strong>:</p>
<ul>
<li>man <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ssh_config" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.openbsd.org/cgi-bin/man.cgi?query=ssh_config&amp;referer=');">ssh_config </a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.karkomaonline.com/index.php/2007/12/openssh-simplifying-logins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

