<?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>Admon Home</title>
	<atom:link href="http://www.admon.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.admon.org</link>
	<description>Linux System Administration</description>
	<lastBuildDate>Sat, 19 May 2012 03:36:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Murphy&#8217;s Laws &#8211; A Realistic View of Life</title>
		<link>http://www.admon.org/murphys-laws-a-realistic-view-of-life/</link>
		<comments>http://www.admon.org/murphys-laws-a-realistic-view-of-life/#comments</comments>
		<pubDate>Sat, 19 May 2012 03:35:46 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[mistake]]></category>
		<category><![CDATA[murphylaws]]></category>

		<guid isPermaLink="false">http://www.admon.org/?p=1106</guid>
		<description><![CDATA[The first time I was trying to make a collection of Murphy&#8217;s laws was 2 years ago. Now it comes with updates in a list of areas around IT industry. The original version is from Jcdverha.home. The Prime axiom: In any field of scientific endeavor, anything that can go wrong, will. (Including the Law itself.) [...]]]></description>
			<content:encoded><![CDATA[<p>The first time I was trying to make a collection of <a title="Murphy's law" href="http://en.wikipedia.org/wiki/Murphy's_law" target="_blank">Murphy&#8217;s laws</a> was 2 years ago. Now it comes with updates in a list of areas around IT industry. The original version is from <a title="Murphy's Laws" href="http://jcdverha.home.xs4all.nl/">Jcdverha.home</a>.<span id="more-1106"></span></p>
<p>The Prime axiom: In any field of scientific endeavor, anything that can go wrong, will. (Including the Law itself.)</p>
<p>2. If the possibility exists of several things going wrong, the one that will go wrong is the one that will do the most damage.<br />
3. Everything will go wrong at one time.<br />
3.1 That time is always when you least expect it.<br />
4. If nothing can go wrong, something will.<br />
5. Nothing is as easy as it looks.<br />
6. Everything takes longer than you think.<br />
7. Left to themselves, things always go from bad to worse.<br />
8. Nature always sides with the hidden flaw.<br />
9. Given the most inappropriate time for something to go wrong, that&#8217;s when it will occur.<br />
10. Mother Nature is a bitch.<br />
10.1 The universe is not indifferent to intelligence, it is actively hostile to it.<br />
11. If everything seems to be going well, you have obviously overlooked something.<br />
12. If in any problem you find yourself doing an immense amount of work, the answer can be obtained by simple inspection.<br />
13. Never make anything simple and efficient when a way can be found to make it complex and wonderful.<br />
14. If it doesn&#8217;t fit, use a bigger hammer.<br />
15. In an instrument or device characterized by a number of plus-or-minus errors, the total error will be the sum of all the errors adding in the same direction.<br />
16. In any given calculation, the fault will never be placed if more than one person is involved.<br />
16.1 In any given discovery, the credit will never be properly placed if more than one person is involved.<br />
17. All warranty and guarantee clauses become invalid upon payment of the final invoice.<br />
18. Murphy&#8217;s Law: &#8220;If there are two or more ways to do something, and one of those ways can result in a catastrophe, then someone will do it.&#8221;</p>
<p>Folks&#8217; updates in IT area can be found here at <a title="home.xs4all.nl" href="http://jcdverha.home.xs4all.nl/scijokes/9_6.html" target="_blank">jcdverha.home.xs4all.nl</a>&#8230; Enjoying reading.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.admon.org/murphys-laws-a-realistic-view-of-life/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Enable logging in SFTP</title>
		<link>http://www.admon.org/enable-logging-in-sftp/</link>
		<comments>http://www.admon.org/enable-logging-in-sftp/#comments</comments>
		<pubDate>Thu, 10 May 2012 13:33:37 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[System Tuning]]></category>
		<category><![CDATA[internal-sftp]]></category>
		<category><![CDATA[sftp]]></category>
		<category><![CDATA[syslog]]></category>

		<guid isPermaLink="false">http://www.admon.org/?p=1097</guid>
		<description><![CDATA[As from OpenSSH-4.4, we can add command line args for the sftp-server subsystem configuration. When combined with these arguments, it allows us to log what is running during an sftp session. To enable the logging feature in SFTP, we need to adjust /etc/ssh/sshd_config and /etc/syslog.conf. Below is the steps. 1. Replace the Susbsystem line in [...]]]></description>
			<content:encoded><![CDATA[<p>As from <a title="OpenSSH-4.4" href="http://www.openssh.com/txt/release-4.4" target="_blank">OpenSSH-4.4</a>, we can add command line args for the <strong>sftp-server</strong> subsystem configuration. When combined with these arguments, it allows us to log what is running during an sftp session.<span id="more-1097"></span></p>
<p>To enable the logging feature in SFTP, we need to adjust <em>/etc/ssh/sshd_config</em> and <em>/etc/syslog.conf</em>. Below is the steps.</p>
<p>1. Replace the Susbsystem line in <em>/etc/ssh/sshd_config</em> with</p>
<pre>Subsystem sftp /usr/libexec/openssh/sftp-server -f LOCAL5 -l INFO</pre>
<p>2. Add the following line to <em>/etc/syslog.conf</em>:</p>
<pre>#sftp logging
local5.* /var/log/sftpd.log</pre>
<p>Finally restart the syslogd and sshd services, it&#8217;s done. Now try an sftp upload and check the access logs in /var/log/sftpd.log</p>
<p>If you are running a chrooted SFTP environment, it&#8217;s gonna be a little different in /etc/ssh/sshd_config, and the expected line would be:</p>
<pre>Subsystem sftp internal-sftp -f LOCAL5 -l INFO</pre>
<p>Below is an example output:</p>
<pre>May  8 10:31:15 FTP01 internal-sftp[21575]: session opened for local user joseph from [10.12.1.1]
May  8 10:31:16 FTP01 internal-sftp[21575]: opendir "/joseph/"
May  8 10:31:16 FTP01 internal-sftp[21575]: closedir "/joseph/"
May  8 10:31:19 FTP01 internal-sftp[21575]: session closed for local user joseph from [10.12.1.1]</pre>
<p>Furthermore, you can add a <a href="http://linux.die.net/man/8/logrotate" target="_blank">logrotate</a> config file to handle sftp.log as other system log files, in case it grows too big.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.admon.org/enable-logging-in-sftp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert unix timestamp to readable date</title>
		<link>http://www.admon.org/convert-unix-timestamp-to-readable-date/</link>
		<comments>http://www.admon.org/convert-unix-timestamp-to-readable-date/#comments</comments>
		<pubDate>Sun, 29 Apr 2012 15:37:11 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[timestamp]]></category>

		<guid isPermaLink="false">http://www.admon.org/?p=1100</guid>
		<description><![CDATA[Unix time, or POSIX time, is a system for describing instants in time, defined as the number of seconds elapsed since midnight Coordinated Universal Time (UTC) of Thursday, January 1, 1970 (Unix times are defined, but negative before that date), not counting leap seconds. It is used widely in Unix-like and many other operating systems [...]]]></description>
			<content:encoded><![CDATA[<p>Unix time, or POSIX time, is a system for describing instants in time, defined as the number of seconds elapsed since midnight <a title="Coordinated Universal Time" href="http://en.wikipedia.org/wiki/Coordinated_Universal_Time" target="_blank">Coordinated Universal Time (UTC)</a> of <strong>Thursday, January 1, 1970</strong> (Unix times are defined, but negative before that date), not counting leap seconds. It is used widely in Unix-like and many other operating systems and file formats.<span id="more-1100"></span></p>
<p>As a unix time is an large integer, we will show how to convert it into human readable format in different ways.</p>
<p><strong>Convert a timestamp by Shell command</strong></p>
<pre>$ date -d @1335667666
Sun Apr 29 10:47:46 CST 2012</pre>
<p>You can always use the previous command under a Linux:</p>
<pre>$ date -d @1335667666 "+%Y-%m-%d %T"
2012-04-29 10:47:46</pre>
<p>Accordingly, you can convert a date to unix timestamp as below:</p>
<pre>$ date -d "2012-04-29 10:47:46" "+%s"
1335667666</pre>
<p><strong>Convert a timestamp by Perl</strong><br />
Well, it&#8217;s just one liner as below:</p>
<pre>$ perl -e 'print scalar localtime (1335667666),"\n"'
Sun Apr 29 10:47:46 2012</pre>
<p><strong>Other ways to Convert a Unix timestamp</strong><br />
1, PHP</p>
<pre>date('d.m.Y H:i:s', 1335667666);</pre>
<p>2, MySQL</p>
<pre>select from_unixtime(1335667666);</pre>
<p>3, JavaScript</p>
<pre>new Date(1335667666*1000).toString()</pre>
<p>4, C++</p>
<pre>time_t epch =1335667666;
printf("%i -&gt; %s", epch, asctime(gmtime(&amp;epch))); (time.h)</pre>
<p>5, Java</p>
<pre>new SimpleDateFormat("MM/dd/yyyy HH:mm:ss").format(new Date(1335667666* 1000L))</pre>
<p>6, gawk<br />
To convert this timestamp into something readable, copy below two lines into a small script &#8220;time-convert.gawk&#8221; and make it executable.</p>
<pre>#!/bin/gawk -f
{ print strftime("%c", $0); }</pre>
<p>Then call the tool with the following command:</p>
<pre>$ echo 1335667666 | ./time-convert.gawk
Sun 29 Apr 2012 10:47:46 AM CST</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.admon.org/convert-unix-timestamp-to-readable-date/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Redirect and forward a port in Linux</title>
		<link>http://www.admon.org/redirect-and-forward-a-port-in-linux/</link>
		<comments>http://www.admon.org/redirect-and-forward-a-port-in-linux/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 20:36:36 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[portfwd]]></category>
		<category><![CDATA[redirect]]></category>

		<guid isPermaLink="false">http://www.admon.org/?p=1094</guid>
		<description><![CDATA[There are ways to do port forwarding and redirection. We will show some examples here. Redirect a port When you need to redirect a port to another one on local host, it&#8217;s quite easy, here is the trick: # iptables -t nat -I PREROUTING -p tcp --dport 1129 -j REDIRECT --to-ports 5029 It will redirect [...]]]></description>
			<content:encoded><![CDATA[<p>There are ways to do port forwarding and redirection. We will show some examples here.</p>
<p><strong>Redirect a port</strong><br />
When you need to redirect a port to another one on local host, it&#8217;s quite easy, here is the trick<span id="more-1094"></span>:</p>
<pre># iptables -t nat -I PREROUTING -p tcp --dport 1129 -j REDIRECT --to-ports 5029</pre>
<p>It will redirect the tcp port 1129 to 5029. In other words, your services running on port 5029 is now available at 1129 as well.</p>
<p><strong>Forward a port to another server</strong><br />
Before moving ahead, make sure you have enabled need to enable IP forwarding. IP forwarding allows your computer to act as a router, you can do that as this:</p>
<pre># echo 1 &gt; /proc/sys/net/ipv4/ip_forward</pre>
<p>Then two iptables commands are needed, in order to process the inbound and outbound traffic.<br />
Below example show how to redirect 192.168.120.10:8080 to 172.16.172.16:3306, the two commands need to run on 192.168.120.10.</p>
<pre># iptables -A PREROUTING -t nat -p tcp -m tcp --dport 8080 -j DNAT -to-destination 172.16.172.16:3306
# iptables -A POSTROUTING -t nat -d 172.16.172.16 -p tcp -m tcp --dport 3306 -j SNAT --to-source 192.168.120.10</pre>
<p>Related topics can be found <a href="http://tldp.org/HOWTO/TransparentProxy.html" target="_blank">here at tldp.org</a>.</p>
<p>Alternatively, you can <strong>Using portfwd</strong>.<br />
<a title="portfwd" href="http://portfwd.sourceforge.net/" target="_blank">Portfwd</a> stands for port forwarding daemon. It&#8217;s a small C++ utility which forwards incoming TCP connections and/or UDP packets to remote hosts.<br />
Then the above usage example can be created as below:</p>
<pre>joseph@admon$ cat portfwd.cfg
user  nobody
group nobody

tcp /* TCP connections */
{
/*
* Forward localhost:8080 to 172.16.172.16:3306
*/
8080 { =&gt; 172.16.172.16:3306 }
}

joseph@admon$ ./portfwd -c portfwd.cfg</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.admon.org/redirect-and-forward-a-port-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find out which processes are swapping</title>
		<link>http://www.admon.org/find-out-which-processes-are-swapping/</link>
		<comments>http://www.admon.org/find-out-which-processes-are-swapping/#comments</comments>
		<pubDate>Sat, 24 Mar 2012 02:17:12 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[proc]]></category>
		<category><![CDATA[swap]]></category>

		<guid isPermaLink="false">http://www.admon.org/?p=1086</guid>
		<description><![CDATA[Have you ever been complained that servers are getting slower and slower, and with the command free, you see that a bit of swap is used and wondering what processes are swapping ? It’s usually not very indicative of anything, or even overly helpful knowing what’s there, mostly just a curiosity thing. Anyway, starting from [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-1087" title="/proc filesystem" src="http://www.admon.org/wp-content/uploads/2012/03/Screen-Shot-2012-03-24-at-10.14.38-AM.png" alt="" width="222" height="186" />Have you ever been complained that servers are getting slower and slower, and with the command <em>free</em>, you see that a bit of swap is used and wondering what processes are swapping ?<span id="more-1086"></span></p>
<p>It’s usually not very indicative of anything, or even overly helpful knowing what’s there, mostly just a curiosity thing.</p>
<p>Anyway, starting from <a title="Kernel 2.6.14 released" href="http://www.osnews.com/story/12432" target="_blank">kernel 2.6.14</a>, we can find out how much swap are being used by each running process. These details can be found in <a href="http://linux.die.net/man/5/proc" target="_blank">/proc</a>. Below is a simple bash script which prints out running processes with their swap usage if they do use swap space. More details about <a title="/proc filesystem" href="http://linux.die.net/man/5/proc" target="_blank">smaps</a> can be found here.</p>
<pre>#!/bin/bash
#
# Get current swap usage for running processes
# Erik Ljungstrom &lt;http://northernmost.org/&gt; 27/05/2011

SUM=0
OVERALL=0

for DIR in `find /proc/ -maxdepth 1 -type d | egrep "^/proc/[0-9]"` ; do
     PID=`echo $DIR | cut -d / -f 3`
     PROGNAME=`ps -p $PID -o comm --no-headers`

     for SWAP in `grep Swap $DIR/smaps 2&gt;/dev/null| awk '{print $2}'`
     do
          let SUM=$SUM+$SWAP
     done

     [ $SUM -gt 0 ] &amp;&amp; echo "PID=$PID - Swap used: $SUM KBytes- ($PROGNAME)"
     let OVERALL=$OVERALL+$SUM
     SUM=0
done

echo "Overall swap used: $OVERALL KBytes"</pre>
<p>As it checks all running processes, root permission is needed to run this script. It still works even if you don’t run with root permission, and it report 0 for any processes not owned by current user. Below is an output example:</p>
<pre>$ sudo /tmp/swap.sh
PID=2817 - Swap used: 116 KBytes- (brcm_iscsiuio)
PID=2828 - Swap used: 76 KBytes- (iscsid)
PID=3011 - Swap used: 184 KBytes- (auditd)
PID=3013 - Swap used: 148 KBytes- (audispd)
PID=3035 - Swap used: 100 KBytes- (syslogd)
PID=3038 - Swap used: 84 KBytes- (klogd)
PID=3048 - Swap used: 56 KBytes- (irqbalance)
PID=3066 - Swap used: 128 KBytes- (portmap)
PID=3123 - Swap used: 136 KBytes- (rpc.statd)
PID=3151 - Swap used: 492 KBytes- (rpc.idmapd)
PID=3230 - Swap used: 228 KBytes- (dbus-daemon)
PID=3307 - Swap used: 88 KBytes- (acpid)
PID=3399 - Swap used: 164 KBytes- (nscd)
PID=3415 - Swap used: 7520 KBytes- (snmpd)</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.admon.org/find-out-which-processes-are-swapping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache 2.4: The Major Enhancements</title>
		<link>http://www.admon.org/apache-2-4-major-enhancements/</link>
		<comments>http://www.admon.org/apache-2-4-major-enhancements/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 07:43:57 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://www.admon.org/?p=1081</guid>
		<description><![CDATA[It&#8217;s the first major Apache web server update since the 2.2 release in 2005. A key focus in the 2.4 release is improved performance which is delivered by way of multiple innovations. Core enhancements that revealed  by its official site: Loadable MPMs Multiple MPMs can now be built as loadable modules at compile time. The [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-753" title="apache" src="http://www.admon.org/wp-content/uploads/2009/10/apache.png" alt="Apache web server" width="150" height="150" />It&#8217;s the first major Apache web server update since the <a href="http://www.internetnews.com/dev-news/article.php/3568241/Stable+Apache+Release+Hits.htm">2.2 release</a> in 2005. A key focus in the 2.4 release is improved performance which is delivered by way of multiple innovations.<span id="more-1081"></span></p>
<p>Core enhancements that revealed  by its official site:</p>
<ul>
<li><strong>Loadable MPMs</strong> Multiple MPMs can now be built as loadable modules at compile time. The MPM of choice can be configured at run time.</li>
<li><strong>Event MPM</strong>  The Event MPM is no longer experimental but is now fully supported.</li>
<li><strong>Asynchronous support</strong> Better support for asynchronous read/write for supporting MPMs and platforms.</li>
<li><strong>Per-module and per-directory LogLevel configuration</strong> The LogLevel can now be configured per module and per directory. New levels trace1 to trace8 have been added above the debug log level.</li>
<li><strong>Per-request configuration sections</strong> &lt;If&gt;, &lt;ElseIf&gt;, and &lt;Else&gt; sections can be used to set the configuration based on per-request criteria.</li>
<li><strong>General-purpose expression parser</strong> A new expression parser allows to specify complex conditions using a common syntax in directives like SetEnvIfExpr, RewriteCond, Header, &lt;If&gt;, and others.</li>
<li><strong>KeepAliveTimeout in milliseconds</strong>  It is now possible to specify KeepAliveTimeout in milliseconds.</li>
<li><strong>NameVirtualHost directive</strong> No longer needed and is now deprecated.</li>
<li><strong>Override Configuration</strong> The new AllowOverrideList directive allows more fine grained control which directives are allowed in .htaccess files.</li>
<li><strong>Config file variables</strong> It is now possible to Define variables in the configuration, allowing a clearer representation if the same value is used at many places in the configuration.</li>
<li><strong>Reduced memory usage</strong> Despite many new features, 2.4.x tends to use less memory than 2.2.x.</li>
</ul>
<p>&nbsp;</p>
<p>A bulk of <strong>module enhancements</strong> have implemented as well, which can be referred at <a href="http://httpd.apache.org/docs/trunk/new_features_2_4.html" target="_blank">the New Features</a> page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.admon.org/apache-2-4-major-enhancements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL: How Triggers act in Replication</title>
		<link>http://www.admon.org/mysql-how-triggers-act-in-replication/</link>
		<comments>http://www.admon.org/mysql-how-triggers-act-in-replication/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 13:35:19 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[replication]]></category>
		<category><![CDATA[row-based replication]]></category>

		<guid isPermaLink="false">http://www.admon.org/?p=1074</guid>
		<description><![CDATA[Supposed you have a table that being updated by MySQL triggers and the DB is a master of replication, how do the triggers act in the environment? Here we might have a list of questions: Q1, Will the definition sql of the triggers be replicated? Q2, Will the data manipulation sqls triggered by triggers be [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-758" title="mysql" src="http://www.admon.org/wp-content/uploads/2010/01/mysql.jpg" alt="MySQL database" width="150" height="150" />Supposed you have a table that being updated by MySQL triggers and the DB is a master of replication, how do the triggers act in the environment? Here we might have a list of questions:</p>
<ul>
<li>Q1, Will the definition sql of the triggers be replicated?</li>
<li>Q2, Will the data manipulation sqls triggered by triggers be replicated?</li>
<li>Q3, Will the data manipulation sqls on this table that issued by applications be replicated?<span id="more-1074"></span></li>
</ul>
<p>It&#8217;s basically not an issue if you have some understandings of MySQL. But sometimes things are a little different in real world, and it may mess you up.<br />
The answers of these questions depend on which version of MySQL you are running.</p>
<p><strong>MySQL 5.0</strong></p>
<p>The answers are as below.</p>
<p>Q1: Triggers that exist on master side must be re-created on the slave server. Once this is done, the replication flow works as any other standard DML statement that participates in replication.<br />
Q2: NO. SQLs generated by Triggers are not replicated.<br />
Q3: Yes. There is no side effect to triggers.<br />
Reference:  <a href="http://dev.mysql.com/doc/refman/5.0/en/faqs-triggers.html" target="_blank">MySQL 5.0 FAQ: Triggers</a></p>
<p><strong>MySQL 5.1, 5.5 and 5.6</strong></p>
<p>Q1: Re-create of the trigger definition is needed.<br />
Q2: YES for row-based replication, but NO for statement-based replication.<br />
Q3: Yes</p>
<p>The answers depend on whether you are using <a title="Difference of statement-based and row-based MySQL Replication" href="http://www.databasejournal.com/features/mysql/article.php/3922266/Comparing-MySQL-Statement-Based-and-Row-Based-Replication.htm" target="_blank">statement-based or row-based replication</a>. For statement-based replication, it works the same MySQL-5.0. While on row-based replication, the answer for Q2 is YES, the changes caused by executing the trigger on master side are applied on the slave.</p>
<p>Mind that <strong>the triggers are not actually executed on slave under row-based replication</strong>, in case of being applied twice. In other words, the outcome is the same for both row-based and statement-based replication.</p>
<p>Accordingly, if you have different triggers defined on master and slave, you cannot use row-based replication.</p>
<p>References:</p>
<ul>
<li><a href="http://dev.mysql.com/doc/refman/5.1/en/faqs-triggers.html" target="_blank">MySQL 5.1 FAQ: Triggers</a></li>
<li><a href="http://dev.mysql.com/doc/refman/5.5/en/faqs-triggers.html" target="_blank">MySQL 5.5 FAQ: Triggers</a></li>
<li><a href="http://dev.mysql.com/doc/refman/5.6/en/faqs-triggers.html" target="_blank">MySQL 5.6 FAQ: Triggers</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.admon.org/mysql-how-triggers-act-in-replication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configure CISCO VPN client on Ubuntu</title>
		<link>http://www.admon.org/configure-cisco-vpn-client-on-ubuntu/</link>
		<comments>http://www.admon.org/configure-cisco-vpn-client-on-ubuntu/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 10:24:20 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://www.admon.org/?p=1060</guid>
		<description><![CDATA[If you have ever tried the official Cisco VPN client, you might have known that it has a few major flaws and is not a good choice for you daily work. The solution came in the form of Maurice Massar&#8217;s vpnc &#8211; a relatively little-known and fairly unassuming application which does exactly as it says [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-1061" title="ubuntu-logo" src="http://www.admon.org/wp-content/uploads/2012/02/ubuntu-logo-150x150.jpg" alt="" width="150" height="150" />If you have ever tried the official Cisco VPN client, you might have known that it has a few major flaws and is not a good choice for you daily work. The solution came in the form of Maurice Massar&#8217;s <a title="VPNC" href="http://www.unix-ag.uni-kl.de/~massar/vpnc/" target="_blank">vpnc</a> &#8211; a relatively little-known and fairly unassuming application which does exactly as it says on the tin.<span id="more-1060"></span></p>
<p>The installation is quite normal, just run this command on the client side:</p>
<pre>sudo apt-get install vpnc</pre>
<p>If you are not running ubuntu, you will probably have to compile the program yourself, it should be quite easy as well.</p>
<p>Now, Let&#8217;s start configure it. It&#8217;s just a little harder than the installation.</p>
<p>There is an configuration example named <em>/etc/vpnc/example.conf</em>, and you can copy it to a new one. The file name would be your connection name. Here is my example:</p>
<pre>root@ubuntu:/etc/vpnc# cat newyork.conf
IPSec gateway 209.209.133.133
IPSec ID VPN_Tunnel-US_V2
IPSec secret XXXXXXXXXXXXXXXXXXXX
#IKE Authmode hybrid
Xauth username admon
Xauth password XXXXXXX</pre>
<p>As the config file is ready, you can raise the VPN connection by:</p>
<pre>root@ubuntu:~# vpnc-connect newyork
Connect Banner:
| WARNING:
| Use of company facilities and networks is restricted
| to employees and authorized third parties only.
|
| Any other use of computing facilities and
| networks is strictly forbidden.
| 

VPNC started in background (pid: 5769)...</pre>
<p>When the connection established, vpnc-connect becomes a daemon instance, and running in background.</p>
<p>Then this command can be used to disconnect from your VPN server:</p>
<pre>root@ubuntu:/etc/vpnc# vpnc-disconnect newyork</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.admon.org/configure-cisco-vpn-client-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In Memoriam: 17 Tech Pioneers Who Died in 2011</title>
		<link>http://www.admon.org/in-memoriam-17-tech-pioneers-who-died-in-2011/</link>
		<comments>http://www.admon.org/in-memoriam-17-tech-pioneers-who-died-in-2011/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 13:38:49 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[2011]]></category>
		<category><![CDATA[pioneers]]></category>

		<guid isPermaLink="false">http://www.admon.org/?p=1053</guid>
		<description><![CDATA[Along with Steve Jobs and Dennis Ritchie, 2011 marked the passing of many computer visionaries and technology pioneers. The computing industry came of age in the 1950s, and many of the individuals who laid the groundwork for modern computing, smart electronics and the Internet are now in their 80s. Many of the leaders who passed [...]]]></description>
			<content:encoded><![CDATA[<p>Along with Steve Jobs and <a title="Dennis Ritchie" href="http://en.wikipedia.org/wiki/Dennis_Ritchie" target="_blank">Dennis Ritchie</a>, 2011 marked the passing of many computer visionaries and technology pioneers.</p>
<p>The computing industry came of age in the 1950s, and many of the individuals who laid the groundwork for modern computing, smart electronics and the Internet are now in their 80s. <span id="more-1053"></span>Many of the leaders who passed away in 2011 were founders and chief executives who transformed their companies to take advantage of emerging technology. Several worked on the theoretical foundations in the fields of optics, mathematics and cryptography. Many knew each other as fellow members of the hobbyists group the <a title="Homebrew Computer Club" href="http://en.wikipedia.org/wiki/Homebrew_Computer_Club" target="_blank">Homebrew Computer Club</a>.</p>
<p>In memory of these innovators, <a title="eWEEK.com" href="http://www.eweek.com/" target="_blank">eWEEK</a> honors some of the individuals who made all the things modern society takes for granted possible, such as digital computers, cellular phones and interconnected networks. While some of the pioneers are better known than others, every one of the names on this list made their mark and has inspired thousands of people with their contributions.</p>
<p>Read more: <a href="http://www.eweek.com/c/a/IT-Infrastructure/In-Memoriam-17-Tech-Pioneers-Who-Died-in-2011-293735/" target="_blank">IT &amp; Network Infrastructure : In Memoriam: 17 Tech Pioneers Who Died in 2011</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.admon.org/in-memoriam-17-tech-pioneers-who-died-in-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resize root partition for a running EBS EC2 Instance</title>
		<link>http://www.admon.org/resize-root-partition-for-a-running-ebs-ec2-instance/</link>
		<comments>http://www.admon.org/resize-root-partition-for-a-running-ebs-ec2-instance/#comments</comments>
		<pubDate>Sat, 24 Dec 2011 02:59:39 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[System Tuning]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[ext3]]></category>
		<category><![CDATA[xfs]]></category>

		<guid isPermaLink="false">http://www.admon.org/?p=1043</guid>
		<description><![CDATA[As long as you are all right with a little downtime of the EC2 instance (in a few minutes), it is possible to extend the root partition on a running EBS boot EC2 instance, without needing to start a new instance. Before starting playing the trick, you need to have Amzon EC2 API tools installed. [...]]]></description>
			<content:encoded><![CDATA[<p>As long as you are all right with a little downtime of the EC2 instance (in a few minutes), it is possible to extend the root partition on a running EBS boot EC2 instance, without needing to start a new instance. <span id="more-1043"></span></p>
<p>Before starting playing the trick, you need to have <a title="Amazon EC2 API tools" href="http://www.admon.org/setup-amazon-ec2-api-tools-on-macbook/" target="_blank">Amzon EC2 API tools</a> installed.</p>
<p>Then the steps are:</p>
<ol>
<li>Shutdown the instance and detach the volume.</li>
<li>Build a snapshot for the detached volume and create a volume with a larger size based on the snapshot.</li>
<li>Attach the new volume to the instance and start it.</li>
<li>Login the instance and resize the root file system to fill the new EBS volume.</li>
</ol>
<p>Commands for the last step are listed as below:</p>
<pre># ext3 root file system (more common):
sudo resize2fs /dev/sda1

# XFS root file system (less common):
sudo xfs_growfs /</pre>
<p>xfs_growfs is supplied by <a title="XFS" href="http://oss.sgi.com/projects/xfs/" target="_blank">xfsprogs</a>, which can be installed via yum (or apt-get).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.admon.org/resize-root-partition-for-a-running-ebs-ec2-instance/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

