2010年5月16日 星期日

2009年7月21日 星期二

RedHat安裝driver

Qlogic qla2462 HBA card為例,當driver安裝好之後
driver moduler放在
/lib/modules/$(uname -r)/kernel/drivers/qla2xxx
 
編輯/etc/modprobe.conf
example:
alias scsi_hostadapter3 qla2400
 
重新建立inital ram disk,重新開機時載入qla2462的driver moduler
# cd /boot
# mkinitrd -v initrd-$(uname -r).img $(uname -r)

手動載入qla2462 moduler
# modprobe -v qla2400
 
卸載qla2462 moduler
# modeprobe -r qla2400
 
如果driver安裝後,driver moduler無法載入kernel,可能是driver compiler時的platform不同
,必須要重新compiler driver。
如果有已經安裝好driver的相同機型,則直接將qla2xxx的目錄複製過來即可。

2009年7月14日 星期二

如何查出PCI Devices的vendor &

在此以solaris做例子:
根據文件How can I determine/identify what Host Bus Adapter (HBA) is installed in a Solaris server?我們可以查出PCI Devices vendor ID跟device ID
=================================================================
# prtpicl -v
:name pci
 SUNW,qlc (scsi-fcp, 1a40000041e)
  :_fru_parent (1a400000bcfH)
  :DeviceID 0x1
  :UnitAddress 1
  :vendor-id 0x1077
  :device-id 0x2422
  :revision-id 0x2
  :subsystem-vendor-id 0x1077
  :subsystem-id 0x141
  :class-code 0xc0400
  :cache-line-size 0x10
  :interrupts 00 00 00 01
  :min-grant 0x40
  :max-latency 0
  :latency-timer 0x40
  :devsel-speed 0x1
  :66mhz-capable
  :fcode-rom-offset 0xaa00
  :device_type scsi-fcp
  :#address-cells 0x2
  :#size-cells 0
  :short-version 1.11 10/03/05
  :compatible (1a40000044aTBL)

=================================================================
這裡我們可以看到Vendor ID是1077,Device ID是2422
然後到The PCI ID Repository去查出1077是屬於哪家vendor
最後查出的結果如下:
http://pci-ids.ucw.cz/read/PC/1077/2422

Main -> PCI Devices -> Vendor 1077 -> Device 1077:2422

Name: ISP2422-based 4Gb Fibre Channel to PCI-X HBA

Discussion

Name: QLA2422 Fibre Channel Adapter

andrew.vasquez

2005-11-22 20:01:17

Name: QLA246x / QMx246x: 4Gb Fibre Channel to PCI-X HBAs / Mezzanine Cards

current entry for "name" is incorrect

sameer.shurpalekar

2006-09-25 20:18:31

Name: ISP2422-based 4Gb Fibre Channel to PCI-X HBAs (QLA246x/QMx246x)

current entry is inaccurate and OEMs/customers are requesting that we include HBA model names to make it easier for end users to identify the HBAs more easily.

sameer.shurpalekar

2006-10-04 08:12:47

Name: ISP2422-based 4Gb Fibre Channel to PCI-X HBA

current entry is inaccurate

sameer.shurpalekar

2006-10-05 15:17:59

Discuss


因此最後我們知道,這張PCI卡是Qlogic的246x
另外從subsystem-id:141,可以精確的得知,卡片型號是:
SG-XPCI2FC-QF4

另一個查詢PCI的網頁
PCIDatabase.com

2009年6月26日 星期五

Solaris修改Time Zone

http://sysunconfig.net/unixtips/timezone.txt

Problem
-------
How do I change the timezone on my Solaris server/workstation?

Solution
--------
a) Edit /etc/TIMEZONE
NOTE: the man page incorrectly states this file is called /etc/timezone
b) Reboot your server with shutdown or init.


Examples
--------
US/Eastern
US/Central
US/Mountain
US/Pacific

For the full list, look in:
/usr/share/lib/zoneinfo/

UNIX memconf utility

有這個工具,以後記憶體故障,就可以明確的知道要換哪一條了。

UNIX memconf utility

perl script that displays memory modules installed in a Sun Solaris, Linux or HP-UX system.
Usage: memconf [ -v | -D | -h ] [ explorer_dir ]
-v verbose mode
-D send results to memconf maintainer
-h print help

explorer_dir Sun Explorer output directory

2009年6月15日 星期一

效能分析工具dim_STAT

Dimitri (dim) Tools HOMEPAGE




安裝方式:
  # cd /tmp
# tar xvf /path_to_tar/dim_STAT.tar
# cd dim_STAT-INSTALL
# ./INSTALL.sh
程式會安裝在以下路徑:
+ /WebX, /opt/WebX or /etc/WebX - WebX main directory (only three possibilities)
|
+ /apps - default dim_STAT home directory
|
+-- /ADMIN - administration scripts (start/stop dim_STAT Server, BatchLOAD, etc.)
|
+-- /mysql - MySQL database server main directory
|
+-- /httpd - Apache Web server directory
|
+-- /client - client collect script(s)
|
+-- /Java2GIF - Java applet graph to GIF convertor
|
+-- /htmldoc - HTML to PDF converting tool
|
+-- ... - there may be other directories depending on dim_STAT release :))
如果全部套用預設值,可以使用下面的指令安裝(Silent INSTALL)
# ./INSTALL.sh -Auto yes

安裝完之後,我們可以開始啟動Service
# cd /apps/ADMIN
# dim_STAT-Server start

MySQL的DB安裝好之後,我們要開始安裝收集資料的agent
# /tmp/dim_STAT-INSTALL/STAT-service
# pkgadd -d STATsrv.pkg
安裝到下面的路徑:
/etc/STATsrv/
STAT-service -- script to start/stop service daemon, also defines port number to listen (def:5000)
access -- access control file
/bin -- contains extended STAT programs/scripts
/log -- contains all logged information about service demands
啟動service daemon
# /etc/STATsrv/STAT-service start

最後開啟網頁就可以了。