muninで作ったrrdデータを個別にグラフ化


muninというリソースモニタリングプログラムシステム。
このシステムは、取得したデータをRRDtoolを利用して保存し、グラフ化しています。

これで取得したデータを、個別でグラフ化したいと思って、探したところ、以下の様な感じになりました。

# /usr/bin/rrdtool graph /home/osakanataro/web/nise/load.png --imgformat=PNG --start=-86400 --end=-300 --base=1000 --height=100 --width=200 --upper-limit=5 --title="負荷状況" DEF:load="/var/lib/munin/localhost/localhost-load-load-g.rrd":42:AVERAGE CDEF:ok=load,2.0,GT,UNKN,load,IF CDEF:ng=load,2.0,GT,load,UNKN,IF HRULE:2.0#0000FF AREA:ok#00CF00 AREA:ng#FF0000

これで作成したグラフは↓です。

ロードアベレージの推移を見たい、という感じのグラフです。
これを作った当初はload averageが5ぐらいに行くことがあったので、5を最大(–upper-limit=5)としています。

jQuery Mobileを使ってタブレット向けっぽいレイアウト その2


1つ前の記事では、横幅を狭めた時の動作があまりよろしくないので改善方法を調べた。

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0rc1/jquery.mobile-1.0rc1.min.css" />
<link rel="stylesheet" href="http://jquerymobile.com/demos/1.0rc1/docs/_assets/css/jqm-docs.css" />
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="custom-scripting.js"></script>
<script src="http://code.jquery.com/mobile/1.0rc1/jquery.mobile-1.0rc1.min.js"></script>
<meta name="viewport" content="width=device-width; target-densitydpi=device-dpi" />
<title>テストページ</title>
</head>

<body>
<div data-role="page" id="jqm-home" class="type-home"> 
 <div data-role="content"> 
  <div class="content-secondary"> 
   <div class="ui-collapsible-content ui-collapsible-content-collapsed">

<p>横に長い時に、左側に表示されるサイドバーです。</p>
<p>class="ui-collapsible-content ui-collapsible-content-collapsed"でくくってある部分が表示されます。</p>
<p>横が短くなると消えます。</p>

   </div> <!-- end of ui-collapsible-content -->
   <div class="ui-collapsible-heading">

<p>サイドバーが表示されない時のメニューです。</p>
<p>class="ui-collapsible-heading"でくくってある部分が表示されます。</p>

   </div> <!-- end of ui-collapsible-heading -->
  </div><!-- end content-secondary -->    
  <div class="content-primary"> 

<p>メインコンテンツです。</p>

<p>ここにいろいろな内容をおいていきます。</p>


   </div><!-- end of content-primary -->
 </div><!-- end of content -->
</div><!-- end page -->
</body>
</html>

実行サンプル

ポイント
1. 以下のcssが必要
 http://jquerymobile.com/demos/1.0rc1/docs/_assets/css/jqm-docs.css

2. data-role=”content”の中で「class=”content-primary”」と「class=”content-secondary”」に分ける。

3. secondaryが左側のサイドバーになり、primaryがメインコンテンツとなる。

4. primary,secondaryはどっちが先でもおそらく大丈夫。

5. secondaryの中をさらに「class=”ui-collapsible-content ui-collapsible-content-collapsed”」と「class=”ui-collapsible-heading”」で分ける

とりあえず、これでレイアウト的には丁度いいものに、なった。

jQuery Mobileを使ってタブレット向けっぽいレイアウト


jQuery Mobileが1.0rc1になったというので、ドキュメントを読んでみた。

なんかタブレットっぽい感じの開き方になっている。
これを実現しようと思って調べてみた。

よく分からないなりに調べていくと、↓のURLを発見。
stackoverflow:Creating a sidebar in jQuery mobile

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0rc1/jquery.mobile-1.0rc1.min.css" />
<link rel="stylesheet" href="http://jquerymobile.com/demos/1.0rc1/docs/_assets/css/jqm-docs.css" />
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="custom-scripting.js"></script>
<script src="http://code.jquery.com/mobile/1.0rc1/jquery.mobile-1.0rc1.min.js"></script>
<meta name="viewport" content="width=device-width; target-densitydpi=device-dpi" />
<title>テストページ</title>
</head>
<body>
<div data-role="page" id="jqm-home" class="type-home">
    <div data-role="content">
        <div class="content-secondary">
            This would be the sidebar/split view on a tablet,
            would show up stacked on a mobile device
        </div><!-- end content-secondary -->

        <div class="content-primary">
            This is the main content.

            If Tablet device this would be to the right of the above content,
            if mobile this would be below the above content.

        </div><!-- end content-primary -->
    </div><!-- end content -->
</div><!-- end page -->

</body>
</html>

まだ実験途中ですが、ポイントっぽいもの
1. 以下のcssが必要
 http://jquerymobile.com/demos/1.0rc1/docs/_assets/css/jqm-docs.css

2. data-role=”content”の中で「class=”content-primary”」と「class=”content-secondary”」に分ける。

3. secondaryが左側のサイドバーになり、primaryがメインコンテンツとなる。

4. primary,secondaryはどっちが先でもおそらく大丈夫。

ぼちぼちと改造していきますよ

デジタルフォトフレーム


ドコモから発売されているフォトパネル03、ソフトバンクモバイルから発売されているPhotoVision Softbank 008HW
どちらも9インチのフォトフレーム端末である。


↑ドコモ フォトパネル03


↑ソフトバンクPhotoVision 008HW

見かけ上の主な違いは、操作ボタンの位置がどちらにあるか、という感じである。

さて、OEMメーカであるHuaweiなら、元モデルがあるはずだろう、と探してみると9インチモデルとしてHUAWEI MMC297uというのがある。
しかし、日本語QuickStartマニュアルをダウンロードしてみると、ドコモフォトパネル02の説明が・・・

ドコモフォトパネル20、ソフトバンクモバイル SoftBank PhotoVision HW002、Huawei MMC297uは、それぞれ、正面パネルの配置も同一なので、おそらく中身も同じなんでしょう。

MMC297uで検索しても、これといった改造情報が出てこないあたり、海外ではあまり需要がない製品なんだろうか?という感じです。

FleaLine Lightアフィリエイト プログラム


FleaLine Lightのアフィリエイト プログラムに参加しているわけですが、実は、報酬条件をちゃんと見ていなかったりしていました。

ふと気がついて、そういえば、どうなってるかな?と請求金額を確認。(・・・請求金額もちゃんと見ていませんでした^^;;;)

おー、アフィリエイト分の金額が月々の請求から割り引かれてる!
で、翌月も引かれてる! その翌月も・・・

・・・ようやく気がつきました。
てっきり、報酬は1契約につき1回限りかと思っていたのですが、契約が継続する限り、毎月一定額が引かれ続ける、というものだったんですね^^;;;;

FleaLine Light

FleaLine Lightへようこそ

こんな仕組みに気がつかなかったとは、我ながらうかつ過ぎでした。