<?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>Dee Double Dub &#187; Ubuntu</title>
	<atom:link href="http://www.deedoubledub.com/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.deedoubledub.com</link>
	<description>random points of interest</description>
	<lastBuildDate>Fri, 17 Jul 2009 00:30:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CUDA 2.1 Setup on Ubuntu 8.04</title>
		<link>http://www.deedoubledub.com/2009/04/cuda-21-setup-on-ubuntu-804/</link>
		<comments>http://www.deedoubledub.com/2009/04/cuda-21-setup-on-ubuntu-804/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 01:37:30 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[CUDA]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://deedoubledub.phpnet.us/?p=74</guid>
		<description><![CDATA[The Compute Unified Device Architecture is nVidia&#8217;s architecture and API for using graphics processors as powerful parallel supercomputers on the cheap.  Setting up the environment for developing with CUDA requires the installation of the CUDA driver, the CUDA toolkit, and the CUDA SDK.  The following is the process for setting up this environment in Ubuntu [...]]]></description>
			<content:encoded><![CDATA[<p>The Compute Unified Device Architecture is nVidia&#8217;s architecture and API for using graphics processors as powerful parallel supercomputers on the cheap.  Setting up the environment for developing with CUDA requires the installation of the CUDA driver, the CUDA toolkit, and the CUDA SDK.  The following is the process for setting up this environment in Ubuntu 8.04.</p>
<p><span id="more-74"></span></p>
<ol>
<li>Install the necessary build tools</li>
<p>You may find that you need some additional development libraries depending on what is already installed on your system.<br />
<code>sudo apt-get install build-essential libglut3-dev libxi-dev libxmu-dev</code></p>
<li>Download the CUDA driver, Toolkit, and SDK from <a href="http://developer.nvidia.com">developer.nvidia.com</a></li>
<li>Install the CUDA driver</li>
<p>The nVidia driver cannot be installed while X is running, so you will need to stop gdm and install the driver in a virtual console by pressing ctrl+alt+F1.  If you have already installed the Ubuntu restricted driver for your nVidia graphics card like I did, you will probably run into some trouble installing the CUDA driver.  I solved my problems by following the nVidia driver manual installation guide <a href="https://help.ubuntu.com/community/NvidiaManual">here</a>.  The normal process if there are no conflicting drivers already installed are as follows.<br />
<code>chmod +x NVIDIA-Linux-x86-xxx-pkg1.run<br />
sudo /etc/init.d/gdm stop<br />
sudo ./NVIDIA-Linux-x86-xxx-pkg1.run<br />
sudo /etc/init.d/gdm start</code></p>
<li>Install the CUDA toolkit</li>
<p><code>chmod +x NVIDIA_CUDA_Toolkit_2.1_ubuntu8.04_x86.run<br />
sudo ./NVIDIA_CUDA_Toolkit_2.1_ubuntu8.06_x86.run</code></p>
<li>Modify Environment Variables</li>
<p>The simplest way to do this is to edit your ~/.bashrc file.  Changes take effect when you start a new terminal session.<br />
<code>PATH=$PATH:/usr/local/cuda/bin<br />
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib<br />
export PATH<br />
export LD_LIBRARY_PATH</code></p>
<li>Install the CUDA SDK</li>
<p><code>chmod +x ./NVIDIA_CUDA_SDK_xxx_linux.run<br />
./NVIDIA_CUDA_SDK_xxx_linux.run</code></p>
<li>Compile and Run the example programs</li>
<p><code>cd ~/NVIDIA_CUDA_SDK<br />
make</code></p>
<p>Now execute any of the example programs in ~/NVIDIA_CUDA_SDK/bin/linux/release/</ol>
<p>Check out <a href="http://lifeofaprogrammergeek.blogspot.com/2008/05/cuda-development-in-ubuntu.html">http://lifeofaprogrammergeek.blogspot.com/2008/05/cuda-development-in-ubuntu.html</a> for similar details and how to copy the template project and start coding your own CUDA program.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.deedoubledub.com/2009/04/cuda-21-setup-on-ubuntu-804/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nagios NRPE setup on Ubuntu 8.04</title>
		<link>http://www.deedoubledub.com/2009/03/nagios-nrpe-setup-on-ubuntu-804/</link>
		<comments>http://www.deedoubledub.com/2009/03/nagios-nrpe-setup-on-ubuntu-804/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 23:37:12 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://deedoubledub.phpnet.us/?p=31</guid>
		<description><![CDATA[Here is a step by step walkthrough that I developed recently for setting up the Nagios NRPE plugin to monitor remote hosts. This setup was performed on a host running Ubuntu Server 8.04.1. This walkthrough is based on the official nagios documentation and will result in a NRPE plugin installed from source since the latest version of nagios and its plugins are not available in the Ubuntu 8.04 repositories.]]></description>
			<content:encoded><![CDATA[<p>Here is a step by step walkthrough that I developed recently for setting up the <a href="http://www.nagios.org">Nagios</a> NRPE plugin to monitor remote hosts.  This setup was performed on a host running Ubuntu Server 8.04.1.  This walkthrough is based on the official nagios documentation and will result in a NRPE plugin installed from source since the latest version of nagios and its plugins are not available in the Ubuntu 8.04 repositories.</p>
<p><span id="more-31"></span></p>
<h3>On the remote host (machine to be monitored)</h3>
<p>1. Become root.  This just makes it easier so you don&#8217;t have to keep typing sudo.<br />
<code># sudo -s</code></p>
<p>2. Create nagios user and set password<br />
<code>$ /usr/sbin/useradd nagios<br />
$ passwd nagios</code></p>
<p>3. Install the OpenSSL development libraries required to compile the NRPE plugin<br />
<code>$ apt-get install libssl-dev openssl</code></p>
<p>4. Download source tarball of Nagios plugins (<a href="http://www.nagios.org/download">http://www.nagios.org/download</a>)<br />
<code>$ wget &lt;nagios-plugins, latest stable version&gt;</code></p>
<p>5. Extract the tarball<br />
<code>$ tar xzf &lt;nagios-plugins...&gt;.tar.gz<br />
$ cd &lt;nagios-plugins...&gt;</code></p>
<p>5a. (optional) Install additional libraries required for any plugins that you will need.  See the REQUIREMENTS document included with nagios plugins source code for any dependencies necessary for specific plugins.</p>
<p>6. Compile and install the plugins<br />
<code>$ ./configure<br />
$ make<br />
$ make install</code></p>
<p>7. Fix the permissions on the plugin directory and the plugins<br />
<code>$ chown nagios:nagios /usr/local/nagios<br />
$ chown -R nagios:nagios /usr/local/nagios/libexec</code></p>
<p>8. Install xinetd<br />
<code>$ apt-get install xinetd</code></p>
<p>9. Install the NRPE daemon, download the source tarball for NRPE from <a href="http://www.nagios.org/download">http://www.nagios.org/download</a><br />
<code>$ wget &lt;nrpe, latest stable version&gt;<br />
$ tar xzf &lt;nrpe...&gt;.tar.gz<br />
$ cd &lt;nrpe...&gt;<br />
$ ./configure<br />
$ make all<br />
<br />
$ make install-plugin<br />
$ make install-daemon<br />
$ make install-daemon-config<br />
$ make install-xinetd</code></p>
<p>10. Edit /etc/xinetd.d/nrpe and add the IP address of the monitoring server to the only_from directive.  This directive can contain multiple IP addresses provided in a space separated list.  This example will allow access from the Nagios monitoring server as well as the localhost.<br />
<code>$ vi /etc/xinetd.d/nrpe<br />
<br />
. . .<br />
<br />
only_from    =xxx.xxx.xxx.xxx 127.0.0.1</code></p>
<p>11. Edit /etc/services to add the NRPE port definition<br />
<code>$ vi /etc/services<br />
<br />. . .<br />
<br />
nrpe    5666/tcp    # NRPE</code></p>
<p>12. Restart xinetd<br />
<code>$ /etc/init.d/xinetd restart</code></p>
<p>13. Test the NRPE daemon locally</p>
<p>First, use netstat to make sure that it is running under xinetd<br />
<code>$ netstat -at | grep nrpe</code><br />
should produce this output:<br />
<code>tcp 0 0 *:nrpe *:* LISTEN</code></p>
<p>Now give it a test using the Nagios check_nrpe plugin:<br />
<code>$ /usr/local/nagios/libexec/check_nrpe -H localhost</code><br />
You should see this output (with the appropriate version number of course)<br />
<code>NRPE v2.12</code></p>
<p>14. At this point you should be able to access the Nagios NRPE daemon on this host from the monitoring server to execute plugins locally.  Make sure to modify your firewall rules to allow access on port 5666 to the NRPE daemon.  The commands that are to be executed by the NRPE plugin can be customized in /usr/local/nagios/etc/nrpe.cfg.</p>
<h3>On the monitoring host (machine running nagios)</h3>
<p>1. Become root<br />
<code>$ sudo -s</code></p>
<p>2. Download and install the check_nrpe plugin (<a href="http://www.nagios.org/download">http://www.nagios.org/download</a>)<br />
<code>$ wget &lt;nrpe, latest stable version&gt;<br />
$ tar xzf &lt;nrpe...&gt;.tar.gz<br />
$ cd &lt;nrpe...&gt;<br />
$ ./configure<br />
$ make all<br />
$ make install-plugin</code></p>
<p>3. Test communication with remote NRPE daemon<br />
<code>$ /usr/local/nagios/libexec/check_nrpe -H &lt;hostname&gt;</code><br />
Your output should look like this if everything is successful (with the proper version number again).<br />
<code>NRPE v2.12</code></p>
<p>4. Create the NRPE command definition wherever in your configuration files you have commands defined.<br />
<code>$ vi /usr/local/nagios/etc/objects/commands.cfg<br />
<br />
. . .<br />
<br />
define command{<br />
&nbsp;&nbsp;&nbsp;&nbsp;command_name check_nrpe<br />
&nbsp;&nbsp;&nbsp;&nbsp;command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$<br />
}</code></p>
<p>5. Now you can create host and service definitions for the remote host and begin monitoring local services through the NRPE plugin and daemon.<br />
SAMPLE:<br />
<code>define service{<br />
&nbsp;&nbsp;&nbsp;&nbsp;use generic-service<br />
&nbsp;&nbsp;&nbsp;&nbsp;host_name remotehost<br />
&nbsp;&nbsp;&nbsp;&nbsp;service_description Current Users<br />
&nbsp;&nbsp;&nbsp;&nbsp;check_command check_nrpe!check_users<br />
}<br />
; check_nrpe tells the remote nrpe daemon to execute<br />
; the check_users command as defined in nrpe.cfg</code></p>
<p>6. Verify your configuration and restart the Nagios daemon to begin monitoring the remote host.<br />
Verify your nagios configuration:<br />
<code>$ /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg</code><br />
If everything checks out, restart the Nagios daemon:<br />
<code>$ /etc/init.d/nagios restart</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.deedoubledub.com/2009/03/nagios-nrpe-setup-on-ubuntu-804/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
