2008-01-23 Wed
壊れたHDDからデータを取出す方法
- 準備
umount して作業する.
起動しない,または umount できなければ,別PCに接続して作業する.
- ddコマンドの実行
/dev/hdb3 を hdb3.imgにイメージファイルとして保存する.
# dd if=/dev/hdb3 of=hdb3.img bs=512 conv=noerror,sync
- イメージファイルにfsck
$ fsck hdb3.img
- エラー修復後のイメージファイルをマウントする
# mount -o
- Reference
ぴょぴょぴょ? - 壊れたHDDからデータを取出す方法
http://d.hatena.ne.jp/pyopyopyo/20061118/p1
2008-01-23 Wed
Linuxでネットワークスループットを改善する
- /etc/sysctl.conf
net.ipv4.tcp_window_scaling = 1 net.ipv4.tcp_syncookies = 1 net.core.rmem_max = 16777216 net.core.wmem_max = 16777216 net.ipv4.tcp_rmem = 4096 87380 16777216 net.ipv4.tcp_wmem = 4096 65536 16777216
- sysctlのすべての項目と値を表示
# sysctl -a
- sysctlの項目を指定して表示
# sysctl -q net.ipv4.tcp_window_scaling
- rebootしないで有効化
# sysctl -p /etc/sysctl.conf
- 項目を指定して有効化 (rebootで元に戻る)
# sysctl -w net.ipv4.tcp_window_scaling=1
- Reference
builder by ZDNet Japan - Linuxのネットワークスループット改善法教えます
http://builder.japan.zdnet.com/news/story/0,3800079086,20365515,00.htm
2007-11-06 Tue
vsftpd で接続ユーザ制限
- /etc/vsftpd/vsftpd.conf
# /etc/vsftpd.user_listを使用しない # /etc/vsftpd.ftpusersで指定したユーザを拒否する userlist_enable=NO # /etc/vsftpd.user_listで指定したユーザのみログインを許可する # /etc/vsftpd.ftpusers で指定したユーザは,認証でエラーとなる userlist_enable=YES userlist_deny=NO # /etc/vsftpd.user_listで指定したユーザのみログインを拒否する. # /etc/vsftpd.user_listで指定されていないユーザはログインを許可する. # /etc/vsftpd.ftpusers で指定した場合,パスワードの入力は求められるが,接続は拒否する userlist_enable=YES userlist_deny=YES
- Reference
vsftpd(RedHat9)
http://www.aritia.org/hizumi/dsl/page_23.htm
2006-11-24 Fri
削除したファイルをlsofで復元する
- Reference
Open Tech Press | 削除したファイルをlsofで復元する
http://opentechpress.jp/developer/article.pl?sid=06/11/23/0451251
Linux.com | CLI Magic: lsof
http://enterprise.linux.com/article.pl?sid=05/10/21/004255&tid=89
2006-11-22 Wed
coLinux まとめサイト
- Reference
Cooperative Linux
http://www.colinux.org/
Cooperative Linux(coLinux)のメモ
http://scratchpad.fc2web.com/colinux/
ERROR STORM
http://www.geocities.jp/error_storm/
2006-09-08 Fri
FreeNX - リモートデスクトップ
- apt-line
/etc/apt/sources.list
deb http://kanotix.com/files/debian unstable main
- Install
# apt-get install freenx
- Setup
# nxsetup --install
- Reference
FreeNX - the free NX
http://freenx.berlios.de/
NoMachine NX - Download the NX Terminal Server and Remote Access Software
http://www.nomachine.com/download.php
FreeNX - PukiWiki
http://tidus.ultimania.org/wiki/index.php?FreeNX
@IT - FreeNXでLinuxをリモート操作するには
http://www.atmarkit.co.jp/flinux/rensai/linuxtips/926usefreenx.html
Ubuntu Japanese Team - 2005-07-29 - NoMachine NX ClientとFreeNXを利用したシンクライアントシステム
http://www.ubuntulinux.jp/News/News20050729/
- via
GIGAZINE - 2006-09-08 - VNCよりも高速で遠隔操作できる「FreeNX」
http://gigazine.net/index.php?/news/comments/20060908_freenx/
2006-09-01 Fri
find + xargs で大量のファイルの中から文字列を検索する
- Summary
*.c の中から文字列 "hoge" を検索するには,
% find . -name \*.c -pring | xargs grep hoge
- Reference
Landspace - 2003-11-07 - find + xargs と find -exec の使い分け
http://sonic64.com/2003-11-07.html
UNIXの部屋 - find の検索結果
http://x68000.startshop.co.jp/~68user/unix/pickup?find
2006-08-27 Sun
Linuxディストリビューションの系統図
- via
GIGAZINE - 2006-08-27 - Linuxディストリビューションの系統図
http://gigazine.net/index.php?/news/comments/20060827_linux_distributions/
2006-08-24 Thu
Linux で安価なロードバランサ構築方法
- Reference
DSAS開発者の部屋 - 2006-08-24 - こんなに簡単! Linuxでロードバランサ (1)
http://dsas.blog.klab.org/archives/50664843.html
2006-08-04 Fri
Linux Command Line Tips - Linux コマンドのCheet Sheet
- Reference
Linux Command Line Tips
http://www.pixelbeat.org/cmdline.html
2006-07-14 Fri
todo.sh - ターミナルでToDo管理
- Summary
- Reference
Todo.txt - Task tracking for command line lovers
http://todotxt.com/
- via
MYCOMジャーナル - ターミナルでTODO管理 - todo.sh 1.6
http://journal.mycom.co.jp/news/2006/07/05/345.html
phpspot開発日誌 - 2006-07-14 - ターミナルでTODO管理する:todo.sh
http://phpspot.org/blog/archives/2006/07/todotodosh.html
2006-07-03 Mon
BackTrack - Whax + Auditor
- Summary
SLAXベースの1CD Linux.
クラックツールが満載.
- Reference
Remote-exploit.org - BackTrack
http://www.remote-exploit.org/index.php/BackTrack
Remote-exploit.org - Auditor
http://www.remote-exploit.org/index.php/Auditor
2006-06-23 Fri
lm-sensors でハードウェアモニタリング
- Summary
lm-sensors でCPU,M/B,電圧,FANの回転数などの情報が取得可能.
- Install
# aptitude install lm-sensors
- Setting
# /usr/sbin/sensors-detect
This program will help you determine which I2C/SMBus modules you need to
load to use lm_sensors most effectively. You need to have i2c and
lm_sensors installed before running this program.
Also, you need to be `root', or at least have access to the /dev/i2c-*
files, for most things.
If you have patched your kernel and have some drivers built in, you can
safely answer NO if asked to load some modules. In this case, things may
seem a bit confusing, but they will still work.
It is generally safe and recommended to accept the default answers to all
questions, unless you know what you're doing.
We can start with probing for (PCI) I2C or SMBus adapters.
You do not need any special privileges for this.
Do you want to probe now? (YES/no): yes
長々とメッセージが出ただけだった.
Probing for PCI bus adapters...
Use driver `i2c-viapro' for device 00:11.0: VIA Technologies VT8237 South Bridge
Probe succesfully concluded.
As you are not root, we can't load adapter modules. We will only scan
already loaded adapters.
If you have undetectable or unsupported adapters, you can have them
scanned by manually loading the modules before running this script.
To continue, we need module `i2c-dev' to be loaded.
If it is built-in into your kernel, you can safely skip this.
i2c-dev is not loaded. As you are not root, we will just hope you edited
`/etc/modules.conf' for automatic loading of
this module. If not, you won't be able to open any /dev/i2c-* file.
We are now going to do the adapter probings. Some adapters may hang halfway
through; we can't really help that. Also, some chips will be double detected;
we choose the one with the highest confidence value in that case.
If you found that the adapter hung after probing a certain address, you can
specify that address to remain unprobed. That often
includes address 0x69 (clock chip).
Some chips are also accessible through the ISA bus. ISA probes are
typically a bit more dangerous, as we have to write to I/O ports to do
this. This is usually safe though.
As you are not root, we shall skip this step.
Some Super I/O chips may also contain sensors. Super I/O probes are
typically a bit more dangerous, as we have to write to I/O ports to do
this. This is usually safe though.
As you are not root, we shall skip this step.
Sorry, no chips were detected.
Either your sensors are not supported, or they are
connected to an I2C bus adapter that we do not support.
See doc/FAQ, doc/lm_sensors-FAQ.html, or
http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/doc/lm_sensors-FAQ.html
(FAQ #4.24.3) for further information.
If you find out what chips are on your board, see
http://secure.netroedge.com/~lm78/newdrivers.html for driver status.
- 実行してみる
$ sensors
Can't access procfs/sysfs file
Unable to find i2c bus information;
For 2.6 kernels, make sure you have mounted sysfs and done
'modprobe i2c_sensor'!
For older kernels, make sure you have done 'modprobe i2c-proc'!
- 再チャレンジ
# modprobe i2c-viapro
# sensors
No sensors found!
... センサーが見つかりませんでした.
- Reference
ずんWiki - lm-sensorsでハードウェアモニタリング
http://www.kawaz.jp/pukiwiki/?lm-sensors%A4%C7%A5%CF%A1%BC%A5%C9%A5%A6%A5%A7%A5%A2%A5%E2%A5%CB%A5%BF%A5%EA%A5%F3%A5%B0
2006-06-23 Fri
Temperature above threshold
- Summary
突然,ターミナルに以下のメッセージが表示された.
Message from syslogd@hostname at Fri Jun 23 21:54:41 2006 ...
hostname kernel: CPU0: Temperature above threshold
Message from syslogd@hostname at Fri Jun 23 21:54:41 2006 ...
hostname kernel: CPU0: Running in modulated clock mode
Message from syslogd@hostname at Fri Jun 23 21:54:47 2006 ...
hostname kernel: CPU0: Temperature above threshold
Message from syslogd@hostname at Fri Jun 23 21:54:47 2006 ...
hostname kernel: CPU0: Running in modulated clock mode
原因はCPU温度が高すぎたため.
CPU温度は64度だった.
- Reference
Fedora JP 掲示板 - GNOMEターミナルおかしいです...
http://bbs.fedora.jp/read.php?FID=3&TID=1241
2006-06-19 Mon
gt5 - 豪華版 du
- Summary
ディスク容量を表示するソフトウェア du の豪華版.
du の出力結果を色付けし,パーセント表示が行える.
- Reference
MOONGIFT - gt5
http://oss.moongift.jp/intro/i-1922.html
MOONGIFT - gt5 レビュー
http://oss.moongift.jp/review/i-1923.html
2006-06-17 Sat
afio + gzipでバックアップ
- Reference
なぜ tar+gzip はよくないか?
http://www.linux.or.jp/JF/JFdocs/Backup-mini-HOWTO/tar-gz.html
2006-06-15 Thu
設定ファイルをまとめて管理する
- Reference
設定ファイルをまとめて管理する
http://playrecord.org/archive/config-files-on-Unix/myconf.html
uyota 匠の一手 - 2006-03-19 - Single System, Multiple Machines
http://uyota.asablo.jp/blog/2006/03/19/294745
uyota 匠の一手 - 2006-03-20 - Single System, Multiple Machines #2
http://uyota.asablo.jp/blog/2006/03/20/296243
- via
void GraphicWizardsLair( void ); // /etcや/usr/local/etcなどを一カ所で管理するテクニック
http://www.otsune.com/diary/2006/06/12/3.html#200606123
2006-06-12 Mon
ペンギンの杜 - Linuxソフトライブラリ
- Summary
PukiWiki で構築されたLinuxソフトライブラリ.
- Reference
ペンギンの杜 - Linuxソフトライブラリ
http://www.ut-info.com/linux-soft/
2006-06-07 Wed
irqbalance - マルチCPU環境で複数CPU割り込みを行うためのツール
- Summary
Linux Kernelは本来,CPU0のみがハードウエアからの割り込みを処理するが,
irqbalanceを導入することで,マルチCPU環境で2nd CPU以降も割り込み処理を行えるようになる.
1CPUのマシンでは使用する意味は無い.
以下を実行し,複数のCPUが表示されればOK.
% cat /proc/interrupts
- 2CPUの場合の例
CPU0 CPU1
0: 8470386 8463949 IO-APIC-edge timer
1: 3 3 IO-APIC-edge keyboard
2: 0 0 XT-PIC cascade
8: 1 0 IO-APIC-edge rtc
11: 0 0 IO-APIC-level usb-ohci
12: 93 47 IO-APIC-edge PS/2 Mouse
14: 64 0 IO-APIC-edge ide2
17: 70903 15277 IO-APIC-level ide0
19: 1944132 0 IO-APIC-level eth0
NMI: 0 0
LOC: 16934242 16934259
ERR: 0
MIS: 1
- 1CPUの場合の例
CPU0
0: 2609483773 IO-APIC-edge timer
1: 9 IO-APIC-edge i8042
9: 0 IO-APIC-level acpi
14: 3287084 IO-APIC-edge ide0
15: 1 IO-APIC-edge ide1
201: 5996744 IO-APIC-level eth0
NMI: 0
LOC: 2609834207
ERR: 0
MIS: 0
- Reference
技術情報ツリー
http://h50221.www5.hp.com/cgi/service/knavi/production/doc_disp.cgi?category=722&doc=jnav004182