<?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>Sander's Blog</title>
	<atom:link href="http://www.hamel.it/wordpress/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.hamel.it/wordpress</link>
	<description>UNIX is simple; it just takes a genius to understand its simplicity!!!</description>
	<lastBuildDate>Mon, 14 Mar 2011 16:26:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Sun Fire X2250 reset ilom password</title>
		<link>http://www.hamel.it/wordpress/?p=38</link>
		<comments>http://www.hamel.it/wordpress/?p=38#comments</comments>
		<pubDate>Mon, 14 Mar 2011 16:26:36 +0000</pubDate>
		<dc:creator>sander</dc:creator>
				<category><![CDATA[Unix / Linux]]></category>
		<category><![CDATA[ilom]]></category>
		<category><![CDATA[ilom reset]]></category>
		<category><![CDATA[X2250]]></category>

		<guid isPermaLink="false">http://www.hamel.it/wordpress/?p=38</guid>
		<description><![CDATA[Today I got a Sun Fire X2250 on my desk which needed to be installed with Linux. When trying to configure the ILOM I ran into a small issue. We didn&#8217;t have the ILOM password and it was not set to default. I was searching the internet for a solution and found some people that [...]]]></description>
			<content:encoded><![CDATA[<p>Today I got a Sun Fire X2250 on my desk which needed to be installed with Linux.</p>
<p>When trying to configure the ILOM I ran into a small issue. We didn&#8217;t have the ILOM password and it was not set to default. I was searching the internet for a solution and found some people that ran into the same issue but without a fix.</p>
<p>The sun manual mentions that it is possible to reset the ILOM password using a jumper which is described in the service manual, so I check the service manual, but there is no procedure described there for resetting the ILOM password.</p>
<p>I did manage to find the solution:</p>
<p>1. I downloaded the latest Tools &amp; Drivers CD from Oracle (1.5)<br />
2. I booted from the Tools &amp; Drivers CD<br />
3. Choose option 4 from the menu (exit to dos)<br />
4. cd recovery<br />
5. recovery.bat</p>
<p>Now it will start a recovery procedure and reset the ILOM settings/password to factory default. It also resets the BIOS back to factory default.</p>
<p>I hope this information may help other people that run into the same issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hamel.it/wordpress/?feed=rss2&#038;p=38</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Setup Hardware RAID on a T2000</title>
		<link>http://www.hamel.it/wordpress/?p=19</link>
		<comments>http://www.hamel.it/wordpress/?p=19#comments</comments>
		<pubDate>Tue, 05 Aug 2008 07:22:21 +0000</pubDate>
		<dc:creator>sander</dc:creator>
				<category><![CDATA[My Work]]></category>
		<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://www.hamel.it/wordpress/?p=19</guid>
		<description><![CDATA[Today I did some testing with a Sun Fire T2000. I have always used the default Solaris Disksuite to setup software RAID partitions and was very curious to see how the hardware raid works on a T2000. We start of by booting to single user mode from the Solaris DVD so on the OK prompt [...]]]></description>
			<content:encoded><![CDATA[<p>Today I did some testing with a Sun Fire T2000. I have always used the default Solaris Disksuite to setup software RAID partitions and was very curious to see how the hardware raid works on a T2000.</p>
<p>We start of by booting to single user mode from the Solaris DVD so on the OK prompt we do:</p>
<p><code>ok boot cdrom -s</code></p>
<p>When booted from cdrom we type raidctl to see what we have.<br />
<code><br />
# raidctl<br />
Controller: 0<br />
        Disk: 0.0.0<br />
        Disk: 0.1.0</code></p>
<p>Ok now lets try to setup the mirror</p>
<p><code># raidctl -c c0t0d0 c0t1d0<br />
Creating RAID volume will destroy all data on spare space of member disks, proceed (yes/no)? y<br />
/pci@780/pci@0/pci@9/scsi@0 (mpt0):<br />
        Physical disk 0 created.<br />
/pci@780/pci@0/pci@9/scsi@0 (mpt0):<br />
        Physical disk 1 created.<br />
/pci@780/pci@0/pci@9/scsi@0 (mpt0):<br />
        Volume 0 created.<br />
/pci@780/pci@0/pci@9/scsi@0 (mpt0):<br />
        Volume 0 is |enabled||optimal|<br />
/pci@780/pci@0/pci@9/scsi@0 (mpt0):<br />
        Volume 0 is |enabled||optimal|<br />
/pci@780/pci@0/pci@9/scsi@0 (mpt0):<br />
        Physical disk (target 1) is |out of sync||online|<br />
/pci@780/pci@0/pci@9/scsi@0 (mpt0):<br />
        Volume 0 is |enabled||degraded|<br />
/pci@780/pci@0/pci@9/scsi@0 (mpt0):<br />
        Volume 0 is |enabled||resyncing||degraded|<br />
Volume c0t0d0 is created successfully!</code></p>
<p>It seems that the mirror is created, lets check this:</p>
<p><code># raidctl -l c0t0d0<br />
Volume                  Size    Stripe  Status   Cache  RAID<br />
        Sub                     Size                    Level<br />
                Disk<br />
----------------------------------------------------------------<br />
c0t0d0                  136.6G  N/A     SYNC     N/A    RAID1<br />
                0.0.0   136.6G          GOOD<br />
                0.1.0   136.6G          GOOD</code></p>
<p>Ok so the new volume is c0t0d0 and its currently syncing. Unfortunately it is not possible to view the percentage that has been synced or any other indicator how far the sync is.</p>
<p>Do not forget that we now have to label our new volume!</p>
<p><code>#format (ignore warnings)<br />
label</code></p>
<p>Now start the Solaris installation. You will notice that the installation will only find 1 disk, c0t0d0 which is our RAID partition.</p>
<p> When the installation is finished and the system booted we check the status of our mirror with:</p>
<p><code># raidctl -l c0t0d0<br />
Volume                  Size    Stripe  Status   Cache  RAID<br />
        Sub                     Size                    Level<br />
                Disk<br />
----------------------------------------------------------------<br />
c0t0d0                  136.6G  N/A     OPTIMAL  N/A    RAID1<br />
                0.1.0   136.6G          GOOD<br />
                0.0.0   136.6G          GOOD</code></p>
<p>Ok, our RAID volume is looking good now, lets do some tests with removing disks.</p>
<p>Lets start the test by removing disk0 and try if we can still boot (from disk1)</p>
<p>/var/adm/messages now shows us the following:</p>
<p><code>Aug  4 08:53:05 tst01   Physical disk (target 0) is |missing|<br />
Aug  4 08:53:05 tst01 scsi: [ID 107833 kern.notice] /pci@780/pci@0/pci@9/scsi@0 (mpt0):<br />
Aug  4 08:53:05 tst01   Physical disk (target 0) is |out of sync||missing|<br />
Aug  4 08:53:05 tst01 scsi: [ID 107833 kern.notice] /pci@780/pci@0/pci@9/scsi@0 (mpt0):<br />
Aug  4 08:53:05 tst01   One or more disks on volume 0 changed.<br />
Aug  4 08:53:05 tst01 scsi: [ID 107833 kern.notice] /pci@780/pci@0/pci@9/scsi@0 (mpt0):<br />
Aug  4 08:53:05 tst01   One or more disks on volume 0 changed.<br />
Aug  4 08:53:05 tst01 scsi: [ID 107833 kern.notice] /pci@780/pci@0/pci@9/scsi@0 (mpt0):<br />
Aug  4 08:53:05 tst01   Volume 0 is |enabled||degraded|<br />
Aug  4 08:53:09 tst01 SC Alert: [ID 209909 daemon.error] DISK at HDD0 has been removed</code></p>
<p>So it detected our disk has been removed. Lets see what raidctl has got to say about that.</p>
<p><code># raidctl<br />
Device record is invalid</code></p>
<p>I must say I am a little bit suprised that it complains about the Device record being invalid but ok. Lets reboot the system and see if it can boot without any problems.</p>
<p><code>Rebooting with command: boot<br />
Boot device: disk  File and args:<br />
Loading ufs-file-system package 1.4 04 Aug 1995 13:02:54.<br />
FCode UFS Reader 1.12 00/07/17 15:48:16.<br />
Loading: /platform/SUNW,Sun-Fire-T200/ufsboot<br />
Loading: /platform/sun4v/ufsboot<br />
SunOS Release 5.10 Version Generic_120011-14 64-bit<br />
Copyright 1983-2007 Sun Microsystems, Inc.  All rights reserved.<br />
Use is subject to license terms.<br />
os-io WARNING: /pci@780/pci@0/pci@9/scsi@0 (mpt0):<br />
        Volume 0 is degraded</code></p>
<p>After the reboot, lets check the status of our RAID volume:</p>
<p><code># raidctl -l c0t0d0<br />
Volume                  Size    Stripe  Status   Cache  RAID<br />
        Sub                     Size                    Level<br />
                Disk<br />
----------------------------------------------------------------<br />
c0t0d0                  136.6G  N/A     DEGRADED N/A    RAID1<br />
                0.1.0   136.6G          GOOD<br />
                N/A     136.6G          FAILED</code></p>
<p>Thats looks better. As you can see our first disk has the status failed. Let&#8217;s put disk0 back and see if we can resync the volume.<br />
<code><br />
Following messages in /var/adm/messages<br />
SC Alert: DISK at HDD0 has been inserted.<br />
Aug  4 08:59:55 tst01 scsi: /pci@780/pci@0/pci@9/scsi@0 (mpt0):<br />
Aug  4 08:59:55 tst01   Physical disk (target 0) is |out of sync||online|<br />
Aug  4 08:59:55 tst01 scsi: /pci@780/pci@0/pci@9/scsi@0 (mpt0):<br />
Aug  4 08:59:55 tst01   Volume 0 is |enabled||resyncing||degraded|</code></p>
<p>It detected our disk has been reinserted. Lets see what happens with our volume:</p>
<p><code># raidctl -l c0t0d0<br />
Volume                  Size    Stripe  Status   Cache  RAID<br />
        Sub                     Size                    Level<br />
                Disk<br />
----------------------------------------------------------------<br />
c0t0d0                  136.6G  N/A     SYNC     N/A    RAID1<br />
                0.1.0   136.6G          GOOD<br />
                0.0.0   136.6G          GOOD</code></p>
<p>As you can see, after reinserting the disk, the volume started syncing automatically. I tested the same without rebooting the system because it should be hotpluggable. When removing the disk for a view seconds and reinserting it without a reboot the system starts syncing by itself just fine, so there is no need to reboot it.</p>
<p>My conclusion is that the hardware RAID functionality of the T2000 is a lot more easy then using the default Solaris Disksuite. I did a lot of RAID configurations in the past and have seen disksuite eating up our configurations a view times because of some minor mistakes in our setup so this is really a nice feature of the T2000 (most new Sparc systems has this feature by default).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hamel.it/wordpress/?feed=rss2&#038;p=19</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Searching for text files</title>
		<link>http://www.hamel.it/wordpress/?p=18</link>
		<comments>http://www.hamel.it/wordpress/?p=18#comments</comments>
		<pubDate>Thu, 15 Nov 2007 13:46:56 +0000</pubDate>
		<dc:creator>sander</dc:creator>
				<category><![CDATA[Programming / Scripting]]></category>

		<guid isPermaLink="false">http://www.hamel.it/wordpress/?p=18</guid>
		<description><![CDATA[For communication between a php application and a ruby I thought it might be handy to use simple plain text files with the words seperated by comma. Its kinda like csv. This way a php frontend can create these csv files while my ruby daemon can handle the background process. In my case I use [...]]]></description>
			<content:encoded><![CDATA[<p>For communication between a php application and a ruby I thought it might be handy to use simple plain text files with the words seperated by comma. Its kinda like csv. This way a php frontend can create these csv files while my ruby daemon can handle the background process.</p>
<p>In my case I use it to create a webbased installer for some some software. So inside the php frontend we can choose to install a certain software, next php writes it inside a csv file and ruby picks it up, downloads the software and does what is needed.</p>
<p>First we get the daemon part, which looks like:</p>
<pre>
#!/opt/csw/bin/ruby
#start.rb
require 'rubygems'
require 'daemons'

if (VERSION &lt; "1.8.0")
  printf "Use Ruby 1.8.0 or later, your Ruby version: %s...bye\n",VERSION
  exit(1)
end

Daemons.run('dir.rb')</pre>
<p>Now we get the script itself (which I called dir.rb)</p>
<pre>

#!/usr/bin/env ruby

loop do

 # Define where the log and which dir to scan for csv's
 log = '/export/home/sander/ruby/test/log.txt'
 tmp = '/export/home/sander/ruby/test/mydir'
 counter = 0
 #Opening log file for writing
 f = File.open(log, "a")

 require 'date'

 Dir.foreach tmp do |dir|
        file = tmp+'/'+dir

        if file == tmp+'/.'
        else
                if file == tmp+'/..'
                else
                        counter = 0
                        f.puts(DateTime.now.to_s + ' Processing' +file)
                        counter = counter + 1
                        dataArray= Array.new
                        n = 0
                        File.new(file).each_line do |line|
                                line.chomp!
                                dataArray[n] = line.split(',')
                                n += 1
                        end
                        i=0

                        while(i &lt; dataArray.length)
                                # go to address query start

                                type = dataArray[i][0].to_s
                                program = dataArray[i][1].to_s
                                domain = dataArray[i][2].to_s

                                case type
                                        when "install"
                                                case program
                                                        when "someprogram"
                                                                #do some things to install someprogram on domain
                                                                f.puts(DateTime.now.to_s + ' Installing someprogram')
                                                                require 'net/ftp'
                                                                server = 'hostname'
                                                                ftpuser = 'username'
                                                                ftppass = 'password'
                                                                ftp = Net::FTP.open(server) do |ftp|
                                                                 ftp.login(ftpuser, ftppass)
                                                                 ftp.getbinaryfile(program +'.tar', '/export/home/sander/ruby/bla/dir2/' + program +'.tar')
                                                                 f.puts(DateTime.now.to_s + ' Downloading ' + program +'.tar')
                                                                end
                                                                system('gtar xfC /export/home/sander/ruby/bla/dir2/' + program +'.tar /export/home/sander/ruby/bla/dir2/')
                                                                f.puts(DateTime.now.to_s + ' Extracting ' + program +'.tar')

                                                        when "someotherprogram"
                                                                f.puts(DateTime.now.to_s + ' Installing Someotherprogram')
                                                                #do some things to install someotherprogram on domain
                                                end
                                                #puts "Installing: "+ program +" on: " + domain
                                        when "remove"
                                                f.puts "Removing: "+ program +" on: " + domain
                                end

                                sleep 2
                                i = i + 1
                                sleep 2
                        end
                File.delete(file)
                end
        end
 end
 sleep 2
 f.close
end</pre>
<p>For any questions/remarks, please leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hamel.it/wordpress/?feed=rss2&#038;p=18</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No Adobe Acrobat Reader for Solaris X86</title>
		<link>http://www.hamel.it/wordpress/?p=17</link>
		<comments>http://www.hamel.it/wordpress/?p=17#comments</comments>
		<pubDate>Fri, 31 Aug 2007 09:54:31 +0000</pubDate>
		<dc:creator>sander</dc:creator>
				<category><![CDATA[My Work]]></category>
		<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://www.hamel.it/wordpress/?p=17</guid>
		<description><![CDATA[As I am testdriving an x2100-m2 (1 cpu, 2GB RAM) with the sunray server software to see how good it runs compared with the E4500 (8 cpu&#8217;s, 8GB RAM) I ran into a major problem. Adobe only has a Solaris Sparc version of there Acrobat Reader program, there is NO x86 version availlable. I would [...]]]></description>
			<content:encoded><![CDATA[<p>As I am testdriving an x2100-m2 (1 cpu, 2GB RAM) with the sunray server software to see how good it runs compared with the E4500 (8 cpu&#8217;s, 8GB RAM) I ran into a major problem. Adobe only has a Solaris Sparc version of there Acrobat Reader program, there is NO x86 version availlable.</p>
<p>I would like to request everyone who would like to see Acrobat Reader for Solaris X86 to leave a not at the <a href="http://www.adobe.com/support/feature.html" title="Adobe Feature Request Form" target="_blank">feature request form</a> from adobe.<br />
ps. the performance of the x2100-M2 with the sunray server software is amazing so far. It would save as huge electricity costs and gain a lot of performance.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hamel.it/wordpress/?feed=rss2&#038;p=17</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Solaris 10 Kernel Corruption</title>
		<link>http://www.hamel.it/wordpress/?p=16</link>
		<comments>http://www.hamel.it/wordpress/?p=16#comments</comments>
		<pubDate>Wed, 29 Aug 2007 16:23:47 +0000</pubDate>
		<dc:creator>sander</dc:creator>
				<category><![CDATA[My Work]]></category>
		<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://www.hamel.it/wordpress/?p=16</guid>
		<description><![CDATA[Last week we wanted to see how much amps our Sun E4500 was using. Its got 8 400Mhz Sparc cpu&#8217;s and 8GB RAM. I had to should down the server and put a device between it to measure the power. Turned out that he was using about 3.5 Ampere when just being idle. After removing [...]]]></description>
			<content:encoded><![CDATA[<p>Last week we wanted to see how much amps our Sun E4500 was using. Its got 8 400Mhz Sparc cpu&#8217;s and 8GB RAM. I had to should down the server and put a device between it to measure the power. Turned out that he was using about 3.5 Ampere when just being idle.</p>
<p>After removing the device and rebooting the server, this server didn&#8217;t come up anymore and gave the following error:</p>
<pre>
Boot device: sol10  File and args:
not found: rtt_ctx_end
not found: rtt_ctx_end
not found: rtt_ctx_end
not found: rtt_ctx_end
not found: rtt_ctx_start
not found: rtt_ctx_start
not found: rtt_ctx_start
not found: rtt_ctx_start
do_relocations: /platform/sun4u/kernel/cpu/sparcv9/SUNW,UltraSPARC-II do_relocate failed
krtld: error during initial load/link phase
panic - boot: exitto64 returned from client program
Program terminated</pre>
<p>So it seems the kernel got a corrupted file (/platform/sun4u/kernel/cpu/sparcv9/<br />
SUNW,UltraSPARC-II). I booted from CD and checked the above file. It did excist. I checked witch checksum and compared it to a file from another sparc server. It seemed that the checksum was different but the filesize the same, so I copied it from the other sparc server and replaced this file, however it still didn&#8217;t work.</p>
<p>In the end I ran an install from cdrom and choose an upgrade installation from the install menu. The upgrade took about 5 hours but fixed everything. All my configurations kepped unchanged (SunRay Server, Metadb&#8217;s etc.). After the upgrade everyone was able to run on this server again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hamel.it/wordpress/?feed=rss2&#038;p=16</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing Fileserver, storage &amp; DLT S4</title>
		<link>http://www.hamel.it/wordpress/?p=15</link>
		<comments>http://www.hamel.it/wordpress/?p=15#comments</comments>
		<pubDate>Wed, 15 Aug 2007 15:03:22 +0000</pubDate>
		<dc:creator>sander</dc:creator>
				<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://www.hamel.it/wordpress/?p=15</guid>
		<description><![CDATA[Today I spend most of my day building a test environment. The test environment has 1 Sun Fire X2100-M2 with a Sun StorageTek SCSI Adapter connected to a Promise VTrak M210 with 8 x 320GB configured with Hardware RAID6. For networking a Cisco ASA 5505 is used (because of its VPN functionality) and a 3Com [...]]]></description>
			<content:encoded><![CDATA[<p>Today I spend most of my day building a test environment. The test environment has 1 Sun Fire X2100-M2 with a Sun StorageTek SCSI Adapter connected to a Promise VTrak M210 with 8 x 320GB configured with Hardware RAID6.<br />
For networking a Cisco ASA 5505 is used (because of its VPN functionality) and a 3Com 24 x 10/100/1000 switch.</p>
<p>The X2100-M2 has 4 NIC&#8217;s. 2 NIC&#8217;s are configured with aggregation, 1 is used for the Service Processor and the other one is not used.</p>
<p>All seems to be working, solaris x64 is installed on the x2100-M2. The VTrak works perfectly and shows a 1.76TB RAID6 partition which is perfectly mountable with Solaris 10. Tomorrow all will be installed at the client on location and will be the heart of the network which consists of severel Mac workstations.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hamel.it/wordpress/?feed=rss2&#038;p=15</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New fishing rod</title>
		<link>http://www.hamel.it/wordpress/?p=14</link>
		<comments>http://www.hamel.it/wordpress/?p=14#comments</comments>
		<pubDate>Tue, 31 Jul 2007 09:41:38 +0000</pubDate>
		<dc:creator>sander</dc:creator>
				<category><![CDATA[Fishing]]></category>

		<guid isPermaLink="false">http://www.hamel.it/wordpress/?p=14</guid>
		<description><![CDATA[I bought a 2nd hand fishing rod. Its a Peter Koopman self built x-heavy feeder. Its made out of kevlar carbon. Together with a Shimano rail for 75 EURO. Not bad. This will come in handy during the competitions I am planning to fish next year.]]></description>
			<content:encoded><![CDATA[<p>I bought a 2nd hand fishing rod. Its a Peter Koopman self built x-heavy feeder. Its made out of kevlar carbon. Together with a Shimano rail for 75 EURO. Not bad. This will come in handy during the competitions I am planning to fish next year.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hamel.it/wordpress/?feed=rss2&#038;p=14</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ugly mail backup script</title>
		<link>http://www.hamel.it/wordpress/?p=11</link>
		<comments>http://www.hamel.it/wordpress/?p=11#comments</comments>
		<pubDate>Tue, 05 Jun 2007 16:36:46 +0000</pubDate>
		<dc:creator>sander</dc:creator>
				<category><![CDATA[Programming / Scripting]]></category>

		<guid isPermaLink="false">http://www.hamel.it/wordpress/?p=11</guid>
		<description><![CDATA[Created a small script with ruby thats being executed by a cronjob to automatically backup a mailserver thats uses the Maildir format on Solaris. The script backups the user home dir&#8217;s (This is where the mail is located) to a mounted NFS partition from the backup server. The script also should delete all backups older [...]]]></description>
			<content:encoded><![CDATA[<p>Created a small script with ruby thats being executed by a cronjob to automatically backup a mailserver thats uses the Maildir format on Solaris.</p>
<p>The script backups the user home dir&#8217;s (This is where the mail is located) to a mounted NFS partition from the backup server. The script also should delete all backups older then 7 days. This is where I had a problem because I am not a real programmer &#8220;yet&#8221; and I didn&#8217;t want to search how to store all in a text file or in a db. So here is what I did (I know it&#8217;s a pretty ugly way of doing it, if anyone wants to give me a better code, please do so :- ) )</p>
<pre>
#!/opt/csw/bin/ruby
#Ruby Mail Backup
#Created by Sander on 05-06-2007

#
require 'date'

class Date
   def Date.now
      return Date.jd(DateTime.now.jd)
   end
end

dateBack = Date.now.to_s
dateDel1 = Date.now - 7
dateDel2 = Date.now - 50

#Deleting old backups (ugly workaround)
while dateDel2 &lt; dateDel1
   delstr = dateDel2.to_s
    puts 'removing ' + delstr
    system('rm /mnt/backup/mail/home' + delstr +'.tar')
    dateDel2 = dateDel2 + 1
end

#Making backup of all home dir's
system('tar cf /mnt/backup/mail/home' + dateBack + '.tar /export/home/')</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.hamel.it/wordpress/?feed=rss2&#038;p=11</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Helping Install Vista</title>
		<link>http://www.hamel.it/wordpress/?p=8</link>
		<comments>http://www.hamel.it/wordpress/?p=8#comments</comments>
		<pubDate>Tue, 15 May 2007 15:31:16 +0000</pubDate>
		<dc:creator>sander</dc:creator>
				<category><![CDATA[My Work]]></category>

		<guid isPermaLink="false">http://www.hamel.it/wordpress/?p=8</guid>
		<description><![CDATA[Yesterday I spend whole evening helping a client to install there new pc. It was a compaq preinstalled with Vista Basic Home and Microsoft Works. I needed to install it with Office and get there e-mail incl. addressbook from there old computer and put it in the new one. Also they wanted norton (bought in [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I spend whole evening helping a client to install there new pc. It was a compaq preinstalled with Vista Basic Home and Microsoft Works.  I needed to install it with Office and get there e-mail incl. addressbook from there old computer and put it in the new one. Also they wanted norton (bought in june 2006) and there ADSL to work.</p>
<p>First finishing the pre installed Vista, this took a lot of time. After it was finished it was easy to get adsl working. Just needed to plugin the usb cable from the dsl modem into the pc and install the drivers from the cdrom. It worked straight away however, windows started to download its updates automatically (I hate all the automatically security settings and warnings in windows) and the system was getting extremely slow.</p>
<p>After finishing when I open IE or FF and download something the system gets very slow. Taskmanager shows 100 procent cpu usage however it doesn&#8217;t show any process using 100 procent cpu usage so this was confusing. After struggling for a while I noticed that the adsl modem also has an ethernet connection. I decided to disconnect the usb and use ethernet instead. This fixed the problem and vista was very fast again. Conclusion, adsl modem driver was not compatible with vista.</p>
<p>The installation of Norton 2006 was not compatible with vista as well in such a way that it doesn&#8217;t allow you to install it. It gives a message that you need win2000 sp3, xp or higher.</p>
<p>Importing the old mail was a disaster, old version of Office and ended up with a outlook including all e-mails however, it didn&#8217;t save passwords, didn&#8217;t save the smtp require authentication setting and the contactbook was acting strange. In the end I installed thunderbird and imported the settings from outlook, that fixed the problem.</p>
<p>So my first impression of Vista is that it has a lot of compatibilty issues with old software/windows releases.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hamel.it/wordpress/?feed=rss2&#038;p=8</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing Ruby Daemons</title>
		<link>http://www.hamel.it/wordpress/?p=7</link>
		<comments>http://www.hamel.it/wordpress/?p=7#comments</comments>
		<pubDate>Wed, 09 May 2007 14:35:15 +0000</pubDate>
		<dc:creator>sander</dc:creator>
				<category><![CDATA[My Work]]></category>
		<category><![CDATA[Programming / Scripting]]></category>

		<guid isPermaLink="false">http://www.hamel.it/wordpress/?p=7</guid>
		<description><![CDATA[We got some bash scripts running via a cronjob to set permissions of certain directories. To improve this process I wrote a very simple ruby daemon process to handle this. First I installed the daemons gem (#gem install daemons), next I created the following: #control.rb require &#8216;rubygems&#8217; require &#8216;daemons&#8217; Daemons.run(&#8216;permissions.rb&#8217;) &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- #permissions.rb loop do system(&#8216;&#60;some [...]]]></description>
			<content:encoded><![CDATA[<p>We got some bash scripts running via a cronjob to set permissions of certain directories. To improve this process I wrote a very simple ruby daemon process to handle this.</p>
<p>First I installed the daemons gem (#gem install daemons), next I created the following:</p>
<p>#control.rb<br />
require &#8216;rubygems&#8217;<br />
require &#8216;daemons&#8217;</p>
<p>Daemons.run(&#8216;permissions.rb&#8217;)</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
#permissions.rb<br />
loop do<br />
system(&#8216;&lt;some unix commands&#8217;&gt;<br />
system(&#8216;&lt;some unix commands&#8217;&gt;<br />
sleep 15<br />
end</p>
<p>As you can see, I use the standard unix tools by invoking the system(&#8221;) command. I am still trying to find out if it would be benefitial to use File.chmod and File.chown from the fileutils package.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hamel.it/wordpress/?feed=rss2&#038;p=7</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

