<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.jenitennison.com/blog" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>environment</title>
 <link>http://www.jenitennison.com/blog/taxonomy/term/23</link>
 <description>The taxonomy view with a depth of 0.</description>
 <language>en</language>
<item>
 <title>Minimising hard-disk power consumption</title>
 <link>http://www.jenitennison.com/blog/node/51</link>
 <description>&lt;p&gt;Me: You know that new laptop I was talking about? The &lt;a href=&quot;http://www.dell.com/content/products/productdetails.aspx/xpsnb_m1330&quot; title=&quot;Dell XPS M1330&quot;&gt;Dell XPS M1330&lt;/a&gt;? The one where you can get it with a 32Gb solid-state drive?&lt;/p&gt;

&lt;p&gt;Him (wary): Yeeesss&amp;#8230;&lt;/p&gt;

&lt;p&gt;Me: Well listen to &lt;a href=&quot;http://news.digitaltrends.com/news/story/12556/samsung_announces_64_gb_solid_state_drive&quot; title=&quot;Digital Trends: Samsung Announces 64Gb Solid State Drive&quot;&gt;this&lt;/a&gt;: &amp;#8220;a 64 GB solid-state drive can read 64 MB/S, write 45 MB/s, and consumes just half a Watt when operating (one tenth of a Watt when idle). In comparison, an 80 GB 1.8-inch hard drive reads at 15 MB/s, writes at 7 MB/s, and eats 1.5 Watts either operating or when idle.&amp;#8221;&lt;/p&gt;

&lt;p&gt;Him: So what you&amp;#8217;re saying is, if you get this laptop you&amp;#8217;ll be saving the planet.&lt;/p&gt;

&lt;p&gt;Me: Precisely!&lt;/p&gt;

&lt;!--break--&gt;

&lt;hr /&gt;

&lt;p&gt;Until such time as I can afford said Dell, I&amp;#8217;m trying other ways of limiting the power consumption of our computer equipment. I &lt;a href=&quot;http://www.jenitennison.com/blog/node/46&quot; title=&quot;here, a week ago, in &#039;And she&#039;s back&#039;&quot;&gt;mentioned&lt;/a&gt; that my dad&amp;#8217;s set me up nicely with a &lt;a href=&quot;http://en.wikipedia.org/wiki/NSLU2&quot; title=&quot;Wikipedia: NSLU2&quot;&gt;NSLU2&lt;/a&gt;. One of its USB ports has a 2Gb USB key stuck in it: that holds the core operating system. The other&amp;#8217;s got a 500Gb hard drive attached to it; that holds the data.&lt;/p&gt;

&lt;p&gt;The NSLU2 acts as my file server and mail server. It runs all the time, so one of its attractions is its low power consumption. But having a hard drive spun-up all the time isn&amp;#8217;t very efficient, particularly during the night when there&amp;#8217;s no need for constant disk access and the noise might disturb people sleeping in the spare room where the server&amp;#8217;s located. On the other hand, you don&amp;#8217;t want to do a huge amount of spinning up and spinning down because it strains the hardware.&lt;/p&gt;

&lt;p&gt;The disk Barry (my dad) bought powers down after about 15 minutes of non-activity. Which is great, until you realise that what you think of as non-activity (&amp;#8220;I&amp;#8217;m not even logged in!&amp;#8221;) isn&amp;#8217;t what counts. Background processes writing to logs is enough to keep the disk spun up.&lt;/p&gt;

&lt;p&gt;So the first challenge was to identify those processes that were writing to disk and keeping it spun up. Barry wrote the following script to do it:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/bin/sh

# script by barry, intended for cron.hourly,
# to log (under /root/disk-access-logs)
#  (without accessing the hd unnecessarily)
# the atime and mtime of
# files on /var (one partition of the mounted usb-hd)
# which have been accessed in the last hour

# AND (later, maybe temporarily also) the value in 
#  /var/lib/ntp/ntp.drift to a different logfile

# LOG_FILE=log-`date +%y%m%d-%H%M`

LOG_FILE=/root/disk-access-logs/log-`date +%y%m%d`
[ -f $LOG_FILE ] || touch $LOG_FILE

echo &quot;Result of:  find /var -mmin -59 -printf &quot;%a %t %p\n&quot; |sort -t &quot;:&quot; -k4nr -k5nr&#039; at:&quot; &amp;gt;&amp;gt;$LOG_FILE
echo `date +%y%m%d-%H%M` &amp;gt;&amp;gt;$LOG_FILE
find /var -mmin -59 -printf &quot;%a %t %p\n&quot; |sort -t &quot;:&quot; -k4nr -k5nr &amp;gt;&amp;gt;$LOG_FILE
echo &quot;------&quot; &amp;gt;&amp;gt;$LOG_FILE
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This reveals things like &lt;a href=&quot;http://en.wikipedia.org/wiki/Fetchmail&quot; title=&quot;Wikpedia: fetchmail&quot;&gt;fetchmail&lt;/a&gt; (pretty obviously) writing every five minutes when it wakes up to check for new mail on my POP3 server. It reveals &lt;a href=&quot;http://en.wikipedia.org/wiki/Exim&quot; title=&quot;Wikipedia: exim&quot;&gt;exim&lt;/a&gt; writing to its log every half hour. It reveals &lt;a href=&quot;http://en.wikipedia.org/wiki/Network_Time_Protocol&quot; title=&quot;Wikipedia: Network Time Protocol&quot;&gt;ntp&lt;/a&gt; collecting statistics (and, still unresolved, writing to &lt;code&gt;daemon.log&lt;/code&gt; in the early hours of the morning). It also revealed that &lt;a href=&quot;http://us3.samba.org/samba/&quot; title=&quot;Samba website&quot;&gt;Samba&lt;/a&gt;, which we&amp;#8217;d previously been using to give me Windows-based access to the hard drives, was doing a lot of logging, and this was part of the reason we stopped using it. And that &lt;a href=&quot;http://en.wikipedia.org/wiki/Syslog&quot; title=&quot;Wikipedia: syslog&quot;&gt;syslog&lt;/a&gt; was also logging frequently.&lt;/p&gt;

&lt;p&gt;The ntp logging was minimised by editing &lt;code&gt;/etc/ntp.conf&lt;/code&gt; and the syslog logging by setting a long &amp;#8220;mark&amp;#8221; interval in &lt;code&gt;/etc/default/syslogd&lt;/code&gt;. Having a &lt;a href=&quot;http://en.wikipedia.org/wiki/Cron&quot; title=&quot;Wikipedia: cron&quot;&gt;cron&lt;/a&gt; job that stops all the processes that don&amp;#8217;t need to be constantly running overnight is working reasonably well at the moment. My crontab currently looks like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Fixed the PATH to provide access to start-stop-daemon, 
# env and rm that /etc/init.d/exim4 requires

PATH=/usr/bin:/bin:/sbin:$PATH

# m h  dom mon dow   command
00 23 * * * /etc/init.d/fetchmail stop &amp;gt; /dev/null &amp;amp;
00 23 * * * /etc/init.d/exim4 stop &amp;gt; /dev/null &amp;amp;
00 07 * * * /etc/init.d/exim4 start &amp;gt; /dev/null &amp;amp;
00 07 * * * /etc/init.d/fetchmail start &amp;gt; /dev/null &amp;amp;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;but I&amp;#8217;m probably going to tweak it to take care of the ntp thing and to remain spun down on days when I&amp;#8217;m not constantly at the computer.&lt;/p&gt;

&lt;p&gt;Any other ideas?&lt;/p&gt;
</description>
 <comments>http://www.jenitennison.com/blog/node/51#comments</comments>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/32">hardware</category>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/23">environment</category>
 <pubDate>Sun, 19 Aug 2007 21:00:09 +0100</pubDate>
 <dc:creator>Jeni</dc:creator>
 <guid isPermaLink="false">51 at http://www.jenitennison.com/blog</guid>
</item>
<item>
 <title>The right kind of indoctrination</title>
 <link>http://www.jenitennison.com/blog/node/29</link>
 <description>&lt;p&gt;Preparing dinner. Our three-year-old suddenly exclaims, &amp;#8220;&lt;a href=&quot;http://www.recycling-guide.org.uk/rrr.html&quot;&gt;Reduce! Reuse! Recycle!&lt;/a&gt;&amp;#8221;&lt;/p&gt;

&lt;p&gt;Too much &lt;a href=&quot;http://www.bbc.co.uk/cbeebies/bobthebuilder/&quot;&gt;Bob the Builder&lt;/a&gt; (who, for those &lt;em&gt;without&lt;/em&gt; three-year-olds, has decamped to &amp;#8220;Sunflower Valley&amp;#8221; and now lives a zero-carbon lifestyle, constructing eco-friendly sunflower-oil-extraction factories and the like).&lt;/p&gt;

&lt;p&gt;Get &amp;#8216;em young, that&amp;#8217;s what I say.&lt;/p&gt;

&lt;!--break--&gt;
</description>
 <comments>http://www.jenitennison.com/blog/node/29#comments</comments>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/26">children</category>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/23">environment</category>
 <pubDate>Sat, 16 Jun 2007 19:39:45 +0100</pubDate>
 <dc:creator>Jeni</dc:creator>
 <guid isPermaLink="false">29 at http://www.jenitennison.com/blog</guid>
</item>
<item>
 <title>Pipelines (of lentils) in action</title>
 <link>http://www.jenitennison.com/blog/node/23</link>
 <description>&lt;p&gt;We went to the &lt;a href=&quot;http://www.sciencemuseum.org.uk/&quot; title=&quot;London Science Museum&quot;&gt;Science Museum&lt;/a&gt; on Monday. In &lt;a href=&quot;http://www.sciencemuseum.org.uk/visitmuseum/galleries/launchpad.aspx&quot; title=&quot;Launch Pad Gallery&quot;&gt;Launch Pad&lt;/a&gt;, there are lots of hands-on activities for children. One of them starts with a big container with lots of lentils in it. You have to fill a bucket with lentils, then hoist the bucket up and along so it meets with a device that flips it over so that the lentils spill down a funnel into a tube and along a chute into another large container. From there there are two &lt;a href=&quot;http://en.wikipedia.org/wiki/Archimedes_screw&quot; title=&quot;Archimedes Screw&quot;&gt;Archimedes screws&lt;/a&gt; linked together that, when you turn their handles, take the lentils into another funnel and down another tube into yet another large-ish container. From there, there are two conveyor belts with scoops attached that take the lentils up to another funnel, down another pipe and back into the first big container, where they can start the entire process again.&lt;/p&gt;

&lt;!--break--&gt;

&lt;p&gt;Around this closed system of lentil logistics were about fifteen children. Each of them was doing one of the jobs necessary to make the system work: filling buckets, turning handles, pulling ropes, pushing stubborn lentils down chutes and so on. There was no one ordering anyone about; each child was totally absorbed and content with their single job, and every job was filled (whenever anyone left to do something else, their place was immediately taken by another child).&lt;/p&gt;

&lt;p&gt;It made me wonder how many tasks I&amp;#8217;m engaged in that are ultimately pointless. And whether I really care that they&amp;#8217;re ultimately pointless, so long as I&amp;#8217;m fulfilled doing them. And what the human race could achieve if at least some of us were engaged in a system in which we&amp;#8217;d each do tasks we enjoyed while actually working towards a non-pointless goal. Like, you know, avoiding mass extinction or something.&lt;/p&gt;
</description>
 <comments>http://www.jenitennison.com/blog/node/23#comments</comments>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/6">pipelines</category>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/23">environment</category>
 <pubDate>Tue, 29 May 2007 19:27:02 +0100</pubDate>
 <dc:creator>Jeni</dc:creator>
 <guid isPermaLink="false">23 at http://www.jenitennison.com/blog</guid>
</item>
<item>
 <title>&quot;Hot&quot; compost bin</title>
 <link>http://www.jenitennison.com/blog/node/22</link>
 <description>&lt;p&gt;We&amp;#8217;re going to be moving to a new house soon, and one of the first things I intend to do is get a compost bin. We produce an inordinate amount of food waste in our house, at least partly due to two small children who can be quite fussy eaters, so I&amp;#8217;m looking for a compost bin that takes cooked food as well as vegetable peelings and the like (ie a digester as well as a composter).&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;http://www.greencone.com/product-view.asp?prid=28&quot; title=&quot;Green Cone: Green Johanna&quot;&gt;Green Johanna&lt;/a&gt; looks like it&amp;#8217;ll do the job perfectly, and actually &lt;a href=&quot;http://www.greencone.com/using.asp?prid=28&quot; title=&quot;How to compost with a Green Johanna&quot;&gt;benefits from a mix of waste&lt;/a&gt; so will take our cardboard too! Plus it comes with a little coat for winter. How sweet. It&amp;#8217;s on the expensive side, but &lt;a href=&quot;http://www.recyclenow.com/home_composting/&quot; title=&quot;Recycle Now&quot;&gt;Recycle Now&lt;/a&gt; shows that there&amp;#8217;s roughly a 25% discount in my area, plus a whole pound off for shopping online.&lt;/p&gt;

&lt;!--break--&gt;
</description>
 <comments>http://www.jenitennison.com/blog/node/22#comments</comments>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/23">environment</category>
 <pubDate>Tue, 29 May 2007 14:38:11 +0100</pubDate>
 <dc:creator>Jeni</dc:creator>
 <guid isPermaLink="false">22 at http://www.jenitennison.com/blog</guid>
</item>
</channel>
</rss>
