<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>urandom (steve-parker.org)</title><link>http://steve-parker.org/urandom/</link><description>Random gibberings of a geek</description><language>en-GB</language><webonly>This is a feed of the blog at http://steve-parker.org/urandom/.</webonly>
<item>
  <title>Chilling stuff</title>
  <author>uRandom - Steve-Parker.org</author>
  <link>http://steve-parker.org/urandom/comment.php?art=1005#dispatches_watching_the_detectives</link>
  <comments>http://steve-parker.org/urandom/comment.php?art=1005</comments>
  <guid isPermaLink="true">http://steve-parker.org/urandom/comment.php?art=1005</guid>
  <pubDate>Mon, 14 May 2012 16:12:45 -0700</pubDate>
  <description>Channel 4 Dispatches have made a detailed &lt;a href="http://www.channel4.com/programmes/dispatches/4od#3346306"&gt;48-minute programme about accessing private details on UK citizens&lt;/a&gt;, including their interactions with Government agencies, Bank statements, Criminal records, Medical records, Phone bills, and so on.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
None of this should be any great surprise to anybody in the IT or security industries, but should be very alarming to members of the general public. For a few hundred pounds, firms sold these details, on three different individuals, to a journalist posing as an investigator.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
As the British Medical Association spokesman says, one potential risk is to the Doctor/Patient relationship. Our relationships with our banks, utility companies and other providers should also be driven by this knowledge.</description>
  </item>

<item>
  <title>glibc steering committe</title>
  <author>uRandom - Steve-Parker.org</author>
  <link>http://steve-parker.org/urandom/comment.php?art=1004#glibc</link>
  <comments>http://steve-parker.org/urandom/comment.php?art=1004</comments>
  <guid isPermaLink="true">http://steve-parker.org/urandom/comment.php?art=1004</guid>
  <pubDate>Tue, 24 Apr 2012 08:40:19 -0700</pubDate>
  <description>It's not often that an entire committee will unanimously declare itself redundant: &lt;a href="http://lwn.net/Articles/488779/"&gt;"the community of developers is now able to govern itself. Therefore, the Steering Committee has decided unanimously to dissolve."&lt;/a&gt;</description>
  </item>

<item>
  <title>whospaging</title>
  <author>uRandom - Steve-Parker.org</author>
  <link>http://steve-parker.org/urandom/comment.php?art=1003#whospaging</link>
  <comments>http://steve-parker.org/urandom/comment.php?art=1003</comments>
  <guid isPermaLink="true">http://steve-parker.org/urandom/comment.php?art=1003</guid>
  <pubDate>Tue, 24 Apr 2012 06:04:28 -0700</pubDate>
  <description>&lt;a href="http://www.solarisinternals.com/si/dtrace/whospaging.d"&gt;http://www.solarisinternals.com/si/dtrace/whospaging.d&lt;/a&gt; is a great DTrace script, showing what processes are consuming the CPU, and how long each process spends waiting to be swapped in.</description>
  </item>

<item>
  <title>Memory use in Solaris</title>
  <author>uRandom - Steve-Parker.org</author>
  <link>http://steve-parker.org/urandom/comment.php?art=1002#memoryuse</link>
  <comments>http://steve-parker.org/urandom/comment.php?art=1002</comments>
  <guid isPermaLink="true">http://steve-parker.org/urandom/comment.php?art=1002</guid>
  <pubDate>Wed, 18 Apr 2012 02:33:28 -0700</pubDate>
  <description>Given a machine running multiple applications that is running out of memory, it isn't necessarily obvious how to determine the worst culprit.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
I used this:&lt;br /&gt;&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;
$ ps -ea -o user,pid,ppid,rss,args | sort -n -k 4 &gt; ps.txt&lt;br /&gt;&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;
This gives a list of processes, like this, sorted by the RSS size (the amount of memory in use by that process):&lt;br /&gt;&lt;br /&gt;
&lt;pre&gt;oracle 15491   1 1322904 oracleSID (LOCAL=NO)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
To break this down by userid, I used this snippet. It could be more efficient, but it does the job:&lt;br /&gt;&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;
for u in `awk '{ print $1 }' rss | sort -u`&lt;br /&gt;&lt;br /&gt;
do&lt;br /&gt;&lt;br /&gt;
  echo -en "$u "&lt;br /&gt;&lt;br /&gt;
  echo 0 &gt; /tmp/sum&lt;br /&gt;&lt;br /&gt;
  awk '{ print $1,$4 }' rss | grep "^${u} " | awk '{ print $2 }' | while read x&lt;br /&gt;&lt;br /&gt;
  do&lt;br /&gt;&lt;br /&gt;
    sum=`cat /tmp/sum`&lt;br /&gt;&lt;br /&gt;
    sum=`expr $sum + $x`&lt;br /&gt;&lt;br /&gt;
    echo $sum &gt; /tmp/sum&lt;br /&gt;&lt;br /&gt;
  done&lt;br /&gt;&lt;br /&gt;
  cat /tmp/sum&lt;br /&gt;&lt;br /&gt;
done | sort -n -k2&lt;br /&gt;&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Which gives output like this, showing that "user6" in this case is the worst offender:&lt;br /&gt;&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;
root 72&lt;br /&gt;&lt;br /&gt;
user1 309&lt;br /&gt;&lt;br /&gt;
user2 4408&lt;br /&gt;&lt;br /&gt;
user3 48856&lt;br /&gt;&lt;br /&gt;
user4 11520&lt;br /&gt;&lt;br /&gt;
user5 163232&lt;br /&gt;&lt;br /&gt;
user6 55413072&lt;br /&gt;&lt;br /&gt;
&lt;/pre&gt;</description>
  </item>

<item>
  <title>Netmask Calculator</title>
  <author>uRandom - Steve-Parker.org</author>
  <link>http://steve-parker.org/urandom/comment.php?art=1001#NetmaskCalculator</link>
  <comments>http://steve-parker.org/urandom/comment.php?art=1001</comments>
  <guid isPermaLink="true">http://steve-parker.org/urandom/comment.php?art=1001</guid>
  <pubDate>Fri, 30 Mar 2012 15:43:58 -0700</pubDate>
  <description>With the new play.google.com domain, my &lt;a href="http://steve-parker.org/urandom/comment.php?art=980"&gt;Netmask Calculator&lt;/a&gt; has a new home on the more general web, at &lt;a href="&lt;br /&gt;&lt;br /&gt;
https://play.google.com/store/apps/details?id=com.sgpit.netmaskcalculator"&gt;https://play.google.com/store/apps/details?id=com.sgpit.netmaskcalculator&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
It's free, uses no special features (it can't touch your contacts, SMS, internet, etc - why would it need to?) and just does what it says on the tin. It calculates netmasks</description>
  </item>

<item>
  <title>Efficiency</title>
  <author>uRandom - Steve-Parker.org</author>
  <link>http://steve-parker.org/urandom/comment.php?art=1000#efficiency</link>
  <comments>http://steve-parker.org/urandom/comment.php?art=1000</comments>
  <guid isPermaLink="true">http://steve-parker.org/urandom/comment.php?art=1000</guid>
  <pubDate>Fri, 30 Mar 2012 14:46:28 -0700</pubDate>
  <description>The BBC have posted an article entitled &lt;a href="http://www.bbc.co.uk/news/magazine-17434638?utm_source=dlvr.it&amp;utm_medium=twitter"&gt;Go figure: Does efficiency always save money?&lt;/a&gt;. The article makes few direct claims, but it does say that we are spending 63% more on IT now than in 1997. We are getting much more than 63% more use out of our IT than we did 15 years ago, too, so the fact that we spend more is not really the relevant factor.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
I have taken figures from the graph on the BBC website; I might not have it quite right, but they suggest that we spent around £3,800 million in 1997, and £6,200 million in 2010. (I've gone out to 2011 for convenience, as Moore's law works in 24-month chunks). That is a higher spend, but we're spending more on it because we're getting more out of it.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
If you had a £1 lottery ticket guaranteed to pay out £1.05 for every £1 you put in, from an initial budget of £1.00, after 20 weeks you'd be able to spend £2 and buy two tickets. Of course you would - you'd be making a 10% profit each week instead of a 5% profit. 10 weeks later, you'd be able to buy 3 tickets a week, for a 15% profit.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Moore's Law is even better than that. The BBC article claims that Moore's Law claims "Every two years you can buy twice the processing power for half the price." Actually, it's that you can buy twice the power for the same price. But it's still pretty good.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;img class="pad" src="http://steve-parker.org/urandom/2012/mar/bangbuck.png" width="616" height="318" alt="Bang per Buck"&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
If we liked our £2,000 PC in 1997, with Windows 3.1 and MS Office 4.3, we really like our laptop, netbook, phone and maybe even a tablet now; the least powerful of these cost a fraction of that 1997 PC, and is far more powerful, and makes us far more efficient.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
That is why we are spending more on technology - the more of it we have (up to a certain limit, I'm sure), the more effective we are.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
From the figures above, even if our spending stayed at 1997 levels, we'd have IT power 12 times more than we had then. By spending more on increasingly efficient technology, we've actually got 77 times more power than we did 15 years ago.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
So - just because we're spending more on something does not mean that it is less efficient than it appears. Rather the opposite - the more useful something is, the more likely we are to keep on using more of it.</description>
  </item>

<item>
  <title>Typing Tutor</title>
  <author>uRandom - Steve-Parker.org</author>
  <link>http://steve-parker.org/urandom/comment.php?art=999#typing</link>
  <comments>http://steve-parker.org/urandom/comment.php?art=999</comments>
  <guid isPermaLink="true">http://steve-parker.org/urandom/comment.php?art=999</guid>
  <pubDate>Thu, 22 Mar 2012 17:54:19 -0700</pubDate>
  <description>People often comment on the speed (if not accuracy!) of my typing. &lt;a href="http://keybr.com/"&gt;http://keybr.com/&lt;/a&gt; is a typing tutor of sorts which has a reasonably easy interface, and shows your effective WPM.</description>
  </item>

<item>
  <title>Traffic Flow</title>
  <author>uRandom - Steve-Parker.org</author>
  <link>http://steve-parker.org/urandom/comment.php?art=998#trafficflow</link>
  <comments>http://steve-parker.org/urandom/comment.php?art=998</comments>
  <guid isPermaLink="true">http://steve-parker.org/urandom/comment.php?art=998</guid>
  <pubDate>Tue, 20 Mar 2012 17:36:10 -0700</pubDate>
  <description>The Technical University of Dresden has a Java applet modelling various types of traffic flow at &lt;a href="http://vwisb7.vkw.tu-dresden.de/~treiber/MicroApplet/"&gt;http://vwisb7.vkw.tu-dresden.de/~treiber/MicroApplet/&lt;/a&gt;. Fascinating to someone who spends 20+ hours a week on motorways; boring to someone who drives 2 hours a week on minor roads. As someone who spends 8-10 hours a week on motorways, I find this an interesting and educational toy.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
It's interesting to play with the different scenarios; for example, &lt;a href="http://vwisb7.vkw.tu-dresden.de/~treiber/MicroApplet/OnRamp.html"&gt;http://vwisb7.vkw.tu-dresden.de/~treiber/MicroApplet/OnRamp.html&lt;/a&gt; tells us that "At 1600 veh./h, no breakdown occurs, but an existing jam will not dissolve" - so once there is a jam, you need to reduce the number of vehicles entering the affected system. I'm not aware of any measures (other than Radio and SatNav telling drivers to avoid the area) trying to control this.</description>
  </item>

<item>
  <title>w3c-libwww and its badly-created libtool</title>
  <author>uRandom - Steve-Parker.org</author>
  <link>http://steve-parker.org/urandom/comment.php?art=997#w3c-libwww</link>
  <comments>http://steve-parker.org/urandom/comment.php?art=997</comments>
  <guid isPermaLink="true">http://steve-parker.org/urandom/comment.php?art=997</guid>
  <pubDate>Fri, 16 Mar 2012 03:14:50 -0700</pubDate>
  <description>Like &lt;a href="http://www.i-am.ws/entry/shell_hell"&gt;Willem van Schaik&lt;/a&gt; did back in 2006, I too have just been fighting with &lt;a href="http://www.w3.org/Library/"&gt;w3c-libwww&lt;/a&gt;. It has a configure script which creates (amongst other things) a libtool shell script.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
This is a particularly badly structured shell script; it has statements like this:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;pre class="code"&gt;if test $pic_mode = no &amp;&amp; test "$deplibs_check_method" != pass_all&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Which is fine, if the &lt;code&gt;pic_mode&lt;/code&gt; variable gets set. However (on my Solaris 10 SPARC system at least) it does not get set, so the script falls over with cryptic statements like&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;pre&gt;../../../libtool: test: argument expected&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
The code above expands to &lt;code&gt;if test  = no &amp;&amp; ....&lt;/code&gt; which is invalid syntax. If there's a possibility that a variable could expand to the empty string (or be unset), quotes around the variable name are required (as &lt;code&gt;libtool&lt;/code&gt; did for the &lt;code&gt;deplibs_check_method&lt;/code&gt; variable in the same line!)&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
In my particular case, defining the following variables in my shell allowed the compilation to complete:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;pre class=code&gt;pic_mpde=yes&lt;br /&gt;&lt;br /&gt;
build_libtool_need_lc=yes&lt;br /&gt;&lt;br /&gt;
hardcode_into_libs=no&lt;br /&gt;&lt;br /&gt;
PATH=$PATH:/usr/sfw/bin:/usr/ccs/bin&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;
Your PATH requirements may vary; I had to add /usr/ccs/bin because &lt;code&gt;configure&lt;/code&gt; never checked that I had a valid &lt;code&gt;ar&lt;/code&gt; in the PATH.</description>
  </item>

</channel></rss>

