<?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>Makl Ndrix &#187; sysadmin</title>
	<atom:link href="http://michaelhendrickx.com/category/sysadmin/feed" rel="self" type="application/rss+xml" />
	<link>http://michaelhendrickx.com</link>
	<description>may contain traces of nuts</description>
	<lastBuildDate>Tue, 24 Jan 2012 06:47:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Error mongoDB under Ubuntu &#8211; can&#8217;t find libmozjs.so</title>
		<link>http://michaelhendrickx.com/201009_error-mongodb-under-ubuntu-cant-find-libmozjs-so.html</link>
		<comments>http://michaelhendrickx.com/201009_error-mongodb-under-ubuntu-cant-find-libmozjs-so.html#comments</comments>
		<pubDate>Mon, 27 Sep 2010 18:05:27 +0000</pubDate>
		<dc:creator>Michael Hendrickx</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mongodb]]></category>

		<guid isPermaLink="false">http://michaelhendrickx.com/?p=348</guid>
		<description><![CDATA[When installing MongoDB under Ubuntu, one could stumble upon the following problem: mongo: error while loading shared libraries: libmozjs.so: cannot open shared object file: No such file or directory This is caused because MongoDB uses XulRunner for it&#8217;s operations. (This is also why you see a bunch of X11 programs that are to be installed [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://michaelhendrickx.com/201009_error-mongodb-under-ubuntu-cant-find-libmozjs-so.html' addthis:title='Error mongoDB under Ubuntu &#8211; can&#8217;t find libmozjs.so'  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p><img src="http://michaelhendrickx.com/wp-content/uploads/2010/09/mongo.jpg" alt="" title="mongo" width="107" height="54" align="right" />When installing <a href="http://www.mongodb.org">MongoDB</a> under <a href="http://www.ubuntu.com/">Ubuntu</a>, one could stumble upon the following problem:</p>
<blockquote><p>mongo: error while loading shared libraries:<br />
libmozjs.so: cannot open shared object file: No such file or directory
</p></blockquote>
<p>This is caused because MongoDB uses <a href="https://developer.mozilla.org/en/XULRunner">XulRunner</a> for it&#8217;s operations.  (This is also why you see a bunch of X11 programs that are to be installed when using apt-get).  XulRunner, however, contains this file, but is not loaded.</p>
<p><strong>Solving the problem:</strong><br />
Make sure you have xulrunner installed (<strong>sudo apt-get install xulrunner-1.9.2</strong>) and add its path to ldconfig&#8217;s configuration files, which are in/etc/ld.so.conf.d.  You could create a file, say, <strong>/etc/ld.so.conf.d/xulrunner.conf</strong>, containing the following line:</p>
<blockquote><p>/usr/lib/xulrunner-1.9.2.10/</p></blockquote>
<p>After this, you chould run <strong>ldconfig</strong> (as root) and that should do the trick.  Let me know if you have any problems with this.</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelhendrickx.com/201009_error-mongodb-under-ubuntu-cant-find-libmozjs-so.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to shrink Microsoft SQL log files</title>
		<link>http://michaelhendrickx.com/201007_how-to-shrink-microsoft-sql-log-files.html</link>
		<comments>http://michaelhendrickx.com/201007_how-to-shrink-microsoft-sql-log-files.html#comments</comments>
		<pubDate>Mon, 12 Jul 2010 04:55:58 +0000</pubDate>
		<dc:creator>Michael Hendrickx</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[db logs]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://michaelhendrickx.com/?p=302</guid>
		<description><![CDATA[When having Microsoft SQL databases, its log files can grow quite a bit, potentially slow down the database server and eat up disk space. To shrink a database, one can run the following line: EXEC D_ShrinkDBLogs 0,100,1000,'with truncate_only','DB_NAME' (change DB_NAME with the database&#8217;s name) To shrink all databases, one can use &#8220;sp_MSforeachdb&#8221; which is an [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://michaelhendrickx.com/201007_how-to-shrink-microsoft-sql-log-files.html' addthis:title='How to shrink Microsoft SQL log files'  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p><img src="http://michaelhendrickx.com/wp-content/uploads/2010/07/nsp1.jpg" alt="" title="nsp" width="242" height="201" align="right" /></p>
<p>When having Microsoft SQL databases, its log files can grow quite a bit, potentially slow down the database server and eat up disk space.  </p>
<p>To shrink a database, one can run the following line: </p>
<p><strong><code>EXEC D_ShrinkDBLogs 0,100,1000,'with truncate_only','DB_NAME'</code></strong><br />
(change DB_NAME with the database&#8217;s name)</p>
<p>To shrink all databases, one can use &#8220;sp_MSforeachdb&#8221; which is an undocumented sql stored procedure:</p>
<p><strong><code>EXEC sp_MSForEachDB 'D_ShrinkDBLogs 0,100,1000,''with truncate_only'',''?'''</code></strong></p>
<p>To run this, the following stored procedure need to be installed. It can just be copy pasted from the code below (or download from <a href='http://michaelhendrickx.com/wp-content/uploads/2010/07/d_shrinkdblogs.txt'>this</a> link):<br />
<span id="more-302"></span></p>
<pre>
CREATE PROC [dbo].[D_ShrinkDBLogs]
  @target_percent TINYINT = 0, @target_size_MB INT,  @max_iterations INT, @trunc NVARCHAR(1000),
  @DB VARCHAR(30)
AS
  SET nocount ON
  SET @trunc = 'with truncate_only'
  --SET @trunc = ''
  DECLARE
      @last_row INT, @log_size DECIMAL(15,2), @unused_at_start DECIMAL(15,2),
      @unused DECIMAL(15,2), @shrinkable DECIMAL(15,2), @iteration INT, @file_max INT,
      @file INT, @fileid VARCHAR(5)

  SELECT @iteration = 0
  PRINT @DB
  CREATE TABLE #loginfo
     (id INT IDENTITY, FileId INT, FileSize NUMERIC(22,0), StartOffset NUMERIC(22,0),
       FSeqNo INT, Status INT, Parity SMALLINT, CreateLSN NUMERIC(30) )

  CREATE TABLE #logfiles
     (id INT IDENTITY(1,1), fileid VARCHAR(5) NOT NULL )
  INSERT #logfiles
    ( fileid )
     SELECT CONVERT(VARCHAR,fileid) FROM sysfiles WHERE status = 1048642
     SELECT @file_max = @@rowcount

  IF OBJECT_ID('shrinktab') IS NULL
    EXEC ('create table shrinktab ( x nchar(3000) not null )')
  INSERT #loginfo
     (
      FileId,FileSize,StartOffset,FSeqNo,Status,
      Parity,CreateLSN )
      EXEC ('dbcc loginfo (' + @DB + ')'
     )
  SELECT @last_row = @@rowcount
  PRINT @last_row
  SELECT
      @log_size = SUM(FileSize) / 1048576.00,
      @unused = SUM(CASE WHEN Status = 0
      THEN FileSize ELSE 0 END) / 1048576.00,

  @shrinkable = SUM(CASE WHEN id < @last_row - 1 AND Status = 0
          THEN FileSize
          ELSE 0
          END) / 1048576.00
          FROM #loginfo

  SELECT @unused_at_start = @unused -- save for later
  SELECT 'iteration' = @iteration, 'log size, MB' = @log_size,
  'unused log, MB' = @unused, 'shrinkable log, MB' = @shrinkable,
   'shrinkable %' = CONVERT(DECIMAL(6,2), @shrinkable * 100 / @log_size)
  WHILE @shrinkable * 100 / @log_size > @target_percent
    AND @shrinkable > @target_size_MB
    AND @iteration < @max_iterations
    BEGIN
      SELECT @iteration = @iteration + 1 -- this is just a precaution
      EXEC ('insert shrinktab select name from sysobjects delete shrinktab')
      SELECT @file = 0
      WHILE @file < @file_max
        BEGIN
          SELECT @file = @file + 1
          SELECT @fileid = fileid FROM #logfiles WHERE id = @file
          EXEC
          ('use ' + @DB + '; dbcc shrinkfile( ' + @fileid + ' )')
        END
      EXEC
       ( 'backup log ' + @db + ' ' + @trunc   )

      TRUNCATE TABLE #loginfo
      INSERT #loginfo
       ( FileId,FileSize,StartOffset, FSeqNo,Status,Parity,CreateLSN )
       EXEC ( 'dbcc loginfo' )
      SELECT @last_row = @@rowcount
      SELECT @log_size = SUM(FileSize) / 1048576.00,
       @unused = SUM(CASE WHEN Status = 0 THEN FileSize
       ELSE 0
       END) / 1048576.00,
       @shrinkable = SUM(CASE WHEN id < @last_row - 1
       AND Status = 0 THEN FileSize
       ELSE 0
       END)
       / 1048576.00
       FROM #loginfo

       SELECT 'iteration' = @iteration, 'log size, MB' = @log_size,
       'unused log, MB' = @unused, 'shrinkable log, MB' = @shrinkable,
       'shrinkable %' = CONVERT(DECIMAL(6,2),@shrinkable
       * 100 / @log_size)
    END
 SELECT CONVERT(VARCHAR,@iteration) + ' iterations. Log shrunk from ' +
 CONVERT(VARCHAR,@unused_at_start) + ' MB to ' + CONVERT(VARCHAR,@unused) + ' MB'
 EXEC ( 'drop table shrinktab' )
</pre>
<p>Note that this procedure wasn't written by me, but ramassed together by a good friend of mine.</p>
<p>Thank you,<br />
Michael</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelhendrickx.com/201007_how-to-shrink-microsoft-sql-log-files.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian won&#8217;t boot on BL465 server</title>
		<link>http://michaelhendrickx.com/201007_debian-wont-boot-on-bl465-server.html</link>
		<comments>http://michaelhendrickx.com/201007_debian-wont-boot-on-bl465-server.html#comments</comments>
		<pubDate>Mon, 05 Jul 2010 11:15:54 +0000</pubDate>
		<dc:creator>Michael Hendrickx</dc:creator>
				<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://michaelhendrickx.com/?p=299</guid>
		<description><![CDATA[When installing Debian on a HP BL465 server, we sometimes run into the problems that after installing, GRUB won&#8217;t boot up anymore. First off, it&#8217;s not a Debian specific problem, we had this problem with other Linux distributions also, but decided to standardize on Debian across the organization. Installing to the MBR fails, and you [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://michaelhendrickx.com/201007_debian-wont-boot-on-bl465-server.html' addthis:title='Debian won&#8217;t boot on BL465 server'  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p><img src="http://michaelhendrickx.com/wp-content/uploads/2010/07/grub.jpg" style="padding:2px" alt="" title="grub" width="96" height="128" align="right" />When installing Debian on a HP BL465 server, we sometimes run into the problems that after installing, </strong>GRUB won&#8217;t boot up anymore</strong>.</p>
<p>First off, it&#8217;s not a Debian specific problem, we had this problem with other Linux distributions also, but decided to standardize on Debian across the <a href="http://www.nakheel.com">organization</a>.</p>
<p>Installing to the MBR fails, and you have to install grub on <strong>/dev/cciss/c0d0</strong>, although upon rebooting after the installation, Grub throws out an error that it cannot boot off (hd1,0).</p>
<p>When you encounter this, you need to <strong>e</strong>dit the configuration (by pressing <strong>e</strong> in the initial grub screen), and <strong>change the (hd1,0) to (hd0,0)</strong>.</p>
<p>This did the trick for us,</p>
<p>Thanks,<br />
Michael</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelhendrickx.com/201007_debian-wont-boot-on-bl465-server.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reverse proxy for sharepoint on Linux using HAProxy</title>
		<link>http://michaelhendrickx.com/201006_reverse-proxy-for-sharepoint-on-linux-using-haproxy.html</link>
		<comments>http://michaelhendrickx.com/201006_reverse-proxy-for-sharepoint-on-linux-using-haproxy.html#comments</comments>
		<pubDate>Wed, 16 Jun 2010 04:02:42 +0000</pubDate>
		<dc:creator>Michael Hendrickx</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[haproxy]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[reverse proxy]]></category>

		<guid isPermaLink="false">http://michaelhendrickx.com/?p=289</guid>
		<description><![CDATA[At Nakheel, we needed to load balance a new sharepoint instance. Our new sharepoint is single sign on, and was running on 2 web servers which needed to be load balanced. We played around with Apache for a while, and it&#8217;s awesome proxy balancer, but it gave us the problem that it was always asking [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://michaelhendrickx.com/201006_reverse-proxy-for-sharepoint-on-linux-using-haproxy.html' addthis:title='Reverse proxy for sharepoint on Linux using HAProxy'  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p><a href="http://michaelhendrickx.com/wp-content/uploads/2010/06/fo.jpg"><img src="http://michaelhendrickx.com/wp-content/uploads/2010/06/fo.jpg" alt="" title="fo" width="116" height="107" align="right" /></a>At Nakheel, we needed to load balance a new sharepoint instance.  Our new sharepoint is single sign on, and was running on 2 web servers which needed to be load balanced.  We played around with Apache for a while, and it&#8217;s awesome <a href="http://httpd.apache.org/docs/2.1/mod/mod_proxy_balancer.html">proxy balancer</a>, but it gave us the problem that it was always <strong>asking for a username and password.</strong></p>
<p>Apache was used, since I have a reasonable amount of experience with it load balancing servers such as Webrick, etc.  After a few frustrating hours of messing with <a href="http://www.innovation.ch/personal/ronald/ntlm.html">NTLM</a>, <a href="http://certifiedgeek.blogsome.com/">Christian</a> proposed <a href="http://certifiedgeek.blogsome.com/2010/06/15/open-source-load-balancer-software-2010/">a few alternatives</a> for this.  </p>
<p>Having this in mind, we decided to go for <a href="http://haproxy.1wt.eu/">HAProxy</a>, to provide load balancing and a reverse proxy for our sharepoint instance.  The good this is that it is a very simple tool, it accept HTTP conenctions, and forward them.  </p>
<p>Below is our simplified <strong>/etc/haproxy/haproxy.cfg</strong> file</p>
<pre>
global
        maxconn 4096
        user haproxy
        group haproxy
        daemon
        # debug

defaults
        mode    http
        option  forwardfor
        log     127.0.0.1 local0 notice
        maxconn 2000
        contimeout      5000
        clitimeout      50000
        srvtimeout      50000

backend sharepoint
        balance roundrobin
        option redispatch
        cookie SERVERID insert nocache
        server sp1      172.30.16.11:80  cookie spsrv01 weight 30 check
        server sp2      172.30.16.12:80  cookie spsrv02 weight 30 check

frontend httpid
        bind *:80
        acl hosts_sharepoint hdr_end(host) -i intranet.domain.com
        acl hosts_sharepoint hdr_end(host) -i intranet.domain.com:80
        use_backend sharepoint if hosts_sharepoint
        default_backend sharepoint
</pre>
<p>The configuration is very straightforward, and it got rid of our continuous username/password boxes, especially under firefox.</p>
<p>Hope this helps,<br />
Michael</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelhendrickx.com/201006_reverse-proxy-for-sharepoint-on-linux-using-haproxy.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Changing NSClient++ configurations in bulk</title>
		<link>http://michaelhendrickx.com/201005_changing-nsclient-configurations-in-bulk.html</link>
		<comments>http://michaelhendrickx.com/201005_changing-nsclient-configurations-in-bulk.html#comments</comments>
		<pubDate>Tue, 11 May 2010 10:20:55 +0000</pubDate>
		<dc:creator>Michael Hendrickx</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[batch file]]></category>
		<category><![CDATA[ghetto]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[nsclient]]></category>

		<guid isPermaLink="false">http://michaelhendrickx.com/?p=277</guid>
		<description><![CDATA[At work, we started using Nagios to monitor the hosts and their services for any issues, so we can, proactively, take actions when we see trouble coming (hard disk that fills up rapidly, restarting services, etc). Recently we change the Nagios host to another IP address and found ourselves having to change a few dozen [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://michaelhendrickx.com/201005_changing-nsclient-configurations-in-bulk.html' addthis:title='Changing NSClient++ configurations in bulk'  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p><img src="http://michaelhendrickx.com/wp-content/uploads/2010/05/nagios.jpg" alt="" title="nagios" width="255" height="172" align="right" />At <a href="http://www.nakheel.com">work</a>, we started using Nagios to monitor the hosts and their services for any issues, so we can, proactively, take actions when we see trouble coming (hard disk that fills up rapidly, restarting services, etc).</p>
<p>Recently we change the Nagios host to another IP address and found ourselves having to change a few dozen NSClient.ini files on the server.  Even though we use DNS names as monitoring host (only nsclient access on port 12489/tcp is allowed from a certain host), NSClient by default caches the IP address (Using <strong>cache_allowed_hosts</strong>, which is set to &#8220;1&#8243; by default) so we were bound to change quite some files.</p>
<p>To do this, we have to do the following:<span id="more-277"></span></p>
<ul>
<li>stop the nsclient service</li>
<li>overwrite the nsclient.ini file</li>
<li>start the nsclient service</li>
</ul>
<p>For reasons i cannot disclose, this could not be done using any group policies.  So we went the ghetto batch way:</p>
<p><code><br />
@psexec \\%1 "C:\Program Files\NSClient++\NSclient++.exe" -uninstall<br />
@xcopy /Y C:\tool\nagios\nsclient\* "\\%1\c$\program files\nsclient++\"<br />
@psexec \\%1 "C:\Program Files\NSClient++\NSclient++.exe" -install<br />
@psexec \\%1 "C:\Program Files\NSClient++\NSclient++.exe" -start<br />
@echo Finished %1<br />
</code></p>
<p>This assumes you have nsclient++ already, which is an awesome piece of software that you can grab from <a href="http://nsclient.org/">nsclient.org</a>, and that you have <a href="http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx">psexec</a> installed to execute commands.</p>
<p>Using this script, you can just run <strong>C:\tool\nagios\update_nsc.bat server_name</strong> to have the server monitored again.</p>
<p>Thank you,<br />
Michael</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelhendrickx.com/201005_changing-nsclient-configurations-in-bulk.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Change the ILO server name under Linux</title>
		<link>http://michaelhendrickx.com/201004_change-the-ilo-server-name-under-linux.html</link>
		<comments>http://michaelhendrickx.com/201004_change-the-ilo-server-name-under-linux.html#comments</comments>
		<pubDate>Sun, 25 Apr 2010 13:57:22 +0000</pubDate>
		<dc:creator>Michael Hendrickx</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[blade]]></category>
		<category><![CDATA[hp]]></category>
		<category><![CDATA[ilo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[oa]]></category>
		<category><![CDATA[onboard administrator]]></category>

		<guid isPermaLink="false">http://michaelhendrickx.com/?p=268</guid>
		<description><![CDATA[At work, we have a lot of HP Blade servers, and manage these through HP Onboard Administrator. By default, the server names are adapted from the Windows hostname, due to HP Insight Management agent tools. When running Linux, there doesn&#8217;t seem to be a option, or at least I couldn&#8217;t find one. While questioned a [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://michaelhendrickx.com/201004_change-the-ilo-server-name-under-linux.html' addthis:title='Change the ILO server name under Linux'  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p>At work, we have a lot of HP Blade servers, and manage these through HP Onboard Administrator.  By default, the server names are adapted from the Windows hostname, due to HP Insight Management agent tools.  When running Linux, there doesn&#8217;t seem to be a option, or at least I couldn&#8217;t find one.</p>
<p>While questioned a few times on HP forums (such as <a href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1034264">this thread</a>), questions rose to &#8220;installing windows on the server, then reinstall Linux&#8221;, it is possible in the web interface to be set.  It&#8217;s not obviously placed, and hence might require some searching.<span id="more-268"></span></p>
<p>First, open the blade&#8217;s ILO web interface, and select the concerned blade and choose <strong>Web Administration</strong> in its ILO menu.</p>
<p><a href="http://michaelhendrickx.com/wp-content/uploads/2010/04/c7_1.jpg"><img src="http://michaelhendrickx.com/wp-content/uploads/2010/04/c7_1-150x150.jpg" alt="" title="c7_1" width="150" height="150" class="aligncenter size-thumbnail wp-image-269" /></a></p>
<p>When logged in in the blade itself (usually done through SSO of the enclosure), choose &#8220;Adminstration&#8221;.</p>
<p><a href="http://michaelhendrickx.com/wp-content/uploads/2010/04/c7_2.jpg"><img src="http://michaelhendrickx.com/wp-content/uploads/2010/04/c7_2-150x150.jpg" alt="" title="c7_2" width="150" height="150" class="aligncenter size-thumbnail wp-image-270"/></a></p>
<p>Finally, choose <strong>options</strong>, and then <strong>Settings &raquo; Access</strong> in the left menu pane.  There you&#8217;ll see Server name, and you can fill what you want.</p>
<p><a href="http://michaelhendrickx.com/wp-content/uploads/2010/04/c7_3.jpg"><img src="http://michaelhendrickx.com/wp-content/uploads/2010/04/c7_3-150x150.jpg" alt="" title="c7_3" width="150" height="150" class="aligncenter size-thumbnail wp-image-271" /></a></p>
<p>True, it has nothing to do with Linux, but it gives us easier to manage hostname links in Onboard Administrator.</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelhendrickx.com/201004_change-the-ilo-server-name-under-linux.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Microsoft Virtual Server 2005 &#8211; network trouble?</title>
		<link>http://michaelhendrickx.com/201002_microsoft-virtual-server-2005-network-trouble.html</link>
		<comments>http://michaelhendrickx.com/201002_microsoft-virtual-server-2005-network-trouble.html#comments</comments>
		<pubDate>Thu, 25 Feb 2010 06:20:14 +0000</pubDate>
		<dc:creator>Michael Hendrickx</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[virtual server]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://michaelhendrickx.com/?p=255</guid>
		<description><![CDATA[Hi all, In our intranet development environment we run Microsoft Virtual Server, it was setup by the consultants who developed our Intranet&#8217;s first phase. Now, the second phase is about the start, we dusted off those servers and found out that the virtual machines all had no network adapters installed anymore. After cursing, and making [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://michaelhendrickx.com/201002_microsoft-virtual-server-2005-network-trouble.html' addthis:title='Microsoft Virtual Server 2005 &#8211; network trouble?'  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p><img src="http://michaelhendrickx.com/wp-content/uploads/2010/02/vss.jpeg" alt="" title="vss" width="115" height="118" align="right" />Hi all,</p>
<p>In our intranet development environment we run Microsoft Virtual Server, it was setup by the consultants who developed our Intranet&#8217;s first phase.  Now, the second phase is about the start, we dusted off those servers and found out that the virtual machines all had no network adapters installed anymore.</p>
<p>After cursing, and making a plan of migrating this to VMWare&#8217;s ESX (sorry consultant) next week, we found out that the only way of solving this was to remove the virtual adapters from the Virtual Server console, and adding them again.  In the client machine&#8217;s, a static IP assigned adapter was trying to fetch an IP address (yeah, go figure).  By just setting it to dynamic (dhcp), and then reassigning the static address, it was solved.</p>
<p>I guess Microsoft is about just re-trying it, rebooting, re-adding.  But we&#8217;ll be switching to ESX anyways.</p>
<p>Thank you,<br />
Michael</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelhendrickx.com/201002_microsoft-virtual-server-2005-network-trouble.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nnscfgmaker.sh: a nagios/nsclient++ cfg maker</title>
		<link>http://michaelhendrickx.com/201001_nnscfgmaker-sh-a-nagiosnsclient-cfg-maker.html</link>
		<comments>http://michaelhendrickx.com/201001_nnscfgmaker-sh-a-nagiosnsclient-cfg-maker.html#comments</comments>
		<pubDate>Thu, 28 Jan 2010 14:27:42 +0000</pubDate>
		<dc:creator>Michael Hendrickx</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[zenoss]]></category>

		<guid isPermaLink="false">http://michaelhendrickx.com/?p=241</guid>
		<description><![CDATA[Dear all, We are in the process of changing the monitoring system on part of our network from Zenoss to Nagios. This is not a Zenoss vs. Nagios debate, as both products are awesome and do the things they are designed for very well. We (Christian and myself) use a combination of Cacti for bandwith [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://michaelhendrickx.com/201001_nnscfgmaker-sh-a-nagiosnsclient-cfg-maker.html' addthis:title='nnscfgmaker.sh: a nagios/nsclient++ cfg maker'  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p><img src="http://michaelhendrickx.com/wp-content/uploads/2010/01/nagios.jpg" alt="" title="nagios" width="150" height="114" align="right" />Dear all,</p>
<p>We are in the process of changing the monitoring system on part of our network from Zenoss to Nagios.  This is not a Zenoss vs. Nagios debate, as both products are awesome and do the things they are designed for very well.  We (<a href="http://ae.linkedin.com/in/certifiedgeek">Christian</a> and myself) use a combination of <a href="http://www.cacti.net">Cacti</a> for bandwith monitoring and <a href="http://www.zenoss.com">Zenoss</a> for server and device monitoring.  Now, recently we decided to change the latter to <a href="http://www.nagios.org/">Nagios</a>.  It is know for its &#8220;great deal of flexibility when integrating Nagios into their environment&#8221; (Galstad, 2005)</p>
<p>As Zenoss was configured using <a href="http://www.snmp-informant.com/">SNMP Informant</a> to grab information about the MS Windows servers (available disk space, CPU load, etc) and Nagios uses <a href="http://nsclient.org/">NSClient++</a>; one of the time consuming tasks was getting the client on the server (thank you domain <img src='http://michaelhendrickx.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) and configuring each and every server on the Nagios server.  I guess there should be some sort of discovery tool for Nagios, but I couldn&#8217;t directly find one.  </p>
<p>In order to tackle the copy-pasting for a few dozen config files, and to brush up my bash scripting again, I wrote the <strong>Nagios Nsclient++ cfg maker</strong><span id="more-241"></span>, yeah, what&#8217;s in a name eh.  This client enumerates the target server about what is installed and makes a CFG file based on that.  Oh yeah, we&#8217;re using nagios with its text files, not the SQL version.</p>
<p>You can download it <a href='http://michaelhendrickx.com/wp-content/uploads/2010/01/nnscfgmaker.sh' >here (bash script)</a>.  As it&#8217;s GPL&#8217;d, feel free to change and redistribute it.  As we mainly house HP servers, APC UPS&#8217;s and most of them run Windows (for now, <em>evil laugh</em>), so it&#8217;s a bit windows/hp minded.</p>
<p>The syntax is very easy, just run the script with the hostname of the server that you want to &#8220;enumerate&#8221;.  Doing that, you&#8217;ll have something similar as the output below:</p>
<pre>
mike@mon:/usr/local/nagios/etc/servers$ ./nnscfgmaker.sh server2
Nagios NSclient++ (check_nt) CFG maker

 + logfile: server2.cfg
 + pinging the server.. ok
 + checking of nsclient++ is installed
 + adding hdd c:\
 + adding hdd e:\
 + adding hdd f:\
 + adding hdd g:\
 + adding hdd h:\
 + adding hdd i:\
 + adding process: MS SQL Server (sqlservr.exe)
 + adding service: Automatic Updates (wuauserv)
 + adding service: DNS Client (DNSCache)
 + adding service: Event Log (Eventlog)
 + adding service: Messenger (Messenger)
 + adding service: Server Service (lanmanserver)
 + adding service: Windows Time (w32time)
 + adding service: SNMP service (SNMP)
 + adding service: HP OpenView Ctrl Service (ovctrl)
 + adding service: Backup Exec Server (BackupExecRPCService)
 + adding service: HP Insight Server Agent (CqMgServ)
 + adding service: HP Insight NIC Agent (CpqNicMgmt)
 + adding service: HP Insight Storage Agent (CqMgStor)
 + adding service: TrendMicro OfficeScan NT Listener (tmlisten)
 + adding service: Trendmicro Antivirus RealTime Scan (ntrtscan)
 - done

mike@mon:/usr/local/nagios/etc/servers$
</pre>
<p>This creates a files called server2.cfg, which Nagios can read and process.</p>
<p>Hope you like it, let me know if you have any questions or comments.</p>
<p>Take care,<br />
Michael</p>
<p><span style="color:#808080">Ethan Galstad (2005), Nagios. [online] Available from: <a href="http://archive.fosdem.org/2005/index/interviews/interviews_galstad.html">http://archive.fosdem.org/2005/index/interviews/interviews_galstad.html</a> (Accessed: 28 Jan 2010)</span></p>
]]></content:encoded>
			<wfw:commentRss>http://michaelhendrickx.com/201001_nnscfgmaker-sh-a-nagiosnsclient-cfg-maker.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Tar based incremental backups</title>
		<link>http://michaelhendrickx.com/200907_tar-based-incremental-backups.html</link>
		<comments>http://michaelhendrickx.com/200907_tar-based-incremental-backups.html#comments</comments>
		<pubDate>Wed, 01 Jul 2009 10:04:28 +0000</pubDate>
		<dc:creator>Michael Hendrickx</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://michaelhendrickx.com/?p=162</guid>
		<description><![CDATA[A small bash script I wrote to have incremental backups done on a unix server, and then pushed to a Windows File system. On the fileserver, we add this directory to the normal backup. This is on a mail server, where emails are stored in MailDir format. We create weekly full backups on sunday, and [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://michaelhendrickx.com/200907_tar-based-incremental-backups.html' addthis:title='Tar based incremental backups'  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p>A small bash script I wrote to have incremental backups done on a unix server, and then pushed to a Windows File system.  On the fileserver, we add this directory to the normal backup.</p>
<p>This is on a mail server, where emails are stored in <a href="http://en.wikipedia.org/wiki/Maildir">MailDir</a> format.  We create weekly full backups on sunday, and daily incremental.  This script is called daily at night from a cron job.  Gotta love the scripting abilities of bash.</p>
<p>It might help you out, so here goes:</p>
<pre>
#!/bin/bash
# backup script is doing following items
# dump all incremental email into a backup file, gzip the backup file and
# move the file to an external file server

START_TIME=`/bin/date`
echo "backup started at: ${START_TIME}"

DOW_N=`/bin/date +"%w"` # number, 0 (sun), 1 (mon)
DOW_T=`/bin/date +"%F"`

TO_BACKUP="/opt/maildata/"
TEMP_FILE="/tmp/${DOW_T}_mail_backup.tar"
BACKUP_LOG="/tmp/mail.backup"
FILE_SERVER="/mnt/fileserver/" # mounted over SMB

# if it's a sunday, delete the incremental file and take a full backup
if [ ${DOW_N} -eq "0" ]; then
  /bin/rm ${BACKUP_LOG}
fi

/bin/tar -c -f ${TEMP_FILE} --listed-incremental=${BACKUP_LOG} ${TO_BACKUP}
/bin/gzip -f ${TEMP_FILE}
FILE_SIZE=`/bin/ls -lah ${TEMP_FILE}.gz | awk '{ print $5 }'`
/bin/mv ${TEMP_FILE}.gz ${FILE_SERVER}

## report, this goes in an email through cron
END_TIME=`/bin/date`; export END_TIME
echo "backup ended at: ${END_TIME}"
echo "data moved: ${FILE_SIZE}"
</pre>
]]></content:encoded>
			<wfw:commentRss>http://michaelhendrickx.com/200907_tar-based-incremental-backups.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Logging into SSH with a different username</title>
		<link>http://michaelhendrickx.com/200903_loggin-into-ssh-with-a-different-username.html</link>
		<comments>http://michaelhendrickx.com/200903_loggin-into-ssh-with-a-different-username.html#comments</comments>
		<pubDate>Thu, 26 Mar 2009 02:59:52 +0000</pubDate>
		<dc:creator>Michael Hendrickx</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://michaelhendrickx.com/?p=138</guid>
		<description><![CDATA[I love SSH. SSH is the de-facto service for remote server management, especially in a CLI environment. Being a avid Linux user, and spending quite a bit of time on OSX lately, I often SSH into several servers remotely. Being subject to &#8220;username conventions&#8221;, you don&#8217;t always share the same username across machines. And I [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://michaelhendrickx.com/200903_loggin-into-ssh-with-a-different-username.html' addthis:title='Logging into SSH with a different username'  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p>I love SSH.  SSH is the de-facto service for remote server management, especially in a CLI environment.</p>
<p>Being a avid Linux user, and spending quite a bit of time on OSX lately, I often SSH into several servers remotely.  Being subject to &#8220;username conventions&#8221;, you don&#8217;t always share the same username across machines.  And I always wondered how one could just type <em>ssh hostname</em> instead of providing the username.</p>
<p>Seems that, by creating a <code>.ssh/config</code> file with following contents:</p>
<p><code><br />
Host server.example.com server<br />
&nbsp;&nbsp;User username<br />
</code></p>
<p>WIll make life easier, as you can in the future only do a &#8220;ssh hostname&#8221;.  I didn&#8217;t know this.</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelhendrickx.com/200903_loggin-into-ssh-with-a-different-username.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

