<?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>WPKG BlogMisc &#187;</title> <atom:link href="http://blog.wpkg.org/category/misc/feed/" rel="self" type="application/rss+xml" /><link>http://blog.wpkg.org</link> <description>a technical IT blog</description> <lastBuildDate>Tue, 06 Dec 2011 13:25:58 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.2</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Acer accepting Windows tax refund</title><link>http://blog.wpkg.org/2011/06/12/acer-accepting-windows-tax-refund/</link> <comments>http://blog.wpkg.org/2011/06/12/acer-accepting-windows-tax-refund/#comments</comments> <pubDate>Sun, 12 Jun 2011 15:08:17 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[All articles]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Misc]]></category> <category><![CDATA[Windows]]></category><guid isPermaLink="false">http://blog.wpkg.org/?p=91</guid> <description><![CDATA[Getting a laptop without Windows is really problematic. How about getting a refund for a Windows system you&#8217;re not going to use? I tried asking Acer, and it&#8217;s no easy task (it&#8217;s technically possible, but will cost you more than a refund you get).Dear Mr. Chmielewski, thank you for your support request. The Acer Aspire One 751 [...]]]></description> <content:encoded><![CDATA[<p>Getting a laptop without Windows is really problematic. How about getting a refund for a Windows system you&#8217;re not going to use? I tried asking Acer, and it&#8217;s no easy task (it&#8217;s technically possible, but will cost you more than a refund you get).</p><p><span id="more-91"></span></p><p><code>Dear Mr. Chmielewski,</p><p>thank you for your support request.</p><p>The Acer Aspire One 751 is only avaliable with a Microsoft Windows licence.</p><p>As a matter of principle the return of your licence is possible. The following criteria have to be met:</p><p>1.) The licence agreements, which appeared when you first started the system, MUSTN'T be accepted.</p><p>2.) The item has to be sent in to our Service Center including all accessoires and equipement. If you already created recovery discs it is utmost important that these will also be sent in with the item. No copy of the former deliverred operating system is allowed to remain in your property / hands.</p><p>3.) The ACER service is then going to remove the Windows lincence plate and will erase the whole harddisc.</p><p>4.) You then will receive a refund (by bank transfer) for the preinstalled OEM licence (about 30 Euro) .</p><p>5.) You have to pay the shipping cost to the acer service center and the shipping costs back to your address.</p><p>If you wish to return the licence we need the serial number of your notebook, your contact details including the shipping address and your bank details.</p><p>We will then provide you with a reference number with which the item can be dispatched to our Service Center.</p><p>Please follow the instructions below before dispatching the item:</p><p>- Please note the reference number clearly visible on the outer package / cardboard box.<br /> - If possible pack the item in the original packaging or use another package that is safe for transport.<br /> - Please note that ACER will not accept items that arrive being dispatched "freight collect".</p><p>ACER Computer GmbH<br /> Repair Center<br /> Kornkamp 4<br /> 22926 Ahrenburg</p><p>If you have any further questions regarding this topic please do not delete the previous correspondence.</p><p>Best regards<br /> C. Riecken</p><p>Your ACER support team</code></p> ]]></content:encoded> <wfw:commentRss>http://blog.wpkg.org/2011/06/12/acer-accepting-windows-tax-refund/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Testing RAM on a server without rebooting to run memtest86+</title><link>http://blog.wpkg.org/2010/11/23/testing-ram-on-a-server-without-rebooting-to-run-memtest86/</link> <comments>http://blog.wpkg.org/2010/11/23/testing-ram-on-a-server-without-rebooting-to-run-memtest86/#comments</comments> <pubDate>Tue, 23 Nov 2010 14:45:24 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[All articles]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Misc]]></category><guid isPermaLink="false">http://blog.wpkg.org/?p=266</guid> <description><![CDATA[Sometimes, applications on your server crash in mysterious ways, or your server hangs without any apparent reason. You suspect that the RAM may be broken, so memtest86+would be ideal tool to check RAM &#8211; however, there are some problems involved with it:running memtest86+ means server downtime, it may not be possible to run memtest86+ on a [...]]]></description> <content:encoded><![CDATA[<p>Sometimes, applications on your server crash in mysterious ways, or your server hangs without any apparent reason. You suspect that the RAM may be broken, so <a href="http://www.memtest.org" rel="nofollow">memtest86+</a>would be ideal tool to check RAM &#8211; however, there are some problems involved with it:</p><ul><li>running memtest86+ means server downtime,</li><li>it may not be possible to run memtest86+ on a remote server without KVM-IP, iLO or similar access.</li></ul><p>What to do in such situations? User-space <a href="http://pyropus.ca/software/memtester/" rel="nofollow">memtester</a> to the rescue!</p><p><span id="more-266"></span></p><p>The obvious disadvantage is that you will not be able to test all RAM in the server, but sometimes, it&#8217;s not needed to determine if RAM is good or not.</p><p>The below command will try to allocate ~15GB RAM and make one test pass &#8211; if you see errors like below, your RAM is hosed!</p><p>Note that with the exact command line shown below you should have at least 15 GB of free, unallocated memory, otherwise, you&#8217;re likely to hang your server, or at least cause a serious downtime or OOM-killer.</p><pre># memtester 15000 1
memtester version 4.0.8 (64-bit)
Copyright (C) 2007 Charles Cazabon.
Licensed under the GNU General Public License version 2 (only).

pagesize is 4096
pagesizemask is 0xfffffffffffff000
want 15000MB (15728640000 bytes)
got  15000MB (15728640000 bytes), trying mlock ...locked.
Loop 1/1:
  Stuck Address       : testing   0FAILURE: possible bad address line at offset 0x5d922ec8.
Skipping to next test...
  Random Value        : ok
FAILURE: 0x7f40f12dd82264da != 0x7f40f52dd82264da at offset 0x22fa2d27.
FAILURE: 0xe800dc254863429d != 0xe8005c254863429d at offset 0x22fa2de7.
FAILURE: 0x95005ca5bc351fd0 != 0x95007ca5bc351fd0 at offset 0x22fa2e47.
FAILURE: 0x16cc8129822daa5 != 0x16c4a129822daa5 at offset 0x22fa2e5f.
FAILURE: 0xce8945572424d79a != 0xce89c5572424d79a at offset 0x22fa2f1f.
FAILURE: 0x14054d669820e595 != 0x1405cd669820e595 at offset 0x22fa306f.
FAILURE: 0x8d283c130c69dc25 != 0x8d28bc130c69dc25 at offset 0x22fa309f.
FAILURE: 0x19285abae23f881 != 0x19287abae23f881 at offset 0x22fa30b7.
FAILURE: 0x55302b281ab13a51 != 0x55302f281ab13a51 at offset 0x22fa31bf.
FAILURE: 0x48b8ae1715e5084b != 0x48b8aa1715e5084b at offset 0x22fa31d7.
FAILURE: 0x28a2b64b9039074a != 0x28a2164b9039074a at offset 0x22fa5db7.
FAILURE: 0xc6080cfa18200698 != 0xc6080efa18200698 at offset 0x22fa5dcf.
FAILURE: 0x2b30fefcd69a347 != 0x2b38fefcd69a347 at offset 0x22fa5de7.
FAILURE: 0xbc27b13358294271 != 0xbc27b33358294271 at offset 0x22fa5e2f.
FAILURE: 0xc17e0d24dc21fe7e != 0xc17e0f24dc21fe7e at offset 0x22fa5e47.
FAILURE: 0x29ac181590911ae3 != 0x29ac1a1590911ae3 at offset 0x22fa5f07.
FAILURE: 0x233001ba38a53ccd != 0x233021ba38a53ccd at offset 0x22fa5f37.
FAILURE: 0x7542cd4b38a3ea9f != 0x7542c94b38a3ea9f at offset 0x22fa5f7f.
FAILURE: 0x86c89d49992151c8 != 0x86c8bd49992151c8 at offset 0x22fa5ff7.
FAILURE: 0x16208f9b584969b3 != 0x16200f9b584969b3 at offset 0x22fa609f.
FAILURE: 0x6a08171eb0a18751 != 0x6a08151eb0a18751 at offset 0x22fa60b7.
FAILURE: 0x8214f12e9a254014 != 0x8214f72e9a254014 at offset 0x22fa60cf.
FAILURE: 0x8005ab68021ad9f != 0x800dab68021ad9f at offset 0x22fa612f.
FAILURE: 0x884e76469ba12421 != 0x884e72469ba12421 at offset 0x22fa61a7.
FAILURE: 0x30509c65d890299e != 0x30509e65d890299e at offset 0x22fa62af.
  Compare XOR         : FAILURE: 0x3f81821efe3ced18 != 0x3f81861efe3ced18 at offset 0x22fa2d27.
FAILURE: 0xa8416d166e7dcadb != 0xa840ed166e7dcadb at offset 0x22fa2de7.
FAILURE: 0x5540ed96e24fa80e != 0x55410d96e24fa80e at offset 0x22fa2e47.
FAILURE: 0xc1ad5903be3d62e3 != 0xc1acdb03be3d62e3 at offset 0x22fa2e5f.
FAILURE: 0x8ec9d6484a3f5fd8 != 0x8eca56484a3f5fd8 at offset 0x22fa2f1f.
FAILURE: 0xd445de57be3b6dd3 != 0xd4465e57be3b6dd3 at offset 0x22fa306f.
FAILURE: 0x4d68cd0432846463 != 0x4d694d0432846463 at offset 0x22fa309f.
FAILURE: 0xc1d3169cd43e80bf != 0xc1d3189cd43e80bf at offset 0x22fa30b7.
FAILURE: 0x1570bc1940cbc28f != 0x1570c01940cbc28f at offset 0x22fa31bf.
FAILURE: 0x8f93f083bff9089 != 0x8f93b083bff9089 at offset 0x22fa31d7.
FAILURE: 0xe8e3473cb6538f88 != 0xe8e2a73cb6538f88 at offset 0x22fa5db7.
FAILURE: 0x86489deb3e3a8ed6 != 0x86489feb3e3a8ed6 at offset 0x22fa5dcf.
FAILURE: 0xc2f3a0e0f3842b85 != 0xc2f420e0f3842b85 at offset 0x22fa5de7.
FAILURE: 0x7c6842247e43caaf != 0x7c6844247e43caaf at offset 0x22fa5e2f.
FAILURE: 0x81be9e16023c86bc != 0x81bea016023c86bc at offset 0x22fa5e47.
FAILURE: 0xe9eca906b6aba321 != 0xe9ecab06b6aba321 at offset 0x22fa5f07.
FAILURE: 0xe37092ab5ebfc50b != 0xe370b2ab5ebfc50b at offset 0x22fa5f37.
FAILURE: 0x35835e3c5ebe72dd != 0x35835a3c5ebe72dd at offset 0x22fa5f7f.
FAILURE: 0x47092e3abf3bda06 != 0x47094e3abf3bda06 at offset 0x22fa5ff7.
FAILURE: 0xd661208c7e63f1f1 != 0xd660a08c7e63f1f1 at offset 0x22fa609f.
FAILURE: 0x2a48a80fd6bc0f8f != 0x2a48a60fd6bc0f8f at offset 0x22fa60b7.
FAILURE: 0x4255821fc03fc852 != 0x4255881fc03fc852 at offset 0x22fa60cf.
FAILURE: 0xc840eba7a63c35dd != 0xc8416ba7a63c35dd at offset 0x22fa612f.
FAILURE: 0x488f0737c1bbac5f != 0x488f0337c1bbac5f at offset 0x22fa61a7.
FAILURE: 0xf0912d56feaab1dc != 0xf0912f56feaab1dc at offset 0x22fa62af.
  Compare SUB         : FAILURE: 0x770f6d7d59b31bc0 != 0x64680d7d59b31bc0 at offset 0x22fa2d27.
FAILURE: 0x17cc5d24cac64438 != 0x6cb85d24cac64438 at offset 0x22fa2de7.
FAILURE: 0x8bda06d04720f630 != 0xf69f06d04720f630 at offset 0x22fa2e47.
FAILURE: 0x191ec89353a0b578 != 0xe4b7189353a0b578 at offset 0x22fa2e5f.
FAILURE: 0xb1bc42b59ee189c0 != 0x5cd042b59ee189c0 at offset 0x22fa2f1f.
FAILURE: 0x86575304584f0af8 != 0x316b5304584f0af8 at offset 0x22fa306f.
FAILURE: 0x4d053942f1b9f178 != 0xf8193942f1b9f178 at offset 0x22fa309f.
FAILURE: 0x206d80c97f8947d8 != 0x9719d0c97f8947d8 at offset 0x22fa30b7.
FAILURE: 0x6cf332350ca77058 != 0x5a4bd2350ca77058 at offset 0x22fa31bf.
FAILURE: 0xcae418d26b8f9b68 != 0xdd8b78d26b8f9b68 at offset 0x22fa31d7.
FAILURE: 0xdc58887f8f9e1d40 != 0xc67f887f8f9e1d40 at offset 0x22fa5db7.
FAILURE: 0x66470a0f89743570 != 0xdcf35a0f89743570 at offset 0x22fa5dcf.
FAILURE: 0x678cf2f8066c7ac8 != 0x12a0f2f8066c7ac8 at offset 0x22fa5de7.
FAILURE: 0x7e705d8189837558 != 0xf51cad8189837558 at offset 0x22fa5e2f.
FAILURE: 0x62530ceb060c3560 != 0xd8ff5ceb060c3560 at offset 0x22fa5e47.
FAILURE: 0xe1f0dc5c71b99328 != 0x589d2c5c71b99328 at offset 0x22fa5f07.
FAILURE: 0xa1a2ad6a30317bb8 != 0xc67ad6a30317bb8 at offset 0x22fa5f37.
FAILURE: 0x1d86ded3b0c73088 != 0x302e3ed3b0c73088 at offset 0x22fa5f7f.
FAILURE: 0xf1b9a3e0fcfa14f0 != 0x5c7ea3e0fcfa14f0 at offset 0x22fa5ff7.
FAILURE: 0x806d7d4232efc3a8 != 0xd5597d4232efc3a8 at offset 0x22fa609f.
FAILURE: 0x98a6f4d473117858 != 0x21faa4d473117858 at offset 0x22fa60b7.
FAILURE: 0x617c86f84528d8d0 != 0xc58176f84528d8d0 at offset 0x22fa60cf.
FAILURE: 0xbca540978cefa888 != 0x67b940978cefa888 at offset 0x22fa612f.
FAILURE: 0xe6ebd2a5a59fd8d8 != 0xf99332a5a59fd8d8 at offset 0x22fa61a7.
FAILURE: 0x1a30be8e9a1fb260 != 0x90dd0e8e9a1fb260 at offset 0x22fa62af.
  Compare MUL         : ^C^C^C^C^C
#</pre>]]></content:encoded> <wfw:commentRss>http://blog.wpkg.org/2010/11/23/testing-ram-on-a-server-without-rebooting-to-run-memtest86/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Getting IP address and aliases in Perl</title><link>http://blog.wpkg.org/2010/09/12/getting-ip-address-and-aliases-in-perl/</link> <comments>http://blog.wpkg.org/2010/09/12/getting-ip-address-and-aliases-in-perl/#comments</comments> <pubDate>Sun, 12 Sep 2010 12:45:24 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[All articles]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Misc]]></category><guid isPermaLink="false">http://blog.wpkg.org/?p=174</guid> <description><![CDATA[This piece of Perl code should get you IP address for eth0 into $ip variable:my $ip; my $device = &#34;eth0&#34;; if &#40;&#40;`/sbin/ifconfig $device`&#41; =~ /inet addr:(\d+\.\d+\.\d+\.\d+)/&#41; &#123; $ip = $1; &#125;If you&#8217;d also like to get a list of all aliases the device has, you could use something like:my $device = &#34;eth0&#34;; my @ipaddr_output = `ip [...]]]></description> <content:encoded><![CDATA[<p>This piece of Perl code should get you IP address for eth0 into $ip variable:</p><div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$ip</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$device</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;eth0&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">`/sbin/ifconfig $device`</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/inet addr:(\d+\.\d+\.\d+\.\d+)/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #0000ff;">$ip</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$1</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>If you&#8217;d also like to get a list of all aliases the device has, you could use something like:<br /> <span id="more-174"></span></p><div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$device</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;eth0&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@ipaddr_output</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">`ip addr show dev $device`</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@ip_aliases</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$ip_alias</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@ipaddr_output</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$ip_alias</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">m/inet (.+)\/32(.+)$device(.+)/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066;">push</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@ip_aliases</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>Note that if your locale is different, you may need to look for a different match (or just set locale in your perl script), i.e.:<br /> <br /> <code><br /> $ ifconfig<br /> eth0      Link encap:Ethernet  Hardware Adresse 00:23:8b:eb:f2:b4<br /> inet Adresse:192.168.111.142  Bcast:192.168.111.191  Maske:255.255.255.192<br /> </code></p><p><code><br /> $ ifconfig<br /> eth0      Link encap:Ethernet  HWaddr 00:23:8b:eb:f2:b4<br /> inet addr:192.168.111.142  Bcast:192.168.111.191  Mask:255.255.255.192<br /> </code></p> ]]></content:encoded> <wfw:commentRss>http://blog.wpkg.org/2010/09/12/getting-ip-address-and-aliases-in-perl/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>A quick setting up SVN repository for your website</title><link>http://blog.wpkg.org/2010/06/07/a-quick-setting-up-svn-repository-for-your-website/</link> <comments>http://blog.wpkg.org/2010/06/07/a-quick-setting-up-svn-repository-for-your-website/#comments</comments> <pubDate>Mon, 07 Jun 2010 21:17:56 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[All articles]]></category> <category><![CDATA[Misc]]></category><guid isPermaLink="false">http://blog.wpkg.org/?p=119</guid> <description><![CDATA[A quick SVN setup example.choose a location where your SVN server will keep data &#8211; for example, /srv/svn; use svnadmin create a SVN project structure there:# mkdir /srv/svn # cd /srv/svn # svnadmin create yoursite.example.comnow, import your initial version of the website:# svn --message "Initial import" import /home/yoursite.example.com/public_html file:///srv/svn/yoursite.example.com Adding        [...]]]></description> <content:encoded><![CDATA[<p>A quick SVN setup example.</p><p><span id="more-119"></span></p><ul><li>choose a location where your SVN server will keep data &#8211; for example, /srv/svn; use svnadmin create a SVN project structure there:</li></ul><p><code># mkdir /srv/svn<br /> # cd /srv/svn<br /> # svnadmin create yoursite.example.com</code></p><ul><li>now, import your initial version of the website:</li></ul><p><code> # svn --message "Initial import" import /home/yoursite.example.com/public_html file:///srv/svn/yoursite.example.com<br /> Adding         /home/yoursite.example.com/public_html/index.html<br /> Committed revision 1.</code></p><ul><li>add users &#8211; first, in <code>/srv/svn/yoursite.example.com/conf/passwd</code>:</li></ul><p><code>[users]<br /> svnadmin = secretpass</code></p><ul><li>and in <code>/srv/svn/yoursite.example.com/conf/authz</code>:</li></ul><p><code>[groups]<br /> full = svnadmin, someotheruser<br /> read = readonlyuser<br /> [/]<br /> @full = rw<br /> @read = r</code></p><ul><li>in <code>/srv/svn/yoursite.example.com/conf/svnserve.conf</code>, use setting like these:</li></ul><p><code>[general]<br /> anon-access = none<br /> auth-access = write<br /> password-db = passwd<br /> authz-db = authz<br /> </code></p><ul><li>start SVN daemon:</li></ul><p><code>svnserve -r /srv/svn -d</code></p><ul><li>from a separate PC, try to checkout:</li></ul><p><code>svn --username svnadmin co svn://yourserver/yoursite.example.com</code></p> ]]></content:encoded> <wfw:commentRss>http://blog.wpkg.org/2010/06/07/a-quick-setting-up-svn-repository-for-your-website/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Scripting qemu / kvm monitor</title><link>http://blog.wpkg.org/2010/05/26/scripting-qemu-kvm-monitor/</link> <comments>http://blog.wpkg.org/2010/05/26/scripting-qemu-kvm-monitor/#comments</comments> <pubDate>Wed, 26 May 2010 14:18:01 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[All articles]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Misc]]></category><guid isPermaLink="false">http://blog.wpkg.org/?p=133</guid> <description><![CDATA[There are some tasks in qemu / kvm monitor which could be scripted (i.e. like changing VNC password on demand). Here is how. First, you need to tell qemu / kvm process to have a monitor accessible via a UNIX socket &#8211; if you use Proxmox VE, it will be created automatically, if not, just use such [...]]]></description> <content:encoded><![CDATA[<p>There are some tasks in qemu / kvm monitor which could be scripted (i.e. like changing VNC password on demand).</p><p>Here is how.</p><p><span id="more-133"></span>First, you need to tell qemu / kvm process to have a monitor accessible via a UNIX socket &#8211; if you use Proxmox VE, it will be created automatically, if not, just use such a command line parameter:</p><p><code>-monitor unix:/var/run/qemu-server/105.mon,server,nowait</code></p><p>Where /var/run/qemu-server/105.mon is the path to the socket.</p><p>Next, install minicom and create the /etc/minicom/minirc.105-mon file with the contents like below &#8211; this will tell minicom to connect to the serial monitor console of this qemu / kvm quest:</p><p><code>pu port             unix#/var/run/qemu-server/105.mon<br /> pu minit<br /> pu mreset</code></p><p>Next, minicom needs to execute a script &#8211; an example for changing a VNC password below (save it as &#8220;change-vnc-pass&#8221;; see &#8220;man runscript&#8221; for more syntax help):</p><p><code>﻿send \r\r<br /> send "change vnc password"<br /> expect "Password:"<br /> send some-password</code></p><p>The last thing would be to start minicom and execute these commands:</p><p><code>#!/bin/bash<br /> minicom 105-mon -S /some/path/change-vnc-pass &amp;<br /> sleep 3s<br /> kill $!</code></p><p>That&#8217;s it!</p><p>If you&#8217;d like to start it from crontab, you have to use screen &#8211; otherwise, minicom will complain about &#8220;No cursor motion capability (cm)&#8221; when started using cron:</p><p><code>50 * * * *      root    screen -d -m /some/path/change-vnc-pass.sh</code></p> ]]></content:encoded> <wfw:commentRss>http://blog.wpkg.org/2010/05/26/scripting-qemu-kvm-monitor/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>md0 : active (auto-read-only) in /proc/mdadm</title><link>http://blog.wpkg.org/2010/05/11/md0-active-auto-read-only-in-proc-mdadm/</link> <comments>http://blog.wpkg.org/2010/05/11/md0-active-auto-read-only-in-proc-mdadm/#comments</comments> <pubDate>Tue, 11 May 2010 21:30:17 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[All articles]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Misc]]></category><guid isPermaLink="false">http://blog.wpkg.org/?p=125</guid> <description><![CDATA[Ever seen this message in your /proc/mdstat right after you boot the server and wondered what it is?# cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] md2 : active raid1 sda3[0] sdb3[1] 1458830400 blocks [2/2] [UU] md1 : active raid1 sda2[0] sdb2[1] 2104448 blocks [2/2] [UU] md0 : active (auto-read-only) raid1 sda1[0] sdb1[1] 4200896 blocks [2/2] [UU] unused devices: &#60;none&#62; It simply [...]]]></description> <content:encoded><![CDATA[<p>Ever seen this message in your /proc/mdstat right after you boot the server and wondered what it is?</p><p><span id="more-125"></span></p><pre># cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md2 : active raid1 sda3[0] sdb3[1]
1458830400 blocks [2/2] [UU]</pre><pre>md1 : active raid1 sda2[0] sdb2[1]
2104448 blocks [2/2] [UU]</pre><pre>md0 : active (auto-read-only) raid1 sda1[0] sdb1[1]
4200896 blocks [2/2] [UU]</pre><pre>unused devices: &lt;none&gt;</pre><p>It simply means nothing was yet written to that array (unless you were changing anything with &#8211;readonly option to mdadm).</p><p>I.e. if a mounted filesystem is on a given device, you are unlikely to see this. On a swap device, however, you may see it.</p><p>Assuming the device is /dev/md0 and is used for swap, do a:</p><pre>swapoff /dev/md0
mkswap /dev/md0
swapon /dev/md0</pre><p>and you will see &#8220;auto-read-only&#8221; is gone (careful, if you use UUIDs).</p> ]]></content:encoded> <wfw:commentRss>http://blog.wpkg.org/2010/05/11/md0-active-auto-read-only-in-proc-mdadm/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>MySQL replication: adding a new database</title><link>http://blog.wpkg.org/2010/04/06/mysql-replication-adding-a-new-database/</link> <comments>http://blog.wpkg.org/2010/04/06/mysql-replication-adding-a-new-database/#comments</comments> <pubDate>Tue, 06 Apr 2010 21:38:12 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[All articles]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Misc]]></category><guid isPermaLink="false">http://blog.wpkg.org/?p=109</guid> <description><![CDATA[Sometimes, you will see MySQL setups where only one database is being replicated. How to add a second database, so that it&#8217;s also replicated? In my.cnf on both servers, add a second database:replicate-do-db          = first_db replicate-do-db          = second_db binlog-do-db            = first_db binlog-do-db            = second_db Connect to mysql on both servers and add a new database:# mysql -p mysql> CREATE DATABASE second_db;Now, [...]]]></description> <content:encoded><![CDATA[<p>Sometimes, you will see MySQL setups where only one database is being replicated. How to add a second database, so that it&#8217;s also replicated?</p><p><span id="more-109"></span>In my.cnf on both servers, add a second database:<br /> <code><br /> replicate-do-db          = first_db<br /> replicate-do-db          = second_db<br /> binlog-do-db            = first_db<br /> binlog-do-db            = second_db</code></p><p>Connect to mysql on both servers and add a new database:</p><p><code><br /> # mysql -p<br /> mysql> CREATE DATABASE second_db;<br /> </code></p><p>Now, restart mysql on both servers and verify that replication works (be careful when restarting if there are any writes to the database; i.e. shutdown the secondary master first, then the primary master &#8211; depending on your environment):</p><p><code><br /> mysql> use second_db;<br /> Database changed<br /> mysql> show tables;<br /> Empty set (0.00 sec)<br /> mysql> CREATE TABLE example (<br /> ->          id INT,<br /> ->          data VARCHAR(100)<br /> ->        );<br /> Query OK, 0 rows affected (0.13 sec)<br /> mysql> drop table example;<br /> Query OK, 0 rows affected (0.02 sec)<br /> mysql><br /> </code></p><p>After creating/dropping the example table on one server, verify it&#8217;s happening on the second server as well:</p><p><code><br /> mysql> show tables;<br /> +---------------------+<br /> | Tables_in_second_db |<br /> +---------------------+<br /> | example             |<br /> +---------------------+<br /> 1 row in set (0.00 sec)<br /> mysql> show tables;<br /> Empty set (0.01 sec)<br /> </code></p><p>Don&#8217;t forget to add a user with proper privileges, i.e.:</p><p><code><br /> mysql> CREATE USER someuser IDENTIFIED BY 'password';<br /> Query OK, 0 rows affected (0.23 sec)<br /> mysql> GRANT ALL ON second_db.* TO 'someuser'@'%';<br /> Query OK, 0 rows affected (0.00 sec)<br /> </code></p> ]]></content:encoded> <wfw:commentRss>http://blog.wpkg.org/2010/04/06/mysql-replication-adding-a-new-database/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>CentOS &#8211; update / install PHP 5.2</title><link>http://blog.wpkg.org/2010/02/27/centos-update-install-php-5-2/</link> <comments>http://blog.wpkg.org/2010/02/27/centos-update-install-php-5-2/#comments</comments> <pubDate>Fri, 26 Feb 2010 22:26:17 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[All articles]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Misc]]></category><guid isPermaLink="false">http://blog.wpkg.org/?p=93</guid> <description><![CDATA[CentOS 5.x comes with PHP 5.1, which is too old for some applications. Here is a quickie on how to update it using CentOS development / testing repository.First, create a /etc/yum.repos.d/CentOS-dev.repo file and add this content to it:[c5-dev] name=CentOS-5 Testing baseurl=http://dev.centos.org/centos/5/testing/$basearch/ enabled=1 gpgcheck=1 gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testingAs you just want to update PHP (but not all software on the server), see what PHP packages [...]]]></description> <content:encoded><![CDATA[<p>CentOS 5.x comes with PHP 5.1, which is too old for some applications.</p><p>Here is a quickie on how to update it using CentOS development / testing repository.<br /> <span id="more-93"></span></p><ul><li>First, create a /etc/yum.repos.d/CentOS-dev.repo file and add this content to it:</li></ul><p><code>[c5-dev]<br /> name=CentOS-5 Testing<br /> baseurl=http://dev.centos.org/centos/5/testing/$basearch/<br /> enabled=1<br /> gpgcheck=1<br /> gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing</code></p><ul><li>As you just want to update PHP (but not all software on the server), see what PHP packages you have on the server:</li></ul><p><code> # rpm -qa|grep php<br /> php-gd-5.1.6-24.el5_4.5<br /> php-common-5.1.6-24.el5_4.5<br /> php-pdo-5.1.6-24.el5_4.5<br /> php-cli-5.1.6-24.el5_4.5<br /> php-mysql-5.1.6-24.el5_4.5<br /> php-ldap-5.1.6-24.el5_4.5<br /> php-5.1.6-24.el5_4.5</code></p><ul><li>Now, time to upgrade PHP to 5.2 on your CentOS 5.x server (to PHP 5.2.10, as of writing this blog entry):</li></ul><p><code> # yum install php-gd php-common php-pdo php-cli php-mysql php-ldap php<br /> </code><br /> Packet manager (yum) will ask if you want to install CentOS-testing GPG key &#8211; if you confirm, it will upgrade PHP to the latest version from the development repository.</p><ul><li>After the upgrade, make sure that your existing websites still function properly. If they do, you may want to remove /etc/yum.repos.d/CentOS-dev.repo file (or comment out its content, or disable it per yum configuration) &#8211; to prevent accidental updating of all software to development versions.</li></ul> ]]></content:encoded> <wfw:commentRss>http://blog.wpkg.org/2010/02/27/centos-update-install-php-5-2/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Setting up DKIMproxy with Exim for DKIM and DomainKeys signing</title><link>http://blog.wpkg.org/2009/03/28/setting-up-dkimproxy-with-exim-for-dkim-and-domainkeys-signing/</link> <comments>http://blog.wpkg.org/2009/03/28/setting-up-dkimproxy-with-exim-for-dkim-and-domainkeys-signing/#comments</comments> <pubDate>Fri, 27 Mar 2009 23:17:30 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[All articles]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Misc]]></category><guid isPermaLink="false">http://blog.wpkg.org/?p=54</guid> <description><![CDATA[Was your mail ever rejected or tagged as spam because it didn&#8217;t have a DKIM signature? You could enable DKIM-signing in Exim, but then, some older mail systems may still use DomainKeys. Currently, Exim does not support signing mails with both DomainKeys and DKIM. You have to pick one of them, unless you do some tricks [...]]]></description> <content:encoded><![CDATA[<p>Was your mail ever rejected or tagged as spam because it didn&#8217;t have a DKIM signature? You could enable DKIM-signing in Exim, but then, some older mail systems may still use DomainKeys.</p><p>Currently, Exim does not support signing mails with both DomainKeys and DKIM. You have to pick one of them, unless you do some tricks with patching Exim or <a rel="nofollow" href="http://lists.exim.org/lurker/message/20080913.232808.71fde773.en.html">connecting back to itself</a>.</p><p>Still though, such setup is not perfect: <a rel="nofollow" href="http://lists.exim.org/lurker/message/20090324.230847.ff237a1b.en.html">Exim does not wrap its DomainKeys signature</a>, which may result in SpamAssassin installations tagging your mail with HEAD_LONG rule (&#8220;Message headers are very long&#8221;) and assigning it 2.5 spam points.</p><p>So how to sign mail with DKIM and DomainKeys without negative consequences of being tagged by SpamAssassin for very long headers? <a rel="nofollow" href="http://dkimproxy.sourceforge.net/ ">DKIMproxy</a> to the rescue!</p><h3>Exim configuration</h3><p><span id="more-54"></span>Exim should listen on an additional port &#8211; make sure you have something similar in your <code>exim.conf</code> file:</p><p><code>local_interfaces = 0.0.0.0 : 127.0.0.1.10025</code></p><p>Exim should speak TLS only on port 25, otherwise, it won&#8217;t be able to communicate with DKIMproxy:</p><p><code>tls_advertise_hosts = 0.0.0.0.25</code></p><p>at the beginning of the routers section in exim.conf:</p><p><code>dkimproxy:<br /> driver = manualroute<br /> condition = "${if eq {$interface_port}{10025} {0}{1}}"<br /> transport = dkimproxy_smtp<br /> route_list = "* localhost byname"<br /> self = send</code></p><p>transports section in exim.conf (does not matter where):<br /> <code><br /> dkimproxy_smtp:<br /> driver = smtp<br /> port = 10027<br /> allow_localhost</code></p><h3>DKIMproxy configuration</h3><p>Download and install DKIMproxy (&#8220;./configure; make; make install&#8221; after you downloaded and extracted dkim-proxy package, unless your distribution provides it packaged).</p><p>Create a <code>/etc/dkimproxy/dkimproxy_out.conf</code> file with similar content:</p><p><code># specify what address/port DKIMproxy should listen on<br /> listen    127.0.0.1:10027</code></p><p><code># specify what address/port DKIMproxy forwards mail to<br /> relay     127.0.0.1:10025</code></p><p><code># specify what domains DKIMproxy can sign for (comma-separated, no spaces)<br /> domain    host.example.com,example.com</code></p><p><code># specify what signatures to add<br /> signature dkim(c=relaxed)<br /> signature domainkeys(c=nofws)</code></p><p><code># specify location of the private key<br /> keyfile   /etc/dkimproxy/dkim.key.private</code></p><p><code># specify the selector (i.e. the name of the key record put in DNS)<br /> selector default</code></p><p>Make sure DKIMproxy is started when your server boots (add it to your startup scripts):</p><p><code>/usr/local/bin/dkimproxy.out  --conf_file=/etc/dkimproxy/dkimproxy_out.conf --daemonize</code></p><p>Place the private key you want to use with DKIMproxy in <code>/etc/dkimproxy/dkim.key.private</code>. If you use cPanel, you may symlink it to a key in <code>/var/cpanel/domain_keys/private/</code>.</p><h3>DNS configuration</h3><p>Similar entries will be needed in your DNS zone configuration:</p><p><code>default._domainkey      14400   IN      TXT     "k=rsa; p=MH.........;"<br /> _asp._domainkey.example.com.       IN      TXT     "dkim=unknown"<br /> _adsp._domainkey.example.com.      IN      TXT     "dkim=unknown"<br /> _domainkey.example.com.            IN TXT "t=y; o=~;"</code></p><h3>Key generation</h3><p><code># openssl genrsa -out private.key 1024<br /> # openssl rsa -in private.key -pubout -out public.key</code></p><h3>Testing</h3><p>You can test if DKIM and DomainKeys signing works properly on these websites:</p><ul><li> http://www.myiptest.com/staticpages/index.php/DomainKeys-DKIM-SPF-Validator-test</li></ul><ul><li> http://www.brandonchecketts.com/emailtest.php</li></ul><p>You can also test it by sending an email to:</p><ul><li>check-auth@verifier.port25.com</li></ul><h3>Troubleshooting</h3><p>If you use cPanel, you will see such entries in your <code>/var/log/exim_mainlog</code>:</p><p><code>socket bind() to port 10025 for address 127.0.0.1 failed: Address already in use: waiting 30s before trying again</code></p><p>This is because <code>/etc/init.d/exim</code> script shipped with cPanel starts two instances of Exim, one of them is listening on port 465 &#8211; SMTP over SSL (TLS), but reading the same config file. This conflicts with &#8220;<code>local_interfaces = 0.0.0.0 : 127.0.0.1.10025</code>&#8220;. Second instance of Exim will try to bind to port 10025 as well, but will give up after 10 tries.</p><p>To fix it, add this to your Exim config file:</p><p><code>daemon_smtp_ports = 25 : 465<br /> tls_on_connect_ports = 465</code></p><p>And comment out these lines from <code>/etc/init.d/exim</code>:</p><p><code> echo -n "Starting exim-smtps: "<br /> #               TMPDIR=/tmp $DAEMONIZE /usr/sbin/exim -tls-on-connect -bd -oX 465<br /> #               echo $RESULT</code></p> ]]></content:encoded> <wfw:commentRss>http://blog.wpkg.org/2009/03/28/setting-up-dkimproxy-with-exim-for-dkim-and-domainkeys-signing/feed/</wfw:commentRss> <slash:comments>31</slash:comments> </item> <item><title>Linux and Lumix digital cameras</title><link>http://blog.wpkg.org/2008/07/21/linux-and-lumix-digital-cameras/</link> <comments>http://blog.wpkg.org/2008/07/21/linux-and-lumix-digital-cameras/#comments</comments> <pubDate>Mon, 21 Jul 2008 20:17:23 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[All articles]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Misc]]></category><guid isPermaLink="false">http://blog.wpkg.org/?p=26</guid> <description><![CDATA[Do you happen to be running a Linux distribution and have Panasonic Lumix digital camera? If yes, you may have problems downloading photos from it &#8211; depending on your kernel and udev settings, or more generally, on Linux distribution used. The tips from below may help you.Every USB device connected to your Linux system will make the [...]]]></description> <content:encoded><![CDATA[<p>Do you happen to be running a Linux distribution and have Panasonic Lumix digital camera?</p><p>If yes, you may have problems downloading photos from it &#8211; depending on your kernel and udev settings, or more generally, on Linux distribution used.</p><p>The tips from below may help you.</p><p><span id="more-26"></span></p><p>Every USB device connected to your Linux system will make the kernel print some messages. You can print them with <code>dmesg</code> command, started in the console, i.e.:</p><p><code><br /> # dmesg -c<br /> scsi 4:0:0:0: Direct-Access     MATSHITA DMC-TZ5          0100 PQ: 0 ANSI: 2<br /> usb-storage: device scan complete<br /> Driver 'sd' needs updating - please use bus_type methods<br /> sd 4:0:0:0: [sda] 7954431 512-byte hardware sectors (4073 MB)<br /> sd 4:0:0:0: [sda] Write Protect is off<br /> sd 4:0:0:0: [sda] Mode Sense: 04 00 00 00<br /> sd 4:0:0:0: [sda] Assuming drive cache: write through<br /> sd 4:0:0:0: [sda] 7954431 512-byte hardware sectors (4073 MB)<br /> sd 4:0:0:0: [sda] Write Protect is off<br /> sd 4:0:0:0: [sda] Mode Sense: 04 00 00 00<br /> sd 4:0:0:0: [sda] Assuming drive cache: write through</code></p><p>The above output meant that the connected camera was recognized as <em>/dev/sda</em> block device &#8211; good, your distro supports it out of the box. If you never see a block device like <em>sda</em> or <em>sdb</em>, but only output like below &#8211; it means you need to complain to your distribution vendor:</p><p><code><br /> # dmesg -c<br /> usb 1-2: new high speed USB device using ehci_hcd and address 3<br /> usb 1-2: configuration #1 chosen from 1 choice<br /> scsi3 : SCSI emulation for USB Mass Storage devices<br /> usb 1-2: New USB device found, idVendor=04da, idProduct=2372<br /> usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3<br /> usb 1-2: Product: DMC-TZ5<br /> usb 1-2: Manufacturer: Panasonic<br /> usb 1-2: SerialNumber: 0000000000000000005F0208220775<br /> usb-storage: device found at 3<br /> usb-storage: waiting for device to settle before scanning<br /> scsi 3:0:0:0: Direct-Access     MATSHITA DMC-TZ5          0100 PQ: 0 ANSI: 2<br /> usb-storage: device scan complete</code></p><p>There is a simple workaround to that. In <code>/etc/udev</code>, search for such a line:<br /> <code><br /> SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"</code></p><p>You can do it with <code>grep</code> command:</p><p><code># grep -r "bus/usb" /etc/udev</code></p><p>When you localize it, comment it out, restart <em>udevd</em>, i.e. use <code>killall</code> command to stop it, and start it in verbose mode to see more information on what it does:</p><p><code># killall udevd<br /> # udevd --verbose</code></p><p>For me, I had problems getting photos from DMZ-FZ20 and DMC-TZ5 Lumix models on Mandriva and OpenSuse. On Ubuntu though, everything worked from scratch and I didn&#8217;t have to do any udev changes.</p> ]]></content:encoded> <wfw:commentRss>http://blog.wpkg.org/2008/07/21/linux-and-lumix-digital-cameras/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching using disk: basic
Object Caching 320/553 objects using disk: basic

Served from: blog.wpkg.org @ 2012-02-09 06:44:53 -->
