<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>2011/05/26 on Yano&#39;s digital garage</title>
    <link>https://www.bravotouring.com/~yano/archives/2011/05/26/</link>
    <description>Recent content in 2011/05/26 on Yano&#39;s digital garage</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 26 May 2011 20:05:56 +0900</lastBuildDate>
    <atom:link href="https://www.bravotouring.com/~yano/archives/2011/05/26/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>landscape-sysinfo</title>
      <link>https://www.bravotouring.com/~yano/diary/it/20110526ubuntu.htm</link>
      <pubDate>Thu, 26 May 2011 20:05:56 +0900</pubDate>
      <guid>https://www.bravotouring.com/~yano/diary/it/20110526ubuntu.htm</guid>
      <description>&lt;p&gt;最近、&lt;span class=&#34;Host&#34;&gt;GT110b&lt;/span&gt;にログインすると、ttyに&#xA;&lt;blockquote class=&#34;Log&#34;&gt;Linux GT110b 2.6.32-31-server #61-Ubuntu SMP Fri Apr 8 19:44:42 UTC 2011 x86_64 GNU/Linux&lt;br/&gt;Ubuntu 10.04.2 LTS&lt;br/&gt;&lt;br/&gt;Welcome to the Ubuntu Server!&lt;br/&gt; * Documentation:&#x9;http://www.ubuntu.com/server/doc&lt;br/&gt;&lt;br/&gt; &lt;span class=&#34;Warning&#34;&gt;System information disabled due to load higher than 2.0&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;10 packages can be updated.&lt;br/&gt;0 updates are security updates.&lt;/blockquote&gt;&#xA;というメッセージが出るようになった。&lt;/p&gt;&#xA;&lt;p&gt;調べてみたところ、これは&lt;span class=&#34;Software&#34;&gt;Ubuntu&lt;/span&gt; 10.04.2でアップデートされた&lt;span class=&#34;Path&#34;&gt;/etc/update-motd.d/50-landscape-sysinfo&lt;/span&gt;の仕業で、CPU負荷が高い時に&lt;span class=&#34;Software&#34;&gt;landscape-sysinfo&lt;/span&gt;を行わないように考慮したものらしい。&lt;/p&gt;&#xA;&lt;p&gt;…のだが、以前は問題無かっただけになんとなく気持ち悪い。ウチのように&lt;a href=&#34;http://setiathome.berkeley.edu/&#34;&gt;SETI@home&lt;/a&gt;を走らせてる状態だと常時閾値を超えちゃうだけの問題なので、以前のように&#xA;&lt;blockquote class=&#34;Log&#34;&gt;&#xA;#!/bin/sh&lt;br/&gt;&#xA;#cores=$(grep -c ^processor /proc/cpuinfo 2&gt;/dev/null)&lt;br/&gt;&#xA;#[ &#34;$cores&#34; -eq &#34;0&#34; ] &amp;&amp; cores=1&lt;br/&gt;&#xA;#threshold=&#34;${cores:-1}.0&#34;&lt;br/&gt;&#xA;#if [ $(echo &#34;`cut -f1 -d &#39; &#39; /proc/loadavg` &lt; $threshold&#34; | bc) -eq 1 ]; then&lt;br/&gt;&#xA;    echo&lt;br/&gt;&#xA;    echo -n &#34;  System information as of &#34;&lt;br/&gt;&#xA;    /bin/date&lt;br/&gt;&#xA;    echo&lt;br/&gt;&#xA;    /usr/bin/landscape-sysinfo&lt;br/&gt;&#xA;#else&lt;br/&gt;&#xA;#    echo&lt;br/&gt;&#xA;#    echo &#34; System information disabled due to load higher than $threshold&#34;&lt;br/&gt;&#xA;#fi&lt;/blockquote&gt;てな具合にloadavgのチェックを省略して&lt;span class=&#34;Software&#34;&gt;landscape-sysinfo&lt;/span&gt;が起動されるようにしといた。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
