なぜか今年は十個挙げるのにちょっと困る.Wii も PS3 も買ってないし.
<URL:http://myn.meganecco.org/files/lsmod.rb>
lsmod の 「Used by」 を graphviz でグラフにする.やるきなしなし.
% ./lsmod.rb | neato -Tpng | display -
みたいな感じで使う.
neato の箇所は dot や twopi や circo や fdp でも可, -Tpng の箇所は -Tjpg でも可.

最近どうも Linux で飼っている Windows 上から Network Printing することが多くなって来ていて(Linux で ps もしくは pdf を作成して Windows で印刷),これではだめだと思いはじめたので, LPRng に別れを告げ CUPS (Common UNIX Printing System) を使うことにした.
% sudo apt-get install cupsys % sudo apt-get install cupsys-bsd cupsys-driver-gutenprint cupsys-driver-gimpprint foomatic-filters-ppds cups-pdf hplip
これで lprng が自動的に抜ける(cupsys-bsd と Conflict).
設定は http://localhost:631/ を叩いて,GUI で.
Windows にぶらさがっている printer や, <URL:http://www.ricoh.co.jp/imagio/> とかの LPR 対応ネットワークプリンタの場合, [管理]→[プリンタの追加] から
デバイス URI: lpd://hoge.example.org/CanonPIX
ここで,CanonPIX とかの Printer 名は
% smbclient -L hoge.example.org
とかで探す.
という手順でプリンタを追加. どこかの Page に Windows にぶらさがっている Printer に関しては
smb://hoge.example.org/CanonPIX
とするとか書いてあって若干嵌る.手元の環境では smb:// は N.G. で lpd:// としなければならなかった.
command line から CUPS を使うには,
% echo hoge | a2psj | lpr -P hoge
みたいな感じで lprng と同じ.
[myn:2006122702] の続き.
# apt-get install snmpd # vi /etc/snmp/snmpd.conf com2sec readonly default xxxx (←コミュニティー名)
外の計算機から,
% snmpwalk -c xxxx -v2c 10.0.0.5 laload
とかで check.MRTG も外で動かす.
% cfgmaker xxxx@10.0.0.5 xxxx@10.0.0.6 > /etc/mrtg.cfg
とかで mrtg.cfg の雛型をつくって編集(上記は2台の例になってる).
% indexmaker --columns=1 /etc/mrtg.cfg > index.html
とかで index.html の雛型をつくって編集.あとは cron を仕込む.
玄箱 KURO-BOX への Debian のセットアップメモ.
玄箱うぉううぉう♪の <URL:http://kuro.dsk.jp/data/dist/install_debian_standalone.txt> を参照しつつ.
以下のコマンドを叩く
# /sbin/mfdisk -e /dev/hda # sh /sbin/mkfilesystem.sh
外から ftp で debian_2006_06_10_dist.tgz を /mnt2/share/debian_2006_06_10_dist.tgz に送る
% ftp Name: root Password: kuroadmin ftp> cd /mnt2/share ftp> put debian_2006_06_10_dist.tgz
Debian のイメージを展開.玄箱で以下.
# cd /mnt # tar zxfv /mnt2/share/debian_2006_06_10_dist.tgz
/mnt が / だと思って以下みたいに file を修正.
[/etc/network/interfaces] auto lo iface lo inet loopback iface eth0 inet static address 10.0.0.6 network 10.0.0.0 netmask 255.255.255.0 broadcast 10.0.0.255 gateway 10.0.0.1
ちなみに,
auto eth0 iface eth0 inet dhcp
は,初期(のイメージの)状態では NG っぽい.
[/etc/hosts.allow] ALL : 10.0.0.0/255.255.255.0 ALL : 127.0.0.1 [/etc/resolv.conf] search meganecco.org nameserver 10.0.0.1 # /usr/bin/write_ok
再起動.玄箱で以下.
# /sbin/reboot
失敗した場合は,
裏ボタン長押し→表ボタン長押し→表ボタンを押して起動
して EM モードに.あとは,
# /bin/mount -t ext3 /dev/hda3 /mnt2 # /bin/mount -t ext3 /dev/hda1 /mnt
して設定をいじる.その後,以下で再起動.
# /usr/bin/write_ok # /sbin/reboot
tmp-kun が嫌なので,myn に変更
% su - (pw: root) # vipw myn:x:1000:100:myn the meganecco lover:/home/myn:/bin/bash # vi /etc/shadow tmp-kun を myn に置換 # mkdir /home/myn # chown myn.users /home/myn # passwd myn # passwd (ついでに root の password も変更)
ssh を入れる
# apt-get update # apt-get install ssh
作業用に rsync と less を入れる
# apt-get install rsync # apt-get install less
時間がとちくるっているので ntp を入れる
# apt-get install ntp ntpdate # vi /etc/default/ntp-servers NTPSERVERS="0.debian.pool.ntp.org" # vi /etc/ntp.conf (追記) server 0.debian.pool.ntp.org iburst server 1.debian.pool.ntp.org iburst server 2.debian.pool.ntp.org iburst server 3.debian.pool.ntp.org iburst # /etc/init.d/ntp stop # /etc/init.d/ntpdate start # /etc/init.d/ntp start
NFS の設定
# apt-get install nfs-user-server # apt-get install nfs-common (statd, lockd 用) # vi /etc/export (10.0.0.3 から mount したい場合) /mnt/share 10.0.0.3(rw,async) # /etc/init.d/nfs-user-server stop # /etc/init.d/nfs-user-server start
HDD の性能を見てみる
# apt-get install hdparm # hdparm -t /dev/hda3 /dev/hda3: Timing buffered disk reads: 64 MB in 1.18 seconds = 54.24 MB/sec
玄箱のコンソールで日本語表示ができるようにする
# apt-get install locales # vi /etc/locale.gen ja_JP.EUC-JP EUC-JP # locale-gen
ちなみに,現在 2台動いている状態.
最近 Emacs22 を使いはじめて,
% dpkg -l 'emacs-snapshot*' | grep ^ii ii emacs-snapshot 20061221-1 The GNU Emacs editor (development snapshot) ii emacs-snapshot-bin-common 20061221-1 The GNU Emacs editor's shared, architecture ii emacs-snapshot-common 20061221-1 The GNU Emacs editor's common infrastructure
で,
GNU Emacs 22.0.92.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2006-12-22 on pacem, modified by Debian
みたいな環境なのであるが,なんだか自前の関数の挙動が変だなぁと思ってい たら split-string の挙動が Emacs21 と異っているっぽい.
GNU Emacs 22.0.92.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2006-12-22 on pacem, modified by Debian
(split-string "0123456789" "")
=>("" "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "")
(split-string "0123456789" "" t)
=>("0" "1" "2" "3" "4" "5" "6" "7" "8" "9")GNU Emacs 21.4.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2006-12-04 on raven, modified by Debian
(split-string "0123456789" "")
=>("0" "1" "2" "3" "4" "5" "6" "7" "8" "9")
(split-string "0123456789" "" t)
=>エラー上記の例だとわかりにくいが, たとえば以下だと Emacs22 の (subr.el の) 方が素直な気がする.
Emacs22
(split-string "0 1 2" " ") =>("0" "1" "2")
(split-string " 0 1 2" " ") =>("0" "1" "2")Emacs21
(split-string "0 1 2" " ") =>("0" "1" "2")
(split-string " 0 1 2" " ") =>("" "0" "1" "2")ちなみに関係ないが Ruby の String#split の場合は,
"0 1 2".split(/\s+/) =>["0", "1", "2"]
" 0 1 2".split(/\s+/) =>["", "0", "1", "2"]
"0 1 2".split(" ") =>["0", "1", "2"]
" 0 1 2".split(" ") =>["0", "1", "2"]
みたいな.
vmware-any-any-update105 + Linux 2.6.20-rc2 を試す.
Building for VMware Workstation 4.5.[23] or VMware GSX Server 3.1.0. Using 2.6.x kernel build system. make: ディレクトリ `/tmp/vmware-config0/vmmon-only' に入ります make -C /usr/src/linux/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules make[1]: ディレクトリ `/usr/src/linux' に入ります CC [M] /tmp/vmware-config0/vmmon-only/linux/driver.o In file included from /tmp/vmware-config0/vmmon-only/linux/driver.c:85: /tmp/vmware-config0/vmmon-only/./include/compat_kernel.h:21: error: expected declaration specifiers or '...' before 'compat_exit' /tmp/vmware-config0/vmmon-only/./include/compat_kernel.h:21: error: expected declaration specifiers or '...' before 'exit_code' /tmp/vmware-config0/vmmon-only/./include/compat_kernel.h:21: warning: type defaults to 'int' in declaration of '_syscall1' make[2]: *** [/tmp/vmware-config0/vmmon-only/linux/driver.o] エラー 1 make[1]: *** [_module_/tmp/vmware-config0/vmmon-only] エラー 2 make[1]: ディレクトリ `/usr/src/linux' から出ます make: *** [vmmon.ko] エラー 2 make: ディレクトリ `/tmp/vmware-config0/vmmon-only' から出ます Unable to build the vmmon module.
といった感じで /tmp/vmware-config0/vmmon-only/include/compat_kernel.h でこける.これは, <URL:http://www.vmware.com/community/thread.jspa?messageID=538342> にもあるとおり,compat_kernel.h を
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) static inline _syscall1(int, compat_exit, int, exit_code); +#endif
といった感じの修正をすればいいっぽい.
あと,vmware-any-any-update105 + Linux 2.6.20-rc2 の場合, vmware-any-any-update104 + Linux 2.6.18-git16 の時に必要だった,
[include/linux/types.h] #ifndef __cplusplus typedef _Bool bool; #endif
とかいう include/linux/types.h の修正は不要っぽい.というかむしろ,上 記のようにしていると,
Building for VMware Workstation 4.5.[23] or VMware GSX Server 3.1.0. Using 2.6.x kernel build system. make: ディレクトリ `/tmp/vmware-config0/vmmon-only' に入ります make -C /usr/src/linux/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules make[1]: ディレクトリ `/usr/src/linux' に入ります CC [M] /tmp/vmware-config0/vmmon-only/linux/driver.o CC [M] /tmp/vmware-config0/vmmon-only/linux/hostif.o CC [M] /tmp/vmware-config0/vmmon-only/common/cpuid.o CC [M] /tmp/vmware-config0/vmmon-only/common/hash.o CC [M] /tmp/vmware-config0/vmmon-only/common/memtrack.o CC [M] /tmp/vmware-config0/vmmon-only/common/phystrack.o CC [M] /tmp/vmware-config0/vmmon-only/common/task.o cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++ cc1plus: warning: command line option "-Wno-pointer-sign" is valid for C/ObjC but not for C++ cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ cc1plus: warning: command line option "-ffreestanding" is valid for C/ObjC but not for C++ include/linux/kernel.h:161: error: 'bool_type' does not name a type make[2]: *** [/tmp/vmware-config0/vmmon-only/common/task.o] エラー 1 make[1]: *** [_module_/tmp/vmware-config0/vmmon-only] エラー 2 make[1]: ディレクトリ `/usr/src/linux' から出ます make: *** [vmmon.ko] エラー 2 make: ディレクトリ `/tmp/vmware-config0/vmmon-only' から出ます Unable to build the vmmon module.
といった感じで include/linux/kernel.h でこける.
「Boeing、機内ネットサービスを終了」 等にあるとおり Connexion by Boeing のサービスは年内で終了するのであるが, 実は現在無料で使える状況にあったりする*1.
ということで,先日ヨーロッパから帰国便(LH)で繋ぎ放題をして遊んだ.
ちなみに, 「[WSJ] 機内ネットサービス「Connexion」、再開に向け協議」 という感じで,もしかすると復活するかも.若干期待.
いや,なんというか,いろいろ調べているうちにすっかり混乱して,
PiTaPaカードをお持ちのJALカード(クレジット機能付カード)会員の方限定の 特典です。
というのを忘れて, JAL のマイルを移行する気まんまんで PiTaPa をつくってしまった. しくった. ちなみに JAL のマイルが 10,000 マイルに届かなかった件は ポイントあまり放題の Oki Doki ポイントプログラム で調整した.
仕方なくJALのマイルは「Yahoo!ポイント特典」で
JAL 10,000 マイル = Yahoo!ポイント 10,000 (1万円分; 1年間有効)
で変換.不毛だ...
ちなみになぜか PiTaPa は阪急の(HANA PLUS)にした. これもなぜか不明.非常に混乱していたのだと思う.
当初は京阪にしようとしていたが, 京阪の PiTaPa はクレジットカードと PiTaPa カードが別というやっかいな 代物なので,それは避けて(クレジットとPiTaPaでカードが1枚な) 阪急にしたような気がする. がしかし,はっきり言ってほとんど阪急に乗らない. 今思うと大阪市営地下鉄の PiTaPa にすべきだったような気もする.
ちなみにわざわざ阪急梅田まで行って 窓口で作ってもらった (そこで申し込み用紙に記入して,あとでカードが郵送される仕組なので, 窓口に行く意味はほぼなかった). お姉さん達は「『ピタっ』として頂けると...」という感じで 『ピタっ』というのをマニュアルかなにかで言わされている感じだったので, 私も対抗して窓口でピタピタ言っていたような気がする.
Web から登録(というかアカウント作成したのは),
という感じ.非常にややこしい... あと, PiTaPaグーパス に WILLCOM のメールアドレスが登録できない (AU,DoCoMo,Softbank は当然のように可...).なんだか.
Last-modified: Sun May 11 18:13:31 +0900 2008
*12006年10月2日から年末まで.