トップ 最新 追記

ヨタの日々

2001|08|09|10|11|12|
2002|01|02|03|04|05|06|07|08|09|10|11|12|
2003|01|02|03|04|05|06|07|08|09|10|11|12|
2004|01|02|03|04|05|06|07|08|09|10|11|12|
2005|01|02|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|02|03|04|05|06|07|08|09|10|11|12|
2009|01|02|03|04|05|06|07|08|09|10|11|12|
2010|01|02|03|04|05|06|07|08|09|10|11|12|
2011|01|02|03|04|05|06|07|08|09|10|11|12|
2012|01|02|03|04|05|06|07|08|09|10|11|12|
2013|01|02|03|04|05|06|07|08|09|10|11|12|
2014|01|02|03|04|05|06|07|08|09|10|11|12|
2015|01|02|03|04|05|06|07|08|09|10|11|12|
2016|01|02|03|04|05|06|07|08|09|10|11|12|
2017|01|02|03|04|05|06|07|08|09|10|11|12|
2018|01|02|03|04|05|06|07|08|09|10|11|12|
2019|01|02|03|04|05|06|07|08|09|10|11|12|
2020|01|02|03|04|05|06|07|08|09|10|11|12|
2021|01|02|03|04|05|06|07|08|09|10|11|12|
2022|01|02|03|04|05|06|07|08|09|10|11|12|
2023|01|02|03|04|05|06|07|08|12|
2024|01|02|03|

2011-12-01 :-(

_ 午前

0450 起床

0830 出勤

0900 テスト

_ 午後

1300 テスト

_

1700 残業アワー

2130 退勤

2230 飯


2011-12-02 :-(

_ 午前

0450 起床

0830 出勤

0900 テスト

_ 午後

1300 テスト

1700 退勤

_

1930 飯

_ ぼうねんかい!

モンゴル料理レストラン ウランバートル

いつものメンツで

miwarin, daresore, yo_1, studio5

見積もりと計画とウォーターフォールとスクラムと

店に入るとテーブルに別のテーブルのひとが座り込んでいたり別のテーブルから別のテーブルへ移動するひとが居るなどしていて客同士が知り合いらしい。ていうかタバコ煙すぎワロタ....わろた

ひたすら羊肉を食べていた。ような

C360_2011-12-02-20-20-36.Share.jpg

rps20111202_200052.jpg

rps20111202_200220.jpg

rps20111202_200521.jpg

rps20111202_203640.jpg

rps20111202_210414.jpg

rps20111202_210452.jpg

本日のツッコミ(全2件) [ツッコミを入れる]

_ かず母ちゃん [もう忘年会シーズンだね^^ モンゴル料理って食べた事ないけど、見たカンジ中華に似てるのかな?]

_ みわ [まだ忘年会は続きます ( ̄口 ̄) 中華ぽいす。羊の肉が多かったような気がする]


2011-12-03 :-)

_ 午前

寝る

_ 午後

1200 起床 || 部屋掃除

1400 図書館 || 買い物

1500 庭仕事

_

2000 飯

_ 借り物

図書館

4062577224

4431100113

4828415874世界のしくみがよくわかる!ニュースを読む技術 池上彰

4759310134

4478761043

4582854648

4569621988

本日のツッコミ(全2件) [ツッコミを入れる]

_ かず母ちゃん [私も読書は好きだけど、この本を読んだら5分後には寝てしまうかも^^;(本を書いた方にはごめんなさい)みわさん、難しそ..]

_ みわ [10分で寝ます (ノω`) でもけっこう読みやすいですゆ]


2011-12-04 :-)

_ 午前

0930 起床

_ 午後

1400 KOZOS

1500 散歩

_

1700 kozos

2200 飯。豚丼 豚バラじゃなくてロース。豚バラは脂が多いので年寄りはもう食えないです ('A`)

2330 KOZOS

携帯百景(ケイタイヒャッケイ)

_ 買い物

amazon

B005DJEBI0

_ サンレス水郷

FF13 のサントラ買っておいてあまりマジメに聞いてなかったんだが(ゲームも買ったけど放置しておるんじゃ) Highland Cliffs での BGMは FF13 「サンレス水郷」だったのか。

B002U4RQ9W

_ 緑のカーテン

我が家(といっても借家だが)の庭には半年前にゴーヤとミニトマトのプランターを設置した[ 20110625#p04 ]

IMG_7717

ゴーヤの成長が著しいので夏に網を追加した [ 20110806#p04 ]

IMG_7938

夏に何度かゴーヤを収穫したあとはゴーヤは撤去し、いまプランターはミニトマトだけになっている。のだが、そのミニトマトの成長がこれまた著しい。ゴーヤの影に隠れていた所為なのか、ゴーヤを撤去したらすごい勢いで成長しているっていうかいまだい成長しているんだけどいつになったら止まるのか。

そのようなわけでいまはミニトマトによる緑のカーテンが出来上がっている。

IMG_9196

オリジナルサイズの画像 にたくさん緑の丸い物体が出来てるのが見えるかしら。3 箇所ある支柱が傾いているのが分かるかしら。支柱がミニトマトに耐えられなくなる日は近いっていうかマジヤバいんですけど

_ [KOZOS]KOZOS 8章

static void thread_intrでmakeエラー - KOZOS友の会 - Google グループ

undefined reference to `___mulsi3' - KOZOS友の会 - Google グループ

ケッキョキ

kozos.c をこういうふうにすると 8th ステップをクリアできるという。

--- C:/Users/rin/Desktop/osbook_03/osbook_03/08/os/kozos.c	Sat Mar 20 15:02:17 2010
+++ C:/home/rin/work/OS/KOZOS/osbook_03/08/os/kozos.c	Sun Dec 04 23:37:28 2011
@@ -31,6 +31,9 @@
   } syscall;

   kz_context context; /* コンテキスト情報 */
+
+  char dummy[16];
+
 } kz_thread;

 /* スレッドのレディー・キュー */
@@ -173,10 +176,11 @@
   return 0;
 }

+static void thread_intr(softvec_type_t type, unsigned long sp);
+
 /* 割込みハンドラの登録 */
 static int setintr(softvec_type_t type, kz_handler_t handler)
 {
-  static void thread_intr(softvec_type_t type, unsigned long sp);

   /*
    * 割込みを受け付けるために,ソフトウエア・割込みベクタに

4877832394

本日のツッコミ(全2件) [ツッコミを入れる]

_ かず母ちゃん [チクってしまうけど。。。 エモさんが、この豚丼を作ったら、とっても美味しいって言ってたよ~~~(^^)]

_ みわ [くくく。豚丼作るの楽なのでバシバシ作れます (・∀・)]


2011-12-05 :-(

_ 午前

0520 起床

0830 出勤

0900 テスト

_ 午後

1300 テスト

_

1700 残業アワー

1815 退勤

2200 飯。めかじきの竜田揚げ ていうかたんに油で炒めた。

_ 出勤時間を遅くした

30 分遅くしただけ

睡魔に勝てるかどうかの境は 5 時前後にあるようだ。


2011-12-06 :-(

_ 午前

0520 起床

0830 出勤

0900 テスト

_ 午後

1300 テスト

_

1700 残業アワー

1800 退勤

_ 買い物

amazon

4840142637

4758042675

4048688294

4048702653

4048706853

_ [wiki][fswiki]FreeStyleWiki (fswiki) を設置してみた

FrontPage - FreeStyleWiki

hiki の hikifarm の管理が混乱してきたので古き良き fswiki で wikifarm を使ってみるというか気分転換

書庫をダウンロードして展開

% unzip wiki3_6_4.zip
% unzip fswiki-patch-20110813.zip
% unzip fswiki-pache-20110823.zip
% cd wiki3_6_4
% cp ../fswiki-patch-20110813/lib/Util.pm wiki3_6_4/lib/
% cp ../fswiki-pache-20110823/lib/Wiki/InterWiki.pm wiki3_6_4/lib/Wiki/
% mv wiki3_6_4 ~/public_html/fswiki
% cd ~/public_html/fswiki
% ./setup.sh
# fswiki setup (for 3.5.8)...
prepare...
  FSWIKI_HOME=.
  check ./wiki.cgi...
    ok
do...
  check ./backup...
  check ./attach...
  check ./pdf...
  check ./log...
  check ./data...
  check ./config...
  check ./.htaccess...
    create.
done

wiki.cgi の shebang を変更しとく

#!/usr/pkg/bin/perl

http://localhost/~homuhomu/fswiki/wiki.cgi にアクセスしてみればよいと思う。


2011-12-07 :-(

_ 午前

0520 起床

0830 出勤

0900 テスト

_ 午後

1300 テスト

1700 退勤

_

1930 したく

2100 飯


2011-12-08 :-(

_ 午前

0520 起床

0830 出勤

0900 テスト

_ 午後

1300 テスト

_

1700 残業アワー

2130 退勤

2230 飯


2011-12-09 :-(

_ 午前

0520 起床

0830 出勤

0900 テスト

_ 午後

1300 テスト

1700 退勤

_

1900 支度

_ 信濃毎日新聞を取り寄せた

ぼんぼり祭りのときののと鉄道運転体験 [ 20111008#p03 ]が記事になっていたらしい。これ→徒然日記 信濃毎日新聞(長野県)はこの土日で花咲くいろは(石川県)をプッシュしていたでござる

信濃毎日新聞は 株式会社信毎フォトサービス の「記事コピーサービス」を使えばよさそうなので電話してみたら在庫があるということで在庫を取り寄せた。

携帯百景(ケイタイヒャッケイ)

_ よかった探しリース

左手 右手

コンチさんのよい動画です


2011-12-10 :-)

_ [台湾]台湾紀行 1 日目

友人連中と一緒に台湾へ行ってきた。

台湾紀行 2011-12-10 - a set on Flickr

_ [台湾]午前

0500 起床

0730 東京シティ・エアターミナル

1120 成田発

IMG_9223

IMG_9230

_ [台湾]午後

1435 台北(桃園)着

1530 免税店

ファミリーマート

IMG_9234

_ [台湾]夜

1700 国王大飯店 エンペラーホテル

1800 専用車チャーター

TPE-FREE を契約するなど

IMG_9240

1930 九份 観光。「千と千尋の神隠し」の舞台らしいんだが肝心の「千と千尋の神隠し」を見たことがない。1 年のうち 250 日は雨が降ってるんだそうな。着いたのが遅いのもあってとくに何もせずに帰る。

IMG_9249

2200 陳碧花というお茶屋。専用車の運転手の馴染みのお茶屋らしい。お茶と日本の雑談をしながらひたすらお茶を飲むなど。

IMG_9281

2300 寧夏夜市 で飯を食べるなど。日本でいう模擬店のようなものか。

IMG_0001

めし うま

IMG_0004

2430 ホテル

本日のツッコミ(全2件) [ツッコミを入れる]

_ かず母ちゃん [台湾に旅行に行った人って初めて聞いたような気がする。。。 なぜ台湾に?!台湾ってもうちょっと田舎っぽいイメージがあっ..]

_ みわ [友人の話題に釣られて台湾へ行ってきましたなのよ。近代的なところもけっこうあったけど、下町ぽいところもけっこう多かった..]


2011-12-11 :-)

_ [台湾]台湾紀行 2 日目

前日 夜中まで遊んでいたので疲れがとれない。

台湾紀行 2011-12-11 - a set on Flickr

_ [台湾]午前

0630 起床

0700 朝飯

IMG_9282

0900 故宮博物院 半日観光。写真撮影禁止なので写真なし。象牙から創り出した 超ミクロな作品など。日本はよく手先が器用だとか言われるが、世界を見れば世界中に居るのだよな。人多すぎワロタ

_ [台湾]午後

1200 おひる。なんとかいう飯屋でヤムチャなど。残念ながら私は挽き肉を食えないのだゆ。

1330 光華市場。電脳街。上のほうに行くにつれてマニアックな品揃えになっていた。

1430 アニメイト

IMG_9286

1450 メイド喫茶 ツクヨミ ここか? 月讀 - yam天空部落 メイド喫茶のツクヨミ - 網誌 - yam天空部落

MP回復ナントカいう飲み物を注文したらブルーハワイだった。

IMG_9291

1600 HOOTERS TAIPEI

ガッツリ飯を食べました。

携帯百景(ケイタイヒャッケイ)

1630 國父紀念館 衛兵交代を眺めるなど

IMG_9299

_ [台湾]夜

1800 台北101

魔王ザンデ が棲んでますんで

IMG_9298

曇っているように見えるけど実際 雲です。

IMG_9313

世界最速のエレベーター 東芝さんパネエです

IMG_9320

2100 士林夜市

溝の口の西口商店街に似てるんだよね

IMG_0019

溝の口の西口というのはココネ ( 天体戦士サンレッドの舞台を探訪してきた[ 20090208#p08 ] )

09.jpg

2200 ホテル


2011-12-12 :-)

_ [台湾]台湾紀行 3 日目

帰国

台湾紀行 2011-12-12 - a set on Flickr

_ [台湾]午前

0630 起床

0700 朝飯

IMG_9321

_ [台湾]午後

0940 ホテル発

_ [台湾]午後

1320 台北(桃園)発

富士山が見えた。

IMG_9326

_ [台湾]夜

1720 成田着

1800 リムジンバス

2000 帰宅


2011-12-13 :-(

_ 午前

0520 起床

0830 出勤

0900 打ち合わせ

_ 午後

1300 打ち合わせ

1700 退勤

_

1900 wiki移転

2130 飯

_ 買い物

B005OCSUR4


2011-12-14 :-(

_ 午前

0520 起床

0830 出勤

0900 打ち合わせ

_ 午後

1300 打ち合わせ

1700 退勤

_

1900 fswiki 移行

2030 飯

2100 アニメ消化

2230 fswiki 移行

_ [FreeStyleWiki][hikifarm]hikifarm が混乱したので FreeStyleWiki (fswiki) に移行した

hikifarm で閲覧者制限させるために .htaccess を設置などしていたり閲覧制限が不要ならばそうでないことをおこなうなどしていたらわけわかんくなってたので移行してみた。format プラグインを使えば hiki フォーマットで書けるんだけど hikifarm のデータから FreeStyleWiki のデータへ何か考えてコンバートなどすればいいんだが出来るのかこれっていうか無ければ書けばいいじゃないかと思うんだがアニメ見ながら 手でコピペした 。もうダメかもしんない

まあいまどきならコラボは「それ Google Docs で出来るよ」なんだが

ウィキっペ


2011-12-15 :-(

_ 午前

0520 起床

0830 出勤

0900 テスト準備

_ 午後

1300 テスト準備

1700 退勤

_

1900 KOZOS

2200 飯。鮭の竜田揚げというか めかじきの竜田揚げ をメカジキじゃなくて鮭でやっただけ


2011-12-16 :-(

_ 午前

0520 起床

0830 出勤

0900 テスト準備

_ 午後

1300 テスト準備

1700 退勤

_

1730 忘年会@仕事場食堂 弊社のひとが誰もいないけど、ぼっちとか慣れてますんで

2000 2次回@NIJYU-MARU 川崎リバーク店 「にじゅうまる」だそうな。円卓席だった


2011-12-17 :-)

_ 午前

0830 起床

1000 キヤノン サポートセンター新宿

1130 おひる。うどん

_ 午後

1200 買い物

1400 アニメ消化

_

2000 飯

2100 RR7

_ [ARC][リッジレーサー7]リッジレーサー7 ARC 2011 師走GP

ペアバトル

すたきちさんキタア

  1. STARGOLD 190
  2. かず 171
  3. ANSΩmiwarin 169
  4. emotion 153
  5. ファブリーズ 153
  6. REDOGRE 142
  7. SOLARE 138
  8. megu.Girls 133
  9. majestajovial 116
  10. came_yaroh 96
  11. ANSΩkeyaki 83
  12. ガンマ 50

_ 買い物

amazon

B005MNO7BI

_ 借り物

図書館

4822283119

4890852425

本日のツッコミ(全2件) [ツッコミを入れる]

_ かず母ちゃん [お!!かず(とみわさんも)表彰台?!って言っても、次々と回線エラーで落ちちゃうもんね(*_*; みんなが全レースに参..]

_ みわ [けやきんが途中で参加できなくなってしまったのよね (´・ω・`) 回線マジこわい]


2011-12-18 :-)

_ 午前

0930 起床

1030 おひる。ジェノベーゼらしきもの

_ 午後

1400 KOZOS

_

2130 飯。たらのフライというか 白身魚のコーンフレークス揚げ のようなことをやろうとしたら結局普通にフライになった。

_ ルタオのクリスマスソシエール

ウェブ に見当たらない。

ろうそくが付いていたのでせっかくだから火をつけてみた。

IMG_9331

_ ,

細江慎治さんの(ブログの)言葉使いがどうも馴染みあるなあと思ってたら ohguchi と同じような言葉使いなのだった

_ [KOZOS]KOZOS 9章

いつものアライメント

--- C:/home/rin/work/OS/KOZOS/osbook_03/09/os/kozos.c	Sat Mar 20 15:02:12 2010
+++ C:/home/rin/work/OS/KOZOS/osbook/src/09/os/kozos.c	Sun Dec 18 17:11:34 2011
@@ -35,6 +35,9 @@
   } syscall;

   kz_context context; /* コンテキスト情報 */
+
+  char dummy[8];
+
 } kz_thread;

 /* スレッドのレディー・キュー */
@@ -233,10 +236,11 @@
   return old;
 }

+static void thread_intr(softvec_type_t type, unsigned long sp);
+
 /* 割込みハンドラの登録 */
 static int setintr(softvec_type_t type, kz_handler_t handler)
 {
-  static void thread_intr(softvec_type_t type, unsigned long sp);

   /*
    * 割込みを受け付けるために,ソフトウエア・割込みベクタに

手で数えるのが面倒なので kozos.c 冒頭の構造体定義をコピペして sizeof することにした。printf は kozos の lib.h にも宣言されてるのでちゃんと stdio.h のほうを使う。

#include <stdio.h>

#include "defines.h"
#include "kozos.h"
#include "intr.h"
#include "interrupt.h"
#include "syscall.h"
//#include "lib.h"

#define THREAD_NUM 6
#define PRIORITY_NUM 16
#define THREAD_NAME_SIZE 15

/* スレッド・コンテキスト */
typedef struct _kz_context {
  uint32 sp; /* スタック・ポインタ */
} kz_context;

/* タスク・コントロール・ブロック(TCB) */
typedef struct _kz_thread {
  struct _kz_thread *next;
  char name[THREAD_NAME_SIZE + 1]; /* スレッド名 */
  int priority;   /* 優先度 */
  char *stack;    /* スタック */
  uint32 flags;   /* 各種フラグ */
#define KZ_THREAD_FLAG_READY (1 << 0)

  struct { /* スレッドのスタート・アップ(thread_init())に渡すパラメータ */
    kz_func_t func; /* スレッドのメイン関数 */
    int argc;       /* スレッドのメイン関数に渡す argc */
    char **argv;    /* スレッドのメイン関数に渡す argv */
  } init;

  struct { /* システム・コール用バッファ */
    kz_syscall_type_t type;
    kz_syscall_param_t *param;
  } syscall;

  kz_context context; /* コンテキスト情報 */

  char dummy[8];

} kz_thread;


int main(int argc, char** argv)
{
  printf( "kz_thread: %d byte\n", sizeof(kz_thread));
  return 0;
}

そんだけ

% gcc -I./09/os kz_thread.c
% ./a.exe
kz_thread: 64 byte

2011-12-19 :-(

_ 午前

0520 起床

0830 出勤

0900 テスト準備

_ 午後

1300 テスト準備

1700 退勤

_

2130 飯。厚切り豚バラの照り焼き まあロース肉ですが

_ 一眼レフ レンズ

父所有

私所有

ふうむ


2011-12-20 :-(

_ 午前

0520 起床

0830 出勤

0900 テスト準備

_ 午後

1300 テスト準備

1700 退勤

_

1800 忘年会

_ 客先忘年会(2)

炭焼 ばり鶏

鶏はウマイんだが

腹減った

C360_2011-12-20-18-08-27.Share.jpg

C360_2011-12-20-18-28-54.Share.jpg

C360_2011-12-20-18-37-18.Share.jpg

C360_2011-12-20-19-29-33.Share.jpg

C360_2011-12-20-19-30-24.Share.jpg

C360_2011-12-20-19-32-59.Share.jpg

C360_2011-12-20-20-22-44.Share.jpg

C360_2011-12-20-20-35-12.Share.jpg


2011-12-21 :-(

_ 午前

0520 起床

0830 出勤

0900 テスト準備

_ 午後

1300 テスト準備

1700 外出

_

1800 自社 || 打ち合わせ

1900 退勤

2000 ruby

2130 飯

_ [fswiki][FreeStyleWiki][hikifarm]fswiki の項目の日付がアレだったので hikifarm に整合させた

新規作成してコピペなどして [ 20111214#p04 ] 日付が 2011-12-14 になってしまったので hikifarm に日付を整合させることにした。

hikifarm で表示される各項目の日付は、hikifarm/foobar の下の各項目ファイルの mtime を取得しているぽい。

fswiki で表示される日付も、各項目のファイルの mtime を使っているぽい。

上部メニューの「一覧」は lib/File/Listing.pm か。これは fswiki/data/foobar 下の各項目ファイルの mtime を基にしているらしい。

use File::Listing;
for (parse_dir(`ls -l`)) {
    ($name, $type, $size, $mtime, $mode) = @$_;
    next if $type ne 'f'; # plain file
    #...
}

Menu で recentdays プラグイン plugin/recent/RecentDays.pm を使ってるんだが、これは fswiki/config/foobar/modtime.dat のファイルに各項目ファイル名とシステム起算時間が書かれていて、そこから項目の日付を取得している。たとえばこう。ファイルのエンコードは EUC-JP

"currentを追跡する"="1290914431"
"crunch binary"="1216980765"
"PF"="1288531936"
"和訳されてない文書"="1257858585"
"VMware"="1213184522"
"misc"="1215782506"
"md"="1216555421"
"Xen"="1291635998"
"InterWikiName"="1213183731"
"pkgsrc"="1304407352"
"X"="1213184253"
"NetBSD/hpcsh"="1213184804"
"SideMenu"="1213183731"
"LANDISK"="1236673032"
"FrontPage"="1295002136"
"Diskless"="1213184236"
"電源管理"="1213184146"

というわけで以下のようにする。

  • hikifarm/foobar を元にする
  • fswiki/data/foobar の項目ファイルの mtime を設定
  • fswiki/config/foobar/modtime.dat に各項目ファイル名とシステム起算時間を記述

各項目ファイルの名前は URL エンコードされているので適当にデコードする。

テキトーにこんな。エラー処理とかしてないんで

#!/usr/pkg/bin/ruby -Ku

require 'pp'
require 'nkf'
require 'cgi'

def collect(dirpath)
  files = {}
  Dir.chdir(dirpath) {|path|
    Dir.glob("*") {|file|
      files[file] = File.stat(file)
    }
  }

  return files

end

def update(dirpath, files)
  Dir.chdir(dirpath) {|path|
    files.each { |filepath, stat|
      f = filepath + ".wiki"
      next unless File.exist?(f)
      File.utime(stat.atime, stat.mtime, f)
    }
  }
end

def write(datpath, files)
  str = ""
  files.each { |filepath, stat|
    f = CGI.unescape(filepath)
    i = stat.mtime.to_i
    fe = NKF.nkf( '-e', f )
    str << "\"#{fe}\"=\"#{i}\"\n"
  }

  File.open(datpath, "w").write(str)

end



def main(argv)
  hikidir = argv[0]
  fswikidir = argv[1]

  Dir.glob("#{hikidir}/*") { |dent|
    next unless File.directory?(dent)

    basename = File.basename(dent)
    srcdir = "#{dent}/text"
    dstdir = "#{fswikidir}/data/#{basename}"
    datpath = "#{fswikidir}/config/#{basename}/modtime.dat"

    next unless File.exist?(dstdir)

    files = collect(srcdir)
    update(dstdir, files)
    write(datpath, files)
  }

end

main(ARGV)

みたいな

% ./mtimer.rb ~/usr/local/var/hikifarm ~/public_html/fswiki

2011-12-22 :-(

_ 34歳になった

来年はアラフォーェ...

_ 午前

0520 起床

0830 出勤

0900 テスト準備

_ 午後

1300 テスト準備

1700 退勤

_

1900 力尽きた

2130 飯。豚肉の生姜焼き。というか豚肉と野菜の生姜炒めというか

2230 munin

_ ,

IBM さんが dw を翻訳してくれないなんて

NetBSD だからか (´・ω・`)

_ [NetBSD][翻訳]developerWorks - Get to know NetBSD NetBSD を知ろう

Summary: NetBSD runs on more hardware platforms than any other UNIX(R) derivative due to smart design decisions and a commitment to portable code. Whether you're porting an operating system to a proprietary embedded system or looking for stability and compatibility across hardware platforms in the lab, NetBSD and its open license is a compelling alternative to Linux(R) and the GNU Public License (GPL).

概要: NetBSD は、賢い設計決定とポータブルなコードにより、他の様々な UNIX 系よりもたくさんのハードウェア上で動作する。あなたのオペレーティングシステムをプロプライエタリな組み込みシステムへ移植したり、研究室でハードウェアプラットフォームを横断した安定性と互換性を追及{looking for}したりするとき、NetBSD とそのオープンライセンスは Linxu や GNU Public License (GPL) の代替となる。

One feature listed on the NetBSD Web site is that the operating system is hype free. I can do without hype, but generating some buzz for this operating system that is often overlooked certainly wouldn't hurt.

NetBSD ウェブサイトに挙げられてる 1 つの特徴は、オペレーティングシステムは拡張が自由{hype free}である、ということだ。拡張なしでは (上記のことを) 出来ないし、このオペレーティングシステムに作られたいくつかの buzz {「諸々」といった意味か????} は、高い視点で見れば傷つかずに済むことがある。

NetBSD has an interesting architecture, which is often taken for granted and rarely commented on outside Berkeley Software Distribution (BSD) circles. The system's well thought-out design allows for wide hardware support, a small footprint, stability, and security. NetBSD's unique features include a new paradigm for handling device drivers and other interesting innovations.

NetBSD は面白いアーキテクチャを持っている、というのは当然だし、バークレーソフトウェアディストリビューション (BSD) 界隈を外れたところでのコメントはほとんどない。システムは考えられたうえでの設計は幅広いハードウェア対応、小さい置き場所、安定性、セキュリティを許す。NetBSD のユニークな機能は、デバイスドライバをハンドルし、他の面白い技術革新のための新しいパラダイムを含んでいることだ。

These design decisions and commitment to source code, which not only works but works right, have helped NetBSD lay claim to being the most portable UNIX(R) derivative in existence. It particularly excels in embedded systems, but you should also consider it as a compelling alternative to more mainstream servers, desktops, and laptop operating systems.

これらの設計決定とソースコードへの誓約は、動作するということだけでなく、正しく動作するということだ。NetBSD がUNIX 系で最もポータブルであることへの要求に対応することを助ける。とくにすぐれているのは組み込みシステムだが、多くの主要サーバー、デスクトップ、そしてラップトップオペレーティングシステムと同様である???????????

An introduction to BSD (BSD の概要)

Three major BSD-derived operating systems are freely available: NetBSD, FreeBSD, and OpenBSD. All three systems are related to the original BSD distribution of UNIX, which dates back to the 1970s. In the early 1990s, at about the same time Linux(R) was coming together as a legitimate competitor to UNIX, a separate track was being forged to create a free UNIX-like operating system based on BSD. All three BSD versions have strong points, with FreeBSD leading the way in user base, OpenBSD leading in security, and NetBSD leading in portability.

BSD 由来の 3 つのおもなフリーな実装のオペレーティングシステムは、NetBSD、FreeBSD、そして OpenBSD がある。3 つすべてのシステムは、1970 年のころのオリジナルの UNIX の BSD ディストリビューションに関連する。。1990 年初頭、同じ時期に Linux が UNIX の正当な競争者に加わった。枝分かれにより、BSDを基にした UNIX ライクのオペレーティングシステムを作り出すことを進ませた。3 つの BSD バージョンにはすべて長所がある。FreeBSD はユーザーベース、OpenBSD はセキュリティ、NetBSD は可搬性に優れている。

Of course it runs on NetBSD (もちろん NetBSD なら動作する)

You can port NetBSD to run on just about anything with a processor -- hence the motto, "Of course it runs on NetBSD." NetBSD supports more than 50 platforms, ranging from old 68K and million instructions per second (MIPS) systems to the newest x86_64 processors from Advanced Micro Devices, Inc. (AMD) and Intel(R). Furthermore -- and possibly more importantly -- NetBSD has been ported for use on a massive number of embedded systems.

あらゆるプロセッサ上で NetBSD を動作させるために移植することができる。標語としてよく言われるのが「Of course it runs on NetBSD」(もちろん NetBSD なら動作する)。NetBSD は 50 以上のプラットフォームに対応している。MIPS のシステムである古い 68K から、AMD と Intel の最新の x86_64 プロセッサまで。さらに(これが重要なんだが)、NetBSD は数多くの組み込みシステム用途として移植されている。

Embedded systems (組み込みシステム)

Embedded systems are huge part of everyday life in the 21st century, far outselling traditional computing devices such as desktops, laptops, and servers. From mobile phones to automobiles to cable boxes, you're more than likely using a computer in some aspect of your life. The operating system and software that sit inside these devices is often as important as the traditional engineering decisions that go into their design.

組み込みシステムは 21 世紀の日々の生活の大きな部分である。デスクトップ、ラップトップやサーバーのような従来のコンピューティング機器よりも多く売れている。携帯電話から自動車からケーブルボックス { 電話装置????? }まで、あなたの生活のなかの様々な場面でコンピューターが使われている。これらの機器に入れられるオペレーティングシステムとソフトウェアは、ときに従来のエンジニアリング仕様と同じくらい重要に設計される。

Examples of NetBSD embedded systems range from the useful (routers and switches) to the bizarre (a NetBSD toaster). The variety of architectures commonly used in embedded systems far exceeds common choices for traditional computers, so portability is vital.

NetBSD の組み込みシステムの例として、有用なもの(ルーターやスイッチ)から、珍しいもの(NetBSD トースター)まで抑えている。組み込みシステムに使われる様々なアーキテクチャは、従来のコンピューターのよくある選択を上回る。だから可搬性が活きてくる。

NetBSD's small footprint, ease of portability, and BSD license make it a perfect choice for embedded systems. The small footprint is extremely important, as most embedded systems have a small amount of memory. Therefore, the operating system must be as thin as possible. Ease of portability significantly cuts development time to bring new products to market, which is key to staying ahead of competitors. The BSD license allows companies to build commercial products based on NetBSD and sell them for a profit while keeping the source code proprietary.

NetBSD は場所を取らず、可搬性を持たせやすく、BSD ライセンスである。これは組み込みシステムのために完璧な選択である 。この小さい独占領域は極めて重要である。多くの組み込みシステムはごく僅かなメモリしか持っていない。しかしオペレーティングシステムはそれでも動作しなければならない。可搬性が重要なのは、市場に新しい製品を投入するまでの開発者の時間をカットできることだ。競合よりも先をいくためにキーとなることだ。BSD ライセンスは企業が NetBSD をもとにした製品を構築し、ソースコードをプロプライエタリに維持しながら利益を得ることを許可している。

The BSD license (BSD ライセンス)

The BSD license is a big factor in corporate decision making when an organization is choosing NetBSD (or other BSD variants) over Linux for commercial products. The Linux kernel and most Linux software is released under the General Public License (GPL), which requires the release of the source for all modified codes. In contrast, the BSD license allows companies to modify and sell NetBSD code without releasing the modified source, thereby allowing companies to keep intellectual property close to the vest while leveraging open source software for the base of their product.

企業が商品のために Linux ではなく NetBSD ( または他の BSD 派生物 ) を選択することを決定するためには、BSD ライセンスは大きな要因である。Linux カーネルとほとんどの Linux ソフトウェアは GNU一般公的使用許諾 (GPL) のもとにリリースされる。ソースコードを変更したらリリース時にソースコードが要求される。対照的に、BSD ライセンスは企業が変更したり、NetBSD のコードを変更したコードをリリースしないことを許可している。それにより、企業が知的所有権を保持し、vest{????} に接する 彼らの製品のベースにオープンソースソフトウェアが影響し続ける。

In recent years, numerous companies have been sued over the improper use of GPL software. Choosing software released under the BSD license gives wider operating room for commercial products, which is another reason NetBSD is so well suited for embedded systems. For instance, if Company A were to use NetBSD in a new smart phone running on Intel XScale(R) technology, the company might add kernel support for Evolution-Data Optimized (EV-DO) devices. Under the BSD license, the company can keep this code proprietary so that Company B can't use the same code for their new phone. Had Company A decided to use a Linux kernel, their source for any modifications to the kernel would have to be released back to the community under a GPL license.

近年、いくつかの企業が GPL ソフトウェアを適切に使用しなかったとして告訴されている。BSD ライセンスでソフトウェアをリリースすることを選択することは、商品のための幅広い運用室{????}を与え、これが NetBSD が組み込みシステムにうまく当てはまるもう 1 つの理由である。具体的には、企業A が NetBSD を利用することは Intel XScale 技術の上で新しいスマートフォンを走らせ、そのうえ企業が Evolution-Data Optimized (EV-DO) デバイスの対応をカーネルに追加できる。BSD ライセンスのもとでは、企業はコードをプロプライエタリにし続けることができ、企業B が彼らの新しいスマートフォンのために同じコードを使用できないようにもできる。企業A が Linux カーネルを使った場合、彼らがカーネルのソースを何かひとつでも変更すれば、GPL ライセンスのもとでコミュニティへ反映させるためにリリースされなければならない。

Note: Find information in the BSD newsletter in the Resources section on building a small NetBSD kernel as a starting point for an embedded system.

注意: Resources 欄の BSD ニュースレターの「小さい NetBSD カーネルを構築する」の中に組み込みシステムを開始するための情報がある。

NetBSD: Not just for embedded systems (NetBSD: 組み込みシステムだけではない)

Any system administrator who has been in the business for a while understands the inevitability of hardware changes. You see it everyday when looking through an information technology (IT) room filled with architectures that were hot one day but failed to stand the test of time -- be it for technical or commercial reasons. Unfortunately, when many of these systems pass, their operating systems pass along with them. A big advantage of running a highly portable operating system, such as NetBSD, is consistency across platforms.

すべてのシステム管理者は、ハードウェアが変更されることは不可避であることを理解してたうえで仕事をしている。情報機器室へ行けば、時の試練に耐え{?????}、一日でも落ちることが許されないアーキテクチャで満たされていることをいつでも見ることができる。それは技術的または商業的な理由による。不運にもこれらのシステムの多くが pass {????} すると、それらのオペレーティングシステムはそれら自身を伝達する{????}。NetBSD のように可搬性があるオペレーティングシステムの大きな優位性は、プラットフォームを横断して一貫性があることだ。

If a system administrator can be confident that an operating system runs on the oldest workstation in the lab and the newest server comes off the assembly line, that administrator's job becomes substantially simpler. This simplification can be referred to as hardware compatibility through software homogeneity.

研究室で最古のワークステーションを走らせたり、生産ラインから出てきた最新のサーバーでオペレーティングシステムを走らせるとき、管理者の仕事はじつにシンプルであることをシステム管理者は確信している。この簡易化はハードウェア互換性によるもので、ソフトウェアのそれと同質のものである。

A similar example is sharing productivity documents across computers running Microsoft(R) Windows(R) and Mac OS X by using Microsoft Office programs on both platforms. Sharing at the operating system level is an advanced extension of the same concept, suitable for developers rather than everyday users.

同様の例として、Microsoft Office プログラムを Microsoft(R) Windows(R) と Mac OS X が走っているコンピューターで、生産性のある文書を文書を共有する、というのもある。オペレーティングシステムレベルで共有することは、同様の考えの先進的な拡張{advanced extension ???? }である。これは利用者のためというよりも開発者のためといってよい。

Some system administrators might argue that they have always, and will always, run on an x86 platform. So why should they be interested in an operating system that prides itself on portability? There are two answers (and one of them includes a question):

システム管理者はいつも、いつまでも x86 プラットフォームで走らせることについて議論しているだろう。なぜ彼らはオペレーティングシステムの可搬性に心が動かされるのか? 答えは 2 つある(そして 1 つの疑問が含まれている)。

A large component of the portability of NetBSD can be credited to an intelligently designed system and well-defined implementation standards. Portability and good design often go hand in hand, making the benefits of these decisions evident throughout the operating system.

NetBSD の可搬性の大きな要素により、高度に信頼された設計と、うまく定義された標準により実装ができる。可搬性とよい設計は、これらの決定によりオペレーティングシステムを明確な一貫性 {evident throughout} にするというメリット {benefits} がある。

Can you define always? While many companies and labs have been using x86 architectures for quite some time and don't anticipate variations, disruptive changes in technology are always difficult to predict. Knowing that your operating system won't restrict purchasing decisions opens up a cornucopia of choices that otherwise could not have been considered.

いつも定義しているか? ほとんどの企業と研究室は、多くの場合 x86 アーキテクチャを使っているので、変化しないことを予見できないし {don't anticipate variations}、技術の変更による混乱{ disruptive changes in technology } を予見することはいつも困難である。知ってのとおり、あなたのオペレーティングシステムは、他の方法は熟慮されないので {otherwise could not have been considered} 選択肢を豊富に拡大できないので {opens up a cornucopia of choices} 調達が制限される。

Saving money and gaining peace of mind by knowing that they won't need to port software and control systems to a new operating system are real and tangible benefits. Through these benefits, system administrators and programmers can focus on moving forward rather than simply keeping pace.

ソフトウェアを移植し、新しいオペレーティングシステムを制御することは、本当に、実際に利益があるので、お金を節約し、安らぎを得ることになる 。これらの利益により、システム管理者とプログラマは 簡単に保守すること{simply keeping pace} よりも前進すること {moving forward} に集中できる

The NetBSD kernel (NetBSD カーネル)

Every part of the NetBSD kernel is carefully thought out, with clean design and portability in mind. Here's a brief look at some design components of the NetBSD kernel.

NetBSD カーネルのすべての部分は、綺麗な設計と可搬性の意思により注意深く考え抜かれている。ここでは NetBSD カーネルのうちいくつかの設計について触れる。

NetBSD device drivers (NetBSD デバイスドライバ)

NetBSD's machine-independent driver framework is a unique method of handling device drivers, and it's crucial for simple and quick ports. In most operating systems, a device driver is specific to a piece of hardware (video card, network interface card (NIC), and so on), bus (such as Peripheral Component Interconnect (PCI), Industry Standard Architecture (ISA), Universal Serial Bus (USB)), and platform (i386, 68k, PowerPC(R), and so on). In NetBSD, device drivers are written to extend across multiple buses and multiple platforms, enabling developers to include addenda to the device driver's code to add compatibility to a new setup rather than writing a whole new driver. This is a huge shift from the typical operating system device driver paradigm that helps in overcoming one of the biggest stumbling blocks for operating system developers, system administrators, and component manufactures.

NetBSD のマシン非依存ドライバフレームワークはデバイスドライバをハンドリングする唯一の手段である。シンプルで迅速な移植のために重要なのである。ほとんどのオペレーティングシステムのデバイスドライバは、いくつかのハードウェア(ビデオカード、ネットワークインターフェースカード(NIC)、など)、バス(ペリフェラル コンポーネント インターコネクト(PCI)のような)、インダストリ スタンダード アーキテクチャ(ISA)、ユニバーサルシリアルバス(USB)、そしてプラットフォーム(i386、68k、PowerPCなど) 向けに設計されている{ specific }。NetBSD ではデバイスドライバは複数のバスやプラットフォームを横断して拡張できるように書かれている。開発者が 新規にデバイスドライバ全部を書くよりも、新しくデバイスドライバへ互換性コードを追加することを有効にする。これは典型的なオペレーティングシステムのデバイスドライバからのとても大きなパラダイムシフトであり、オペレーティングシステム開発者やシステム管理者や部品製造者 {component manufactures} の最大の障害を取り除く助けになる。

File system support (ファイルシステム対応)

NetBSD, again encouraging portability and interoperability, includes support for many different file systems. Berkeley Fast File System (FFS) is the default choice, with support in 32-bit and 64-bit configurations. Other major file systems that NetBSD supports include the Linux ext2 and the Windows NTFS and FAT32 file systems. The standard CD file system, International Standards Organization (ISO) 9660, is also supported, with both Rockridge and Joliet extensions.

NetBSD は様々な異なるファイルシステム対応を含めて再度 可搬性と相互運用性を促進する。バークレーファーストファイルシステム (FFS) は 32bit と 64bit の設定では既定で選択される。NetBSD が対応している他の主なファイルシステムは、Linux ext2 と Windows の NTFS と FAT32 ファイルシステムがある。国際標準化機構 ISO 9660 の CD 標準ファイルシステムについては Rockridge と Joliet extensions とともに対応している。

Cryptographic device driver (暗号デバイスドライバ)

The combined effect of today's wide-spread use of laptop computers and the increased amount of sensitive company and personal information stored digitally is a recipe for disaster. Every few months, you read a story in the headlines about a lost computer, or hard disk, containing sensitive data -- be it a government lab, a credit card company, or an individual who had all his or her banking information, including their Social Security number, on a personal computer.

今日の広くいきわたったラップトップコンピュータと、 増加するデジタル保存された企業機密と個人情報が複合して影響するのは、災害に対するレシピである。ここのところ毎月のように、あなたはコンピュータや、敏感なデータが入っているハードディスクを無くしたという話題を目にしただろう。それは大学の研究室や、クレジットカード会社や、工場である。彼ら/彼女たちのすべては、彼ら自身の社会セキュリティ番号を含んだ銀行情報をコンピュータに持っていた。

The fact is accounts, passwords, and permissions can only protect your data in the context of an operating system that obeys stated rules. Bits are bits, and any hard disk pulled out of one computer and put into another can easily be read -- unless that data is encrypted.

この影響は預金、パスワード、そして権限が、米国の法律では、オペレーティングシステムは あなたのデータを保護することだけを可能としている。データが暗号化されていなければ、少しずつ {Bits are bits,} あらゆるハードディスクは 1 つのコンピュータから出ていき、他の誰かが簡単に読めるようになっていく。

File encryption can be accomplished in a variety of ways, but it's rarely used because of the burden on system administrators or users. Most data encryption methods require explicit decisions of where and when to encrypt data, manual mounting and unmounting of encrypted images, and entering passwords.

ファイル暗号化は、様々な用途のために完成させることができた。まれに システム管理者やユーザーが重い荷物を運ぶ {burden} ために使われる。多くのデータ暗号化手法は、どこでいつデータを暗号化するのか、手動で暗号データをマウント/アンマウントするのか、パスワードを入力するのか、を明確に定義することを要求する。

NetBSD uses the cryptographic device driver (CGD) to implement an encrypted file system with a virtual device. By sitting between the rest of the operating system and the actual disk, CGD looks and acts like any other disk drive attached to the system, allowing for transparent access to secure storage.

NetBSD は仮想デバイスでの暗号化ファイルシステムの実装として cryptographic device driver (CGD) を利用している。休眠中 {rest of} オペレーティングシステムと実際のディスクのでは、CGD はシステムに取り付けられた他のディスクドライブと同じように見える。セキュアストレージへの透過的なアクセスを許可する。

Note: See the NetBSD Guide in the Resources section for information on how to enable CGD.

注意: 参考 章にある NetBSD ガイドに CGD を有効にするやり方が書いてある。

General security (セキュリティ全般)

NetBSD takes security very seriously; the inclusion of the CGD is only one of many examples. If portability is rule number one for the NetBSD community, security doesn't sit far behind. An absolute dedication to well-written code is paramount, including procedures for code auditing and continued checks.

NetBSD はセキュリティにとてもマジメに取り組んでいる。CGD に含まれている{inclusion}のは、たくさんの例のうちのたった 1 つだ。可搬性が NetBSD コミュニティの最高の規則だとしたら、セキュリティはすごく後退してはいない。よいコードを書くための絶対的な献身 {dedication} は 、 コード審査と継続チェックの手法を含めて最高であること {paramount} だ

Second, like OpenBSD, the default installation includes a bare minimum of packages installed, or configured. The first thing a system administrator is likely to do after a NetBSD installation on a server is to configure the network and enable Secure Shell (SSH), which gives you an indication of how little the default configuration enables.

次に、OpenBSD のように、規定のインストールでは必要最低限 {bare minimum} のパッケージのインストールと設定をしている。システム管理者の最初の仕事 {thing} は、NetBSD をサーバーにインストールした後におこなうことのように、ネットワークとセキュアシェル(SSH)を設定することだ。これにより 少ない既定の設定を有効になる。

While some new users might argue that this approach makes things more difficult on them, learning to control and configure services is an important part of any UNIX-like operating system, and learning to do so doesn't take long. A quick read through the official NetBSD Guide helps get new users off the ground.

新しい利用者は、この手法でより多くの違いを彼らにもたらすので、ときどき話題になるのだが { ubuntu 等のように富豪にすべき、といった議論になるということか? }、サービスの管理と設定を学ぶことは、UNIX 風オペレーティングシステムの重要な部分なので、あまり時間をかけない。新しい利用者は公式の NetBSD ガイドを軽く読むだけでよい。

Note: See the Resources section for an additional link from gna.org to a great document for new NetBSD users.

注意: 新しい NetBSD 利用者のために 参考 章に gna.org によるすばらしい文書へのリンクがある。

Application support: Package source and binary emulation (アプリケーション対応: パッケージソースとバイナリエミュレーション)

Application support in NetBSD is both wide and varied. Most standard software familiar to administrators of UNIX-like operating systems is natively available to NetBSD and easily installed through the NetBSD Packages Collection (pkgsrc), which includes more than 5000 packages. If you can't find what you are looking for through pkgsrc, you can always run through a series of binary emulators built into NetBSD, the most prominent of which is the Linux emulator running on i386.

NetBSD でのアプリケーション対応は幅広く様々に対応している。UNIX 風オペレーティングシステムで最も知られた標準の管理用ソフトウェアは、NetBSD にネイティブで有効になっているし、さらに 5000 以上のパッケージが NetBSD パッケージコレクション (pkgsrc) によって簡単にインストールできる。pkgsrc に見つからなければ、NetBSD 向けにビルドされた一連の{series} バイナリエミュレーションをいつでも走らせることができる。i386 上で走る Linux エミュレーターが最も著名 {the most prominent} だ。

The default installation of NetBSD, however, is quite thin. Not only is it configured with most services turned off, it has few packages installed, period. The kernel, compilers, network services, XFree, and standard UNIX utilities are all that's included in the base distribution. To install packages you're used to finding in a UNIX-like operating system (such as MySQL or PostgreSQL), use the pkg_add command to extract and install software (from local disk, CD/DVD, or over the network). If you're installing an x86 system, you can use /cdrom/packages/i386/All/ on the i386pkg-3.0.iso CD. Packages installed through the pkg_add command are installed in /usr/pkg/ and do not interfere with the core components of NetBSD.

NetBSD の既定のインストールは最小限になっている {quite thin}。ほとんどのサービスが無効に設定されているだけでなく、わずかなパッケージしかインストールされない。カーネル、コンパイラ、ネットワークサービス、XFree、そしてUNIX 標準ユーティリティはすべて base 配布物に含まれている。UNIX 風オペレーティングシステムで見かけるパッケージ(MySQL や PostgreSQL のような)をインストールするには、pkg_add コマンドで展開し、ソフトウェアをインストールする(ローカルディスク、CD/DVD またはネットワーク越しに)。x86 システムにインストールしたならば、/cdrom/packages/i386/All/ にある i386pkg-3.0.iso CD が使える。pkg_add コマンドでインストールされたパッケージは、/usr/pkg/ にインストールされ、NetBSD の核コンポーネントを妨げない。

For non-native applications, NetBSD can transparently run binaries from a variety of UNIX-like operating systems with a negligible impact on performance. While most of the popular open source applications have been ported to run natively on NetBSD, some commercial applications, such as Matlab and Mathematica, cannot be ported by the user community because the code is proprietary.

非ネイティブアプリケーションについては、NetBSD はとるに足らないパフォーマンスの影響はあるが、様々な UNIX 風オペレーティングシステムのバイナリを透過的に実行できる。人気のオープンソースアプリケーションのほとんどを NetBSD ネイティブに移植できるが、Matlab や Mathematica などいくつかの商業アプリケーションは、コードがプロプライエタリのためユーザーコミュニティによる移植は不可能だ。

This is where binary emulation becomes important for NetBSD users. The emulation process is streamlined because the binaries are native to the underlying architecture of the system. Don't confuse binary emulation with the CPU-hungry process of hardware emulation, which is not at play here. Binary emulation is often suitable for running processor-intensive applications in a production environment.

これは、バイナリエミュレーションは NetBSD 利用者にとって重要だということだ。バイナリはシステムのアーキテクチャの基礎なので、エミュレーションプロセスは効率的 {streamlined} である。混乱しないでほしいのだが、ハードウェアエミュレーションのように CPU 資源を食うプロセス {CPU-hungry process} としてのバイナリエミュレーションではない。それはここでは取り上げない。バイナリエミュレーションは、 製品環境でのプロセッサが厳しいアプリケーションを走らせるためにはときどき適している。

Decisions, decisions (決定、決定)

NetBSD's attention to detail, well-written code, and vast portability make it a solid choice for a number of deployment scenarios. Unfortunately, BSD derivatives are flying just low enough to stay under the radar and many developers and system administrators are missing important opportunities.

NetBSD で注力しているのは、詳細 {????} 、よいコードを書くこと、そして幅広い可搬性だ。これによりいくつかの設置シナリオ {deployment scenarios} については手堅い選択{solid choice} になる {アーキテクチャによっては定番のデプロイが出来るということか????}。不幸にも BSD 派生物は、レーダー{????}とたくさんの開発者とシステム管理者の下に居るには最低限充分なので、重要な機会を逃している。

The most important part of making a good decision is to be well informed. BSD might or might not be the right choice for you, but don't make the mistake of overlooking it just because you're familiar with something else. Use this article as a starting point to familiarize yourself with NetBSD, then give the distribution a shot -- the least you can do is learn.

よい決定をすることの最も重要なことは、よく精通{informed}していくことだ。BSD はあなたにとって正しい選択かもしれないし、そうでないかもしれない。しかし、あなたが他の何かについて精通するとしても、高い視点 {overlooking} では間違いではない。この章を使って NetBSD とともにあなた自身が精通するための出発点とし、配布物を得よう。少なくともあなたはそれが出来る。{????}

_ [NetBSD][munin]munin を入れてみた

NetBSD で pkgsrc でヒャッハー

munin って?

Munin - Trac

Munin is a networked resource monitoring tool that can help analyze resource trends and "what just happened to kill our performance?" problems. It is designed to be very plug and play. A default installation provides a lot of graphs with almost no work.

ネットワーク経由で計算機のリソース( CPU とかメモリとかファイルシステムとかいろいろ)をグラフなどにいい感じに出力などしてくれるツール。

munin-doc

% cd /usr/pkgsrc/sysutils/munin-doc
% make install clean clean-depens

munin-server

% cd /usr/pkgsrc/sysutils/munin-server
% make install clean clean-depens

:

===========================================================================
$NetBSD: MESSAGE,v 1.3 2006/06/09 13:25:22 he Exp $

You can start the collection of statistics and production of graphs by
installing a crontab for the munin user of the form

*/5 * * * * /usr/pkg/bin/munin-cron

You may need to give munin a valid shell to do so.


You may also want to add lines like

/var/log/munin/munin-graph.log  munin:munin 644 7 *    24   Z
/var/log/munin/munin-html.log   munin:munin 644 7 *    24   Z
/var/log/munin/munin-limits.log munin:munin 644 7 *    24   Z
/var/log/munin/munin-update.log munin:munin 644 7 *    24   Z

to your /etc/newsyslog.conf file to have the logs rotated.

===========================================================================

言われたとおりに作業する

cron に↑を追加

% crontab -u munin -e
*/5 * * * * /usr/pkg/bin/munin-cron

/etc/newsyslog.conf に↑を追加

/var/log/munin/munin-graph.log  munin:munin 644 7 *    24   Z
/var/log/munin/munin-html.log   munin:munin 644 7 *    24   Z
/var/log/munin/munin-limits.log munin:munin 644 7 *    24   Z
/var/log/munin/munin-update.log munin:munin 644 7 *    24   Z

/usr/pkg/etc/munin/munin.conf を編集

% vim /usr/pkg/etc/munin/munin.conf

デフォルトのまま

dbdir   /var/munin
htmldir /usr/pkg/www/munin/data
logdir  /var/log/munin
rundir  /var/run/munin
tmpldir /usr/pkg/etc/munin/templates

[mogu.area51.gr.jp]
    address 127.0.0.1
    use_node_name yes

apache

httpd の設定を追加

% sudo vim /usr/pkg/etc/httpd/httpd.conf
include etc/httpd/httpd-munin.conf
% sudo vim /usr/pkg/etc/httpd/httpd-munin.conf
ScriptAlias /munin/cgi/  /usr/pkg/www/munin/data/cgi/
Alias /munin/ /usr/pkg/www/munin/data/

<Directory "/usr/pkg/www/munin/data">
    Options ExecCGI
    Order allow,deny
    Allow from all
</Directory>
Forbidden
You don't have permission to access /munin/ on this server.

と怒られたら Directory の設定してないとかなんとか

munin-node

% cd /usr/pkgsrc/sysutils/munin-node
% make install clean clean-depens

:

===========================================================================
The following files should be created for munin-node-1.3.2nb9:

        /etc/rc.d/munin-node (m=0755)
            [/usr/pkg/share/examples/rc.d/munin-node]

===========================================================================
===========================================================================
$NetBSD: MESSAGE,v 1.3 2006/12/05 14:53:32 xtraeme Exp $

Plugins can be auto-configured with "munin-node-configure --shell | sh"

You may also want to add an entry such as

/var/log/munin/munin-node.log   munin:munin 644 7 *    24   Z

to /etc/newsyslog.conf to have the node log rotated.

===========================================================================

rc ファイルをコピー

% cp /usr/pkg/share/examples/rc.d/munin-node /etc/rc.d/

/etc/newsyslog.conf に↑を追加

/var/log/munin/munin-node.log   munin:munin 644 7 *    24   Z

/etc/rc.conf に追加

munin_node=yes

設定を実行

% munin-node-configure --shell | sh
:
Could not open "/usr/pkg/etc/munin/plugins" for reading: No such file or directory at /usr/pkg/sbin/munin-node-configure line 348.

怒られたので作っておく

% mkdir /usr/pkg/etc/munin/plugins

もう一回

% munin-node-configure --shell | sh

デフォルトだとこんなのが作られる。

% ls -l /usr/pkg/etc/munin/plugins
lrwxr-xr-x 1 root wheel 30 Sep 26 20:49 cpu -> /usr/pkg/lib/munin/plugins/cpu*
lrwxr-xr-x 1 root wheel 29 Sep 26 20:49 df -> /usr/pkg/lib/munin/plugins/df*
lrwxr-xr-x 1 root wheel 32 Sep 26 20:49 forks -> /usr/pkg/lib/munin/plugins/forks*
lrwxr-xr-x 1 root wheel 38 Sep 26 20:49 if_errcoll_pcn0 -> /usr/pkg/lib/munin/plugins/if_errcoll_*
lrwxr-xr-x 1 root wheel 30 Sep 26 20:49 if_pcn0 -> /usr/pkg/lib/munin/plugins/if_*
lrwxr-xr-x 1 root wheel 37 Sep 26 20:49 interrupts -> /usr/pkg/lib/munin/plugins/interrupts*
lrwxr-xr-x 1 root wheel 33 Sep 26 20:49 iostat -> /usr/pkg/lib/munin/plugins/iostat*
lrwxr-xr-x 1 root wheel 37 Sep 26 20:49 iostat_ops -> /usr/pkg/lib/munin/plugins/iostat_ops*
lrwxr-xr-x 1 root wheel 35 Sep 26 20:49 irqstats -> /usr/pkg/lib/munin/plugins/irqstats*
lrwxr-xr-x 1 root wheel 31 Sep 26 20:49 load -> /usr/pkg/lib/munin/plugins/load*
lrwxr-xr-x 1 root wheel 33 Sep 26 20:49 memory -> /usr/pkg/lib/munin/plugins/memory*
lrwxr-xr-x 1 root wheel 39 Sep 26 20:49 memory_pools -> /usr/pkg/lib/munin/plugins/memory_pools*
lrwxr-xr-x 1 root wheel 39 Sep 26 20:49 memory_types -> /usr/pkg/lib/munin/plugins/memory_types*
lrwxr-xr-x 1 root wheel 34 Sep 26 20:49 netstat -> /usr/pkg/lib/munin/plugins/netstat*
lrwxr-xr-x 1 root wheel 37 Sep 26 20:49 nfs_client -> /usr/pkg/lib/munin/plugins/nfs_client*
lrwxr-xr-x 1 root wheel 31 Sep 26 20:49 nfsd -> /usr/pkg/lib/munin/plugins/nfsd*
lrwxr-xr-x 1 root wheel 37 Sep 26 20:49 open_files -> /usr/pkg/lib/munin/plugins/open_files*
lrwxr-xr-x 1 root wheel 44 Sep 26 20:49 postfix_mailqueue -> /usr/pkg/lib/munin/plugins/postfix_mailqueue*
lrwxr-xr-x 1 root wheel 36 Sep 26 20:49 processes -> /usr/pkg/lib/munin/plugins/processes*
lrwxr-xr-x 1 root wheel 31 Sep 26 20:49 swap -> /usr/pkg/lib/munin/plugins/swap*
lrwxr-xr-x 1 root wheel 36 Sep 26 20:49 swap_size -> /usr/pkg/lib/munin/plugins/swap_size*
lrwxr-xr-x 1 root wheel 33 Sep 26 20:49 uptime -> /usr/pkg/lib/munin/plugins/uptime*
lrwxr-xr-x 1 root wheel 33 Sep 26 20:49 vmstat -> /usr/pkg/lib/munin/plugins/vmstat*

動作確認

起動

% /etc/rc.d/munin-node start

telnet してみる

% telnet localhost 4949
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

しゃべってみる

# munin node at mogu.area51.gr.jp
list
irqstats processes postfix_mailqueue if_errcoll_pcn0 memory_types swap_size memory_pools df netstat interrupts uptime swap load nfsd cpu if_pcn0 iostat forks open_files memory vmstat iostat_ops nfs_client

TLS Error: Could not enable TLS

ログ /var/log/munin/munin-node.log にこんなのがあった。

2011/12/22-22:00:00 [3491] TLS Notice: No key file "/usr/pkg/etc/munin/munin-node.pem". Continuing without private key.
2011/12/22-22:00:00 [3491] TLS Notice: No certificate file "/usr/pkg/etc/munin/munin-node.pem". Continuing without certificate.
Use of uninitialized value $msg in concatenation (.) or string at /usr/pkg/lib/perl5/vendor_perl/5.12.0/i386-netbsd-thread-multi/Net/SSLeay.pm line 693, <STDIN> line 1.
2011/12/22-22:00:00 [3491] TLS Error: Could not enable TLS:  3491: 1 - error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
Dec 22 22:00:51 mogu newsyslog[7894]: log file turned over

ググる

うーたんの小部屋 » Blog Archive » Munin障害(対応)

/usr/pkg/etc/munin/munin.conf に以下を追加

tls disabled

再起動

% /etc/rc.d/munin restart

見る

http://example.org/munin/ にアクセスする。

こんな

本日のツッコミ(全4件) [ツッコミを入れる]

_ Fryght [ダイジョウブ、38カラアラフォートオモエバ…。]

_ みわ [心は10代デス]

_ かず母ちゃん [遅くなってしまったけどお誕生日おめでと~(^^)私は永遠に28歳で頑張り。。。たいです(>_<)でもここ数年体にガタ..]

_ みわ [ありがとうゴマス。30過ぎてから体力が フジコ]


2011-12-23 :-)

_ 欲しいものリスト

私の欲しいものはこちら Amazon.co.jp: 三輪晋: 読みたい

帰りのカバンにはまだ若干の余裕があります。

_ 午前

1030 起床

_ 午後

1230 おひる。うどん

1400 台所掃除。ガスレンジをひたすら磨く

1500 年賀状を書く

1530 アニメ消化

_

1900 飯

2200 年賀状を書く


2011-12-24 :-)

_ 午前

1030 起床 || 部屋掃除

1200 おひる。ナポリタン風

携帯百景(ケイタイヒャッケイ)

_ 午後

1400 ケーキ作成

1600 ローストチキン作成

_

1900 飯。ローストチキン

2000 ケーキ

2200 寝る

_ クリスマス的な何か

例年どおりにローストチキン作って食べてケーキ作って食べる。そんだけ

これだけの物を 2 人で消化するのはそろそろツラいので来年は対策する。

携帯百景(ケイタイヒャッケイ)

携帯百景(ケイタイヒャッケイ)

本日のツッコミ(全2件) [ツッコミを入れる]

_ かず母ちゃん [2人で食べるのがツライなら!!(ツラくなくても)来年是非参戦(?!)させて下さい~(^O^) みわさん。。。私よりは..]

_ みわ [いやもうケーキ食べて胃もたれがヒドイ (´Д`;)]


2011-12-25 :-)

_ 午前

0930 起床

1030 おひる

_ 午後

1400 KOZOS

1500 散歩

_

1700 munin

2200 飯

_ mod_auth_digest

ref. mod_auth_digest - Apache HTTP Server

ダイジェスト認証のために記述して

AuthType      Digest
AuthName      examle
AuthUserFile  /home/homura/example
Require user  valid-user

エラーになった。

ログ

access to /foo/bar failed, reason: user 'example' does not meet 'require'ments for user/valid-user to be allowed access, referer: http://www.example.gr.jp/~homura/foo/bar/

なんでだろーなんでだろーと思っていたら Require がアッー

-Require user  valid-user
+Require valid-user

直した


2011-12-26 :-(

_ 午前

0520 起床

0830 出勤

0900 テスト準備

_ 午後

1300 テスト準備

1700 退勤

_

1900 munin

2200 飯。ブリの照り焼き。厚い肉だったのでレアになった。

_ [ssh]ssh の接続元 IP アドレス

(っ´∀`)っ ゃー » [munin] 監視サーバのIPアドレス取得スクリプト修正

nullpopopo のひとはリモートへ ssh したときに接続元(つまりクライアント)の IP アドレスを取得するためにログをごにょっているんだが、ssh はもっと手軽な手段があったようなあと思い出そうとしてなんだったかなーなんだったかなーと思っていたらそうだ環境変数だった。

% env | grep SSH
SSH_CLIENT=xxx.xxx.xxx.xxx 8888 22
SSH_CONNECTION=xxx.xxx.xxx.xxx 8888 yyy.yyy.yyy.yyy 22
SSH_TTY=/dev/pts/1
  • xxx.xxx.xxx.xxx が接続元 IP アドレス
  • yyy.yyy.yyy.yyy が接続先 IP アドレス
  • 8888 が接続元ポート
  • 22 が接続先ポート

( 下記コードに書いてある )

なのだが

sshによるリモートアクセスを見分ける方法 SSH_CONNECTION SSH_CLIENT

SSH_CLIENTは deprecated とコメントされているので、利用するのは、あまり望ましくないかもしれません。

NetBSD も然り

CVS log for src/crypto/external/bsd/openssh/dist/session.c

    /* SSH_CLIENT deprecated */
    snprintf(buf, sizeof buf, "%.50s %d %d",
        get_remote_ipaddr(), get_remote_port(), get_local_port());
    child_set_env(&env, &envsize, "SSH_CLIENT", buf);

    laddr = get_local_ipaddr(packet_get_connection_in());
    snprintf(buf, sizeof buf, "%.50s %d %.50s %d",
        get_remote_ipaddr(), get_remote_port(), laddr, get_local_port());
    xfree(laddr);
    child_set_env(&env, &envsize, "SSH_CONNECTION", buf);

    if (s->ttyfd != -1)
        child_set_env(&env, &envsize, "SSH_TTY", s->tty);
    if (s->term)
        child_set_env(&env, &envsize, "TERM", s->term);
    if (s->display)
        child_set_env(&env, &envsize, "DISPLAY", s->display);
    if (original_command)
        child_set_env(&env, &envsize, "SSH_ORIGINAL_COMMAND",
            original_command);

_ [sudo]sudo: sorry, you must have a tty to run sudo

% ssh homura@host1 'sudo echo hoge'
sudo: sorry, you must have a tty to run sudo

オウフ

sudoが「sudo: sorry, you must have a tty to run sudo」と文句を言うときは

#
# Disable "ssh hostname sudo <cmd>", because it will show the password in clear.
#         You have to run "ssh -t hostname sudo <cmd>".
#
Defaults    requiretty

-t しろと

% ssh -t homura@host1 'sudo echo hoge'
hoge

おk

本日のツッコミ(全2件) [ツッコミを入れる]

_ マジョーラアンドロイド [ご無沙汰でございます。最近グランツ5ばかりでリッジ7の活動休止していました。本日から再開します! あと僕のブログの方..]

_ みわ [久しぶりどす。 レース見ときます (「・ω・)「]


2011-12-27 :-(

_ 午前

0520 起床

0830 出勤

0900 テスト準備

_ 午後

1300 テスト準備

1700 退勤

_

1900 pf

2000 ssh ブルートフォースアタック対策

2100 nmap あばばばばば

2130 飯。チンジャオロース

_ [pflogd][pf]pflogd: Failed to initialize: pflog0: Invalid argument

% /etc/rc.d/pflogd start
Starting pflogd.
pflogd: Failed to initialize: pflog0: Invalid argument

% tail /var/log/messages
Dec 27 19:47:50 mogu pflogd: Failed to initialize: pflog0
Dec 27 19:47:50 mogu pflogd: Exiting, init failure

はて

ググってもあまりヒットしないのでコード読んでみた。

CVS log for src/dist/pf/sbin/pflogd/pflogd.h

#define PFLOGD_DEFAULT_IF    "pflog0"

CVS log for src/dist/pf/sbin/pflogd/pflogd.c

 const char *interface = PFLOGD_DEFAULT_IF;


    while ((ch = getopt(argc, argv, "Dxd:f:i:p:s:")) != -1) {
        switch (ch) {
        case 'D':
            Debug = 1;
            break;
        case 'd':
            delay = strtonum(optarg, 5, 60*60, &errstr);
            if (errstr)
                usage();
            break;
        case 'f':
            filename = optarg;
            break;
        case 'i':
            interface = optarg;
            break;

:
    /* does interface exist */
    if (!if_exists(interface)) {
        warn("Failed to initialize: %s", interface);
        logmsg(LOG_ERR, "Failed to initialize: %s", interface);
        logmsg(LOG_ERR, "Exiting, init failure");
        exit(1);
    }

CVS log for src/etc/rc.d/pflogd

    if ! ifconfig pflog0 >/dev/null 2>&1; then
        ifconfig pflog0 create
    fi

つまり "pflog0" が存在していないと。

PF: Logging

Use ifconfig(8) to create pflog(4) interfaces. The default log interface pflog0 is created automatically.

自動で作成される...だと...?

はて

pflog - NetBSD Manual Pages

    Create a pflog interface and monitor all packets logged on it:

          # ifconfig pflog1 up
          # tcpdump -n -e -ttt -i pflog1

ふむ....

% ifconfig pflog0 up
% ifconfig -a
pcn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: 00:0c:29:67:4e:fb
        media: Ethernet autoselect
        inet 192.168.0.23 netmask 0xffffff00 broadcast 192.168.0.255
        inet6 fe80::20c:29ff:fe67:4efb%pcn0 prefixlen 64 scopeid 0x1
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
pflog0: flags=41<UP,RUNNING> mtu 33192
% /etc/rc.d/pflogd start
Starting pflogd.
pflogd: Failed to initialize: pflog0: Invalid argument

ぐぬぬ


2011-12-28 :-(

_ 午前

0520 起床

0830 出勤

0900 テスト準備

_ 午後

1300 退勤

1400 劇場版 けいおん!

_

1800 pf

1930 飯

_ 劇場版 けいおん! を見てきた

@チネチッタ

仕事の帰りにでもイケばいいものを今更になってようやく見た。

なんというかいつもどおりの けいおんだった。

衣擦れの音がヤケに生々しかったり、メンバーが並列で会話してたりと演出が細かいんだがテレビシリーズもこうだったかどうだったか。キャリーケースに派手な色のバンド(?)を装着していたんだが、アレやっておくと手荷物を受取るときなどに自分の荷物が目立つんである。というライフハックを私も親から教わった。そういうところも描いてるとか

_ NetBSD はマイナーなので使っている。FreeBSD はメジャーだし。まあ OpenBSD はさらにマイナーだろうけど (´ω`;)

などと思っていたんだが

NetBSD のほうがマイナーだった

200px-Bsd_distributions_usage.svg.png

(ref. Comparison of BSD operating systems - Wikipedia, the free encyclopedia )


2011-12-29 :-)

_ 午前

0930 起床

1030 おひる。カルボナーラ

携帯百景(ケイタイヒャッケイ)

_ 午後

1400 KOZOS

1600 買い物

_

1700 doxygen とか

2130 飯。パエリア。これ スペイン人に教えてもらった、誰にでも出来る美味しいパエリアの作り方

うちはこんな感じにした。

  • ピーマン1個
  • 鶏むね肉 (200グラムくらい)
  • ホールトマト一缶
  • 米 1 合
  • 水 300cc

2 人で食べたんだが米 1 合は多いかなーといったところ。米 3/4 合くらいでいいかもしんない

携帯百景(ケイタイヒャッケイ)

本日のツッコミ(全3件) [ツッコミを入れる]

_ かず母ちゃん [昼食も夕食もみわさんが作ったの!?是非我が家のシェフになってもらえませんか?(^O^)]

_ みわ [作りましたです。8割りくらいは手抜きするので他人にはオススメできない (`・ω・´)]

_ 迅 帝 [どうもお久しぶりです みわさん、常連の迅帝ですよ~覚えてます? まあ、明けましておめでとうです みわさんの声聞きたい..]


2011-12-30 :-)

_ 午前

0930 起床

1030 おひる。うどん

_ 午後

1300 支度

1400 JSTQB FL シラバス読むなど

_

2130 飯


2011-12-31 :-)

_ 午前

0400 起床

0509 大井町行き。すでに混んでいる

0510 りんかい線 大井町駅。混みすぎなので 1 本見送り。臨時電車に載る

0625? 国際展示場駅

0636 東待機列

1130 たぶぐら

_ 午後

1250 撤収

1340 玉川高島屋 銀座天一

1500 クルマを洗車

_

1830 飯。そば。銀座天一 の天ぷら。毎年恒例

携帯百景(ケイタイヒャッケイ)

携帯百景(ケイタイヒャッケイ)

1915 NHK 紅白

_ コミックマーケット81 3日目

買った

買えなかった

IMG_9351

_ ゆくとし

よいお年を