SolarisTips



FrontPage > IndexPage > SolarisTips

○Solaris関連
------------------------------------------------------------

■リンク集
謎の処理系
http://www15.big.or.jp/%7Eyamamori/sun/


■Solaris 2 FAQ
http://sdc.sun.co.jp/solaris/solaris2-faq/index.html


■Solaris 9 x86に関するページ
Solaris 9 x86に関するページ
http://www.02.246.ne.jp/~torutk/solaris/solaris9_x86.html


■Solarisのバージョン確認
 % cat /etc/release 


■Solaris DHCP client
http://solaris.sunfish.suginami.tokyo.jp/tips/Solaris_DHCP/dhcp_client.html
-- 
/etc/dhcp.インターフェイス名
/etc/dhcp/インターフェース名.dhc
を削除
-- 

■Solarisのtopコマンド
http://technique.sonots.com/pukiwiki.php?top
解り難いのが以下。
SIZE:メモリ消費量
RES:スワップ消費量
TIME:実行されている時間(実時間ではなくCPU時間)


■ブートシーケンス(起動の過程)を理解する 
http://www.nadosystem.com/solaris8/step2.html


■RCスクリプト(ランレベルコントロール)を理解する 
http://www.nadosystem.com/solaris8/step4.html


■inittabの書式
http://www.alles.or.jp/~inouea/unixtext/unix5.html


■dtloginの再起動
http://park15.wakwak.com/~unixlife/solaris/ins-z505c.html


■Solarisのウィンドウ環境
グラフィカル ログイン画面の種類
http://www15.big.or.jp/~yamamori/sun/boot/boot5.html
 ログイン画面のGUIとログイン・ログアウトの仕組みを提供。
 ログイン後に表示されるウィンドウマネージャーとは
 独立している。
 dtloginでは複数のセッション(ウィンドウマネージャー)を
 選択できる。
・xdm
・gdm
・wdm
・dtlogin
ウィンドウマネージャー
 Xウィンドウの外観やウィンドウ操作を提供するプログラム。
・CDE
・KDE
・qvwm
・twm
・enlightenment
 GNOMEのデフォルトのウィンドウマネージャ。


■OpenwindowsとCDE
OpenWindows?の起動および CDEのインストール
http://www.alles.or.jp/~inouea/unixtext/unix4.html


■Solaris x86で使えるビデオドライバを増やす
Solaris XFree86ビデオドライバ・ポーティングキット
http://jp.sun.com/solaris/intel/xf86kit.html


■Solarisが64ビットか32ビットか見分ける方法
http://solaris.sunfish.suginami.tokyo.jp/SD/9902/
より。

・32/64 ビット 環境の見分け方

実際に利用している環境が 32 ビット あるいは 64 ビット Solaris かを知りた
場合は、isainfo コマンドで確認できます。

64 ビット Solaris 上での isainfo -v の出力
------------------------------------------------------------------------
ultra5$ isainfo -v
64-bit sparcv9 applications
32-bit sparc applications
------------------------------------------------------------------------

32 ビット Solaris 上での isainfo -v の出力
------------------------------------------------------------------------
# isainfo -v
32-bit sparc applications
------------------------------------------------------------------------


 また、ブート時にも確認可能です。
--
32 ビット Solaris
SunOS Release 5.7 Version Generic 64-bit [UNIX(R) System V Release 4.0]

64 ビット Solaris
SunOS Release 5.7 Version Generic [UNIX(R) System V Release 4.0]
--

http://sdc.sun.co.jp/solaris/64solaris/faq.html
-- 
自分のシステムが 32 ビット・アプリケーションと 64 ビット・アプリケーションのどちらを実行できるかを調べる方法はありますか? 
isainfo コマンドを使用できます。 32 ビット・アプリケーションのみ実行可能な SPARC または x86 システム上でこのコマンドを使用すると、その実行結果は次のようになります。 


% isainfo -v

32-bit sparc applications



または



% isainfo -v

32-bit i386 applications

64 ビット版 Solaris が稼働しているシステム上でこのコマンドを使用すると、その実行結果は次のようになります。 


% isainfo -v

64-bit sparcv9 applications

32-bit sparc applications

Solaris 2.6 およびそれ以前のリリースでは、システム上で 'optisa' コマンドを使用してください。 


% optisa

sparc sparcv9
-- 

■Solarisシステム情報
http://www.shoshin.co.jp/computer/antares/support/trace.html
-- 
Solarisのバージョンとリリース(4/02など),ドライバの状態など
# uname -a
# prtdiag -v
# pkginfo -l [ドライバパッケージ名] ドライバの情報 (pkginfo | grep ANTR)
# prtconf -V OpenBoot?のバージョンを表示
# prtconf -v 現在のコンフィギュレーション(直前のリコンフィギュレーションの結果)の状態を表示
# prtconf -pv OpenBoot?から見た現在のコンフィギュレーションの状態を表示
# /usr/platform/`uname -m`/sbin/prtdiag -v システムステータスを表示
# cat /etc/driver_aliases ドライバエリアスを表示
# cat /etc/path_to_inst デバイスインスタンスを表示
-- 

http://www.atmarkit.co.jp/bbs/phpBB/viewtopic.php?topic=29530&forum=10&7
-- 
CPU -> /usr/sbin/psrinfo 

$ psrinfo -v 
Status of processor 0 as of: ........ 
Processor has been on-line since ......... 
The sparcv9 processor operates at 450 MHz, 
and has a sparcv9 floating point processor. 
Status of processor 2 as of: ........ 
Processor has been on-line since ......... 
The sparcv9 processor operates at 450 MHz, 
and has a sparcv9 floating point processor. 

memory -> /etc/prtconf 
$ prtconf | grep Memory 
Memory size: 2048 Megabytes 
-- 


■Solarisのパッケージ管理
http://sy2920.s151.xrea.com/solaris/pkg-get.html
-- 
インストール済みパッケージの一覧表示
書式

pkginfo

出力例

$ pkginfo
system      BOLTpget                         pkg-get
system      CADP160                          Adaptec Ultra160 SCSI Host Adapter Driver
application CSWaudiofile                     audiofile - Silicon Graphics Audio File Library
  .
  .
  .

インストール済みパッケージの詳細表示
書式

pkginfo -l パッケージ名

出力例

$ pkginfo -l CSWpkgget
   PKGINST:  CSWpkgget
      NAME:  pkg_get - CSW version of automated package download tool
  CATEGORY:  system
      ARCH:  all
   VERSION:  3.3.1
   BASEDIR:  /opt/csw
    VENDOR:  http://www.blastwave.org/pkg-get.html packaged for CSW by Philip Brown
      DESC:  A convenient way to automate package installs
    PSTAMP:  speedy20050411201556
  INSTDATE:  6月 29 2005 14:55
   HOTLINE:  http://www.blastwave.org/bugtrack/
     EMAIL:  phil@bolthole.com
    STATUS:  completely installed
     FILES:       11 installed pathnames
                   7 shared pathnames
                   7 directories
                   4 executables
                 113 blocks used (approx)

パッケージがインストールしたファイルリスト表示
書式

pkgchk -v パッケージ名

出力例

$ pkgchk -v CSWpkgget
NOTE: Couldn't lock the package database.
/opt/csw/bin
/opt/csw/bin/pkg-get
/opt/csw/etc
/opt/csw/etc/pkg-get.conf.csw
/opt/csw/share
/opt/csw/share/man
/opt/csw/share/man/man1m
/opt/csw/share/man/man1m/pkg-get.1m
/var
/var/pkg-get
/var/pkg-get/admin-fullauto

ファイルをインストールしたパッケージの調査
書式

pkgchk -l -p ファイルのフルパス

出力例

$ pkgchk -l -p /opt/csw/bin/pkg-get
NOTE: Couldn't lock the package database.
Pathname: /opt/csw/bin/pkg-get
Type: regular file
Expected mode: 0755
Expected owner: root
Expected group: bin
Expected file size (bytes): 49533
Expected sum(1) of contents: 33842
Expected last modification:  4月 12 12時15分34秒 2005
Referenced by the following packages:
        CSWpkgget
Current status: installed


インストール済みパッケージの整合性確認
書式

pkgchk パッケージ名

出力例

$ pkgchk SUNWwgetr
NOTE: Couldn't lock the package database.
ERROR: /etc/wgetrc
    modtime <01/08/05 午後05時36分56秒> expected <06/30/05 午後12時34分10秒> actual
    file size <4002> expected <4138> actual
    file cksum <21300> expected <31754> actual
-- 


■パッチレベル確認
◆Solarisのパッケージ
pkginfo -l

◆パッチレベル
showrev -p


■パッチの入手方法
一般の場合、SunのサイトSunSolve?からダウンロードする。
・SunSolve?
  http://jp.sunsolve.sun.com/pub-cgi/show.pl?target=patches/patch-access
入手にはユーザー名とパスワードが必要。

・Sun ソフトウエアアップデート(パッチ)アクセスの選択肢について
  http://jp.sun.com/service/sunsolve/infodoc/83061.html


■クラッシュダンプ
 システムクラッシュ情報の生成と保存
  http://docs.sun.com/app/docs/doc/805-5855/6j5hahql5?a=view


■テープドライブの設定と使用
http://docs.sun.com/app/docs/doc/805-5649/6j5b636ik?q=Sun+%E5%91%A8%E8%BE%BA%E6%A9%9F%E5%99%A8%E4%BD%BF%E7%94%A8%E3%81%AE%E6%89%8B%E5%BC%95%E3%81%8D&a=view

■ディスク修復
・セクタ異常の例
下記ではセクタ39945のエラーのためセクタ39944の読み取りに失敗している。
Feb 27 20:25:44 pc001 gda: [ID 107833 kern.warning] WARNING: /pci@0,0/pci-ide@1f,1/ide@0/cmdk@0,0 (Disk0):
Feb 27 20:25:44 pc001  Error for command 'read sector' Error Level: Fatal
Feb 27 20:25:44 pc001 gda: [ID 107833 kern.notice]     Requested Block 39944, Error Block: 39945
Feb 27 20:25:44 pc001 gda: [ID 107833 kern.notice]     Sense Key: uncorrectable data error
Feb 27 20:25:44 pc001 gda: [ID 107833 kern.notice]     Vendor 'Gen-ATA ' error code: 0x7

・問題のセクタがあるスライスの特定
formatコマンドでパーティションテーブルを調べる。
パーティションテーブルのBlocksはブロック数=セクタ数。
よって、エラーが出ているセクタが先頭シリンダーから見て何セクタ目かを見れば、どのスライスでエラーが出ているか判る。
format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c0d0 <DEFAULT cyl 32946 alt 2 hd 16 sec 63>
          /pci@0,0/pci-ide@1f,1/ide@0/cmdk@0,0
Specify disk (enter its number): 0
selecting c0d0
Controller working list found
[disk formatted, defect list found]
Warning: Current Disk has mounted partitions.


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        show       - translate a disk address
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> p


PARTITION MENU:
        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' partition
        5      - change `5' partition
        6      - change `6' partition
        7      - change `7' partition
        select - select a predefined table
        modify - modify a predefined partition table
        name   - name the current table
        print  - display the current table
        label  - write partition map and label to the disk
        !<cmd> - execute <cmd>, then return
        quit
partition> p
Current partition table (original):
Total disk cylinders available: 32946 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm    4474 - 12599        3.91GB    (8126/0/0)   8191008
  1       swap    wu       3 -  4066        1.95GB    (4064/0/0)   4096512
  2     backup    wm       0 - 32945       15.84GB    (32946/0/0) 33209568
  3 unassigned    wm       0                0         (0/0/0)            0
  4 unassigned    wm       0                0         (0/0/0)            0
  5 unassigned    wm       0                0         (0/0/0)            0
  6 unassigned    wm   12600 - 32945        9.78GB    (20346/0/0) 20508768
  7       home    wm    4068 -  4473      199.83MB    (406/0/0)     409248
  8       boot    wu       0 -     0        0.49MB    (1/0/0)         1008
  9 alternates    wu       1 -     2        0.98MB    (2/0/0)         2016

・問題のセクタの表面検査
エラーが発生したセクタの範囲を特定する。
bash-2.05# grep Requested /var/adm/messages | cut -f5 -d: | sort | uniq -c
   5  38088
   1  38210
   4  38211
  10  38304
  10  38320
   5  38328
   1  38345
  49  38346
   1  38352
   9  38353
  10  38464
   5  38472
  15  38592
  10  38689
   5  38784
  10  39745
  15  39800
  15  39912
  10  39945
   1  40072

formatコマンドのanalyzeメニューで表面検査


■スワップ空間、スワップスライス、スワップファイル
スワップ空間の追加
http://docs.sun.com/app/docs/doc/819-0386/6n2qla4ja?a=view
スワップ空間の割り当て方法
http://docs.sun.com/app/docs/doc/819-0386/6n2qla4j7?a=view
 スワップファイルが入っているファイルシステムは、スワップファイルが有効になる前にマウントしておかなければなりません。このため、/etc/vfstab ファイル内で、ファイルシステムをマウントするエントリが、スワップファイルを有効にするエントリより前に入っていることを確認してください。
スワップ空間について
http://docs.sun.com/app/docs/doc/819-0386/6n2qla4j5?a=view
スワップリソースの監視
http://docs.sun.com/app/docs/doc/819-0386/6n2qla4j9?a=view


[PR]嬰務霑:lH棆棆FHff