トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS


Link

ブートローダー

Disk管理

チューニング

  • メモリオーバーコミット(Kernel 2.6 uppper)
    メモリが逼迫した状況でも、memory overcommit によるプロセスの突然死を起こしたくな い状況ではproc/sys/vm/overcommit_memory を "2" にし、
    かつ overcommit_ratio を調整して "malloc_limit"値 が物理メモリ量を超えないようにすれば良い
    malloc_limit[MB]= swap領域のサイズ[MB] + (物理メモリ量[MB] * overcommit_ratio / 100)
     
    # sysctl -w vm.overcommit_ratio=99
    # sysctl -w vm.overcommit_memory=2

Kernel Build

インテル® PRO/1000 シリーズアダプター

http://support.intel.co.jp/jp/support/network/adapter/1000/linux_readme.htm

  • ジャンボフレーム(MTUサイズの増加)
    通常、EtherのMTUサイズは1500Byteであるが、gigabit ether netwoarkにおいてはMTUサイズを増加させることでパフォーマンス向上を図ることができる。
    ただし、以下のGigabit Ethernet AdapterはJumbo Frameをサポートしない。82566MMThinkPad T61, X61に搭載される。
    • Intel® 82562V 10/100 Network Connection
    • Intel® 82566DM Gigabit Network Connection
    • Intel® 82566DC Gigabit Network Connection
    • Intel® 82566MM Gigabit Network Connection
    • Intel® 82566MC Gigabit Network Connection
    • Intel® 82562GT 10/100 Network Connection
    • Intel® 82562G 10/100 Network Connection
      http://support.intel.com/support/network/sb/CS-009209.htm#jumbo_frames
手動でのMTUサイズ変更(mtuサイズを9014byteに変更する場合)
# /sbin/ifconfig eth0 mtu 9014 up

また、/etc/sysconfig/network-script/ifcfh-eth0に記述ることで対応が可能である。

追加する設定値(mtuサイズを9014byterに変更する場合)
MTU=9014

MTUサイズはifconfigコマンドで確認できる。

# /sbin/ifconfig eth0
  • ネゴシエーション設定
    リンクスピードを固定化する場合などの設定はモジュールのオプションで行う。
    Duplex
    値範囲:0-2 (0=auto-negotiate、1=half、2=full)
    デフォルト値:0
     
    Speed
    値範囲:0、10、100、1000(0=auto-negotiate)
     
    FlowControl
    値範囲:0-3 (0=none、1=Rx only、2=Tx only、3=Rx&Tx)
    /etc/modprobe.conf例(複数インターフェースを持つ場合はカンマで列挙する)
    eth0はオートネゴシエート、eth1は100Mbps全2重で固定する場合
    eth0 e1000
    eth1 e1000
    options e1000 Speed=0,100 Duplex=0,2
    設定内容はethtoolで確認できる。
    # ethtool eth0

ユーザーID管理のメモ

# chage
Usage: chage [-l] [-m min_days] [-M max_days] [-W warn]
       [-I inactive] [-E expire] [-d last_day] user
# usermod
使用法: usermod [-u ユーザID [-o]] [-g グループ] [-G グループ,...]
               [-d ホーム [-m]] [-s シェル] [-c コメント] [-l 新規ユーザ名]
               [-f 無効日数] [-e 期限切れ日 ] [-p パスワード] [-L|-U] ユーザ名
  • /etc/shadowファイルのフォーマット
    username:passwd:last:may:must:warn:expire:disable:reserved
    usernamepasswdlastmaymustwarnexpiredisablereserved
    ユーザ名エンコードされたパスワード1970年1月1日から、パスワードが最後に更新された日までの日数何日前にパスワードが変更されたと思われるかパスワードを変更しなければならない期限パスワードの期限切れの何日前にユーザに警告するかパスワード期限切れの何日後にアカウントを抹消するか1970年1月1日から、アカウントが抹消された日までの日数予約フィールド
  • ロック
    • 状況表示
      # faillog -u username
    • ロックの解除
      # faillog -r username

Channel Bonding

http://mikilab.doshisha.ac.jp/dia/research/person/atsushi/bonding1.html

RPMのエラー

  • キャッシュファイルが損傷した
    # apt-get update 
    取得:1 http://updates.vinelinux.org 4.1/i386 release [2254B]
    2254B を 0s 秒で取得しました (15.4kB/s) 
    取得:1 http://updates.vinelinux.org 4.1/i386/main pkglist [286kB]
    取得:2 http://updates.vinelinux.org 4.1/i386/main release [158B]
    取得:3 http://updates.vinelinux.org 4.1/i386/plus pkglist [484kB]
    取得:4 http://updates.vinelinux.org 4.1/i386/plus release [166B]
    取得:5 http://updates.vinelinux.org 4.1/i386/updates pkglist [47.0kB]
    取得:6 http://updates.vinelinux.org 4.1/i386/updates release [169B]
    取得:7 http://updates.vinelinux.org 4.1/i386/nonfree pkglist [5713B]
    取得:8 http://updates.vinelinux.org 4.1/i386/nonfree release [169B]
    取得:9 http://updates.vinelinux.org 4.1/i386/main srclist [121kB]
    取得:10 http://updates.vinelinux.org 4.1/i386/plus srclist [199kB]
    取得:11 http://updates.vinelinux.org 4.1/i386/updates srclist [10.4kB]
    取得:12 http://updates.vinelinux.org 4.1/i386/nonfree srclist [10.1kB]
    1164kB を 2s 秒で取得しました (389kB/s)
    セグメンテーション違反ですでいます... 0%
    対応-キャッシュファイルを削除する。
    [root@inasa apt]# mv /var/cache/apt/pkgcache.bin /tmp/
    [root@inasa apt]# mv /var/cache/apt/srcpkgcache.bin /tmp/
  • RPM DBが損傷した
    表示されるメッセージ例
    rpmdb: PANIC: fatal region error detected; run recovery
    error: db4 error(-30977) from db->get: DB_RUNRECOVERY: Fatal error, run database recovery
    対応
    # mv /var/lib/rpm/__db.001 /tmp
    # mv /var/lib/rpm/__db.002 /tmp
    # mv /var/lib/rpm/__db.003 /tmp
    # rpm --rebuilddb

Tips

  • HDDのパーティションにラベルを付ける
    # e2label /dev/hdaxx /labelname
  • RAM tmpファイルシステムを使う
    ファイルシステムタイプ tmpfsはメモリ上に展開される。/dev/shmにマウントされる。
    実際にファイルI/Oに使うには下記のようにマウントする。(/tmpに32MB RAM上から割り当てられる)
    サイズ指定しない場合は実メモリの半分が割り当てられる。
    # mount -t tmpfs -o size=32m tmpfs /tmp
    /etc/fstabにも記述可能。
    /dev/shm             /tmp                    tmpfs    defaults,size=64m        0 0
  • シリアルコンソール化
    • inittabの追記
      co:2345:respawn:/sbin/agetty -h 115200 ttyS0 vt100
    • liloの修正
      カーネル指定のappendオプションに次を追加
      console=tty0 console=ttyS0,115200
    • kuduzuの更新停止
      # vi /etc/sysconfig/kudzu
      SAFE=yes
    • シリアルコンソールのログイン許可
      /etc/securettyにttyS0を追加
      http://www.shoshin.co.jp/c/lsi/scs/faqlinux.html

Counter: 8265, today: 1, yesterday: 0