<?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>Robert Naylor &#187; Debian</title>
	<atom:link href="http://robert.pobice.co.uk/cats/linux/debian/feed/" rel="self" type="application/rss+xml" />
	<link>http://robert.pobice.co.uk</link>
	<description>Random thoughts and tech tips</description>
	<lastBuildDate>Sun, 11 Apr 2010 18:13:12 +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>inputlirc</title>
		<link>http://robert.pobice.co.uk/2007/07/inputlirc/</link>
		<comments>http://robert.pobice.co.uk/2007/07/inputlirc/#comments</comments>
		<pubDate>Wed, 11 Jul 2007 19:37:11 +0000</pubDate>
		<dc:creator>robert</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Thumbs Up]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.pobice.co.uk/index/archives/2007/07/39</guid>
		<description><![CDATA[Just found a package for a bit of software in ubuntu called inputlirc.
Ubuntu lists it as:
Zeroconf LIRC daemon using input event devices
This is a small LIRC-compatible daemon that reads from /dev/input/eventX
devices and sends the received keycodes to connecting LIRC clients. Inputlircd
needs no configuration, it uses the standardised names for the keycodes as
used by the kernel. [...]]]></description>
			<content:encoded><![CDATA[<p>Just found a package for a bit of software in ubuntu called inputlirc.</p>
<p>Ubuntu lists it as:</p>
<blockquote><p>Zeroconf LIRC daemon using input event devices<br />
This is a small LIRC-compatible daemon that reads from /dev/input/eventX<br />
devices and sends the received keycodes to connecting LIRC clients. Inputlircd<br />
needs no configuration, it uses the standardised names for the keycodes as<br />
used by the kernel. Many USB remote controls that present HID devices, as well<br />
as multimedia keyboards should work out of the box.</p></blockquote>
<p>Why is this good, well I just install this package and well I get full remote support &#8211; once I&#8217;ve configured the applications, which is still a pain in the arse.  Now if the applications could be written to work with the zeroconfig lirc with well zero config the world will be great (well ok less un-great).</p>
]]></content:encoded>
			<wfw:commentRss>http://robert.pobice.co.uk/2007/07/inputlirc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: NUT &amp; CPU Throttling/Frequency Scaling</title>
		<link>http://robert.pobice.co.uk/2007/05/howto-nut-cpu-throttlingfrequency-scaling/</link>
		<comments>http://robert.pobice.co.uk/2007/05/howto-nut-cpu-throttlingfrequency-scaling/#comments</comments>
		<pubDate>Mon, 21 May 2007 19:03:33 +0000</pubDate>
		<dc:creator>robert</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.pobice.co.uk/index/archives/2007/05/37</guid>
		<description><![CDATA[After a couple of power cuts lasting long enough for my UPS to shutdown my PC, I&#8217;ve been meaning to get NUTs to set my CPU to lowest speed possible when running on battery power, this week I finally got round to it.   Please note these instructions are based on Debian 4.0 (Etch) [...]]]></description>
			<content:encoded><![CDATA[<p>After a couple of power cuts lasting long enough for my UPS to shutdown my PC, I&#8217;ve been meaning to get NUTs to set my CPU to lowest speed possible when running on battery power, this week I finally got round to it.   Please note these instructions are based on Debian 4.0 (Etch) and may require extra steps to work on different distro&#8217;s.</p>
<p><span id="more-37"></span></p>
<p>For this to work you have to:</p>
<ol>
<li>Have a CPU that support Frequency Scaling</li>
<li>Have CPU Frequency scaling working</li>
<li>Use <a href="http://www.networkupstools.org/">NUT (Network UPS Tools)</a>
</li>
</ol>
<p>Here what you need to do to get thing working</p>
<ul>
<li><strong>Check you what &#8216;Governors&#8217; you have available</strong><br />
You need to make sure the correct modules are loaded so that you can scale to the correct settings. To see what you do have loaded run:<br />
<code>cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors</code><br />
You&#8217;ll need at least powersave and one other.  Powersave should set the CPU Frequency to the lowest setting.  If you don&#8217;t have powersave you&#8217;ll need to load the module.  As root run:<br />
<code>modprobe cpufreq_powersave</code> and add cpufreq_powersave to the file<br />
 /etc/modules.</p>
<p>To test that it is working, ideally run something that force you CPU to 100 for a while (say compress a large folder) and then run<br />
<code>cpufreq-selector --governor powersave<br />
sleep 1<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq<br />
cpufreq-selector --governor userspace<br />
sleep 1<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq<br />
</code><br />
The first number given should be the lowest CPU frequency and the last should be the highest (assuming the process is using a lot of CPU time still)
	</li>
<li><strong>Add a few new items to upssched.conf</strong><br />
Using you&#8217;re favorite editor open up /etc/nut/upssched.conf and add the following line:<br />
<code>AT ONBATT * START-TIMER powersave 30<br />
AT ONLINE * CANCEL-TIMER powersave<br />
AT ONLINE * START-TIMER userspace 30<br />
AT ONBATT * CANCEL-TIMER userspace</code><br />
I&#8217;ve used a timer (30 seconds) to smooth out jumpy power from triggering off any actions.  </li>
<li><strong>Add the command to the CMDSCRIPT file to change the CPU frequency govenor</strong></li>
<p>Edit the cmdscript file (the path is given in upssched.conf on the line starting CMDSCRIPT.  This file probably doesn&#8217;t exist &#8211; so just create a new one.  Assuming it doesn&#8217;t exist add the following lines:<br />
<code>#! /bin/sh<br />
case $1 in<br />
	powersave)<br />
		/usr/bin/cpufreq-selector --governor powersave &#038;&#038; logger -t upssched-cmd "Setting CPU Governor to powersave"<br />
		;;<br />
	userspace)<br />
		/usr/bin/cpufreq-selector --governor userspace  &#038;&#038; logger -t upssched-cmd "Setting CPU Governor to userspace"<br />
		;;<br />
	*)<br />
		logger -t upssched-cmd "Unrecognized command: $1"<br />
		;;<br />
esac</code></p>
<li><strong>Test</strong> Unplug you&#8217;re UPS for 1 min, plug back in and look at /var/log/syslog &#8211; you should see that NUTs has throttled you&#8217;re CPU.</li>
</ul>
<p>I haven&#8217;t had a power cut since I&#8217;ve implemented this, but from looking at the stats from the UPS I should gain another 7 min or so of battery time &#8211; an extra 21%.  An improvement on this may be stopping some process and task when on battery and starting them again when back on mains.  But for now, at least untill the next power cut this will do for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://robert.pobice.co.uk/2007/05/howto-nut-cpu-throttlingfrequency-scaling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WUFTP Rule for fail2ban</title>
		<link>http://robert.pobice.co.uk/2006/12/wuftp-rule-for-fail2ban/</link>
		<comments>http://robert.pobice.co.uk/2006/12/wuftp-rule-for-fail2ban/#comments</comments>
		<pubDate>Sat, 02 Dec 2006 15:42:52 +0000</pubDate>
		<dc:creator>robert</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.pobice.co.uk/index/archives/2006/12/33</guid>
		<description><![CDATA[I&#8217;ve put to gather a rule for wuftp for fail2ban v0.6 (ie the version in backports for sarge &#8211; http://backports.org/).  The regexp is straight from the version available in debian unstable.  Seems to do the trick.
[WUFTPD]
# Option:  enabled
# Notes.:  enable monitoring for this section.
# Values:  [true &#124; false]  Default: [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve put to gather a rule for wuftp for fail2ban v0.6 (ie the version in backports for sarge &#8211; http://backports.org/).  The regexp is straight from the version available in debian unstable.  Seems to do the trick.</p>
<p><code>[WUFTPD]<br />
# Option:  enabled<br />
# Notes.:  enable monitoring for this section.<br />
# Values:  [true | false]  Default:  true<br />
#<br />
enabled = true<br />
</code><code><br />
# Option:  logfile<br />
# Notes.:  logfile to monitor.<br />
# Values:  FILE  Default:  /var/log/auth.log<br />
#<br />
logfile = /var/log/auth.log<br />
</code><code><br />
# Option:  port<br />
# Notes.:  specifies port to monitor<br />
# Values:  [ NUM | STRING ]  Default:<br />
#<br />
port = ftp<br />
</code><code><br />
# Option:  timeregex<br />
# Notes.:  regex to match timestamp in SSH logfile. For TAI64N format,<br />
#          use timeregex = @[0-9a-f]{24}<br />
# Values:  [Mar  7 17:53:28]<br />
# Default: \S{3}\s{1,2}\d{1,2} \d{2}:\d{2}:\d{2}<br />
#<br />
timeregex = \S{3}\s{1,2}\d{1,2} \d{2}:\d{2}:\d{2}<br />
</code><code><br />
# Option:  timepattern<br />
# Notes.:  format used in "timeregex" fields definition. Note that '%' must be<br />
#          escaped with '%' (see http://rgruet.free.fr/PQR2.3.html#timeModule).<br />
#          For TAI64N format, use timepattern = tai64n<br />
# Values:  TEXT  Default:  %%b %%d %%H:%%M:%%S<br />
#<br />
timepattern = %%b %%d %%H:%%M:%%S<br />
</code><code><br />
# Option:  failregex<br />
# Notes.:  regex to match the password failures messages in the logfile.<br />
# Values:  TEXT  Default:  (?:Authentication failure|Failed (?:keyboard-interactive/pam|password)) for(?: illegal user)? .* from (?:::f{4,6}:)?(?P<host>\S*)<br />
failregex = wu-ftpd\[\d+\]:\s+\(pam_unix\)\s+authentication failure.* rhost=(?P&lt;host&gt;\S*)</p>
<p></host></code></p>
]]></content:encoded>
			<wfw:commentRss>http://robert.pobice.co.uk/2006/12/wuftp-rule-for-fail2ban/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GVIM/Ubuntu/Debian Syntax Highlighting</title>
		<link>http://robert.pobice.co.uk/2006/11/gvimubuntudebian-syntax-highlighting/</link>
		<comments>http://robert.pobice.co.uk/2006/11/gvimubuntudebian-syntax-highlighting/#comments</comments>
		<pubDate>Mon, 20 Nov 2006 19:35:01 +0000</pubDate>
		<dc:creator>robert</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.pobice.co.uk/index/archives/2006/11/32</guid>
		<description><![CDATA[It appears in the Edgy Eft and Debian Etch that Syntax highlighting in gvim has been switched off by default.
To add it back add the following line to /etc/vim/gvimrc

" Also switch on highlighting the last used search pattern.
if has("syntax") &#038;&#038; (&#038;t_Co > 2 &#124;&#124; has("gui_running"))
  syntax on
  set hlsearch
endif
]]></description>
			<content:encoded><![CDATA[<p>It appears in the Edgy Eft and Debian Etch that Syntax highlighting in gvim has been switched off by default.</p>
<p>To add it back add the following line to /etc/vim/gvimrc<br />
<code><br />
" Also switch on highlighting the last used search pattern.<br />
if has("syntax") &#038;&#038; (&#038;t_Co > 2 || has("gui_running"))<br />
  syntax on<br />
  set hlsearch<br />
endif</code></p>
]]></content:encoded>
			<wfw:commentRss>http://robert.pobice.co.uk/2006/11/gvimubuntudebian-syntax-highlighting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
