Chinaunix

标题: 请教有没有用命令行的方式就能提取硬盘串号的 [打印本页]

作者: kelgoo    时间: 2012-05-18 13:32
标题: 请教有没有用命令行的方式就能提取硬盘串号的
dmesg和machinfo好像不能显示出来,先谢过了
作者: Proceed    时间: 2012-05-18 15:11
-bash-4.2# cstm
Running Command File (/usr/sbin/stm/ui/config/.stmrc).

-- Information --
Support Tools Manager


Version D.04.00

Product Number B4708AA

(C) Copyright Hewlett Packard Co. 1995-2008
All Rights Reserved

Use of this program is subject to the licensing restrictions described
in "Help-->On Version".  HP shall not be liable for any damages resulting
from misuse or unauthorized use of this program.

cstm>info
     ^-- (Information) is currently disabled. --

cstm>map
                                     rx2660a

  Dev                                                 Last        Last Op      
  Num  Path                 Product                   Active Tool Status      
  ===  ==================== ========================= =========== =============
    1  system               system (1022)                                      
    2  memory               IPF_MEMORY (1022)                                 
    3  0                    Bus Adapter (103c4030)                             
    4  0/0                  PCI Bus Adapter (103c122e                          
    5  0/0/1/0              PCI class (103c1303)                              
    6  0/0/1/1              PCI SimpleComm (103c1302)                          
    7  0/0/1/2              RS-232 Interface (103c104                          
    8  0/0/2/0              USB Open Host Controller                           
    9  0/0/2/0.0            Generic USB Interface (30                          
   10  0/0/2/1              USB Open Host Controller                           
   11  0/0/2/1.0            Generic USB Interface (31                          
   12  0/0/2/1.0.0          USB Mass Storage (USBBulk                          
   13  0/0/2/1.0.16         USB to SCSI Bus Adaptor (                          
   14  0/0/2/2              USB Enhanced Host Control                          
   15  0/1                  PCI Bus Adapter (103c122e                          
   16  0/1/1/0              SAS Adapter (SAS Adapter)                          
   17  0/1/1/0.0.0.0.0      SCSI Disk (HPDG146BAAJB)                           
   18  0/1/1/0.0.0.1.0      SCSI Disk (HPDG146BAAJB)                           
   19  0/1/2/0              PCI Gigabit Ethernet Link                          
   20  0/1/2/1              PCI Gigabit Ethernet Link                          
   21  0/2                  PCI Bus Adapter (103c12ee                          
   22  0/3                  PCI Bus Adapter (103c12ee                          
   23  0/3/1/0              Fibre Channel Interface (                          
   24  0/3/1/0.1            FCP Domain (Mass_Storage)                          
   25  0/3/1/***0.255.0.0.0 SCSI Disk (IBM1722-600)                           
   26  0/3/1/***1.255.0.0.0 SCSI Disk (IBM1722-600)                           
   27  0/3/1/0.1.4.255.0.0  Virtual Array 7110 (HPA61                          
   28  0/3/1/0.1.7.255.0.0  Virtual Array 7110 (HPA61                          
   29  0/4                  PCI Bus Adapter (103c12ee                          
   30  0/4/1/0              PCI Gigabit Ethernet Link                          
   31  120                  CPU (1022)                                         
   32  121                  CPU (1022)                                         
   33  250                  Core I/O Adapter (fffffff                          
   34  250/0                IPMI Controller (49504930                          
   35  250/1                RS-232 Interface (504e503                          
   36  250/2                ACPI Device (41435049)                             
cstm>sel device 17
cstm>info
-- Updating Map --
Updating Map...
cstm>il
-- Converting a (124 byte raw log file to text. --
Preparing the Information Tool Log for SCSI Disk on path 0/1/1/0.0.0.0.0 File
...

.... rx2660a  :  192.168.1.26 ....

-- Information Tool Log for SCSI Disk on path 0/1/1/0.0.0.0.0 --

Log creation time: Fri May 18 01:10:00 2012

Hardware path: 0/1/1/0.0.0.0.0


Product Id:       DG146BAAJB        Vendor:           HP      
Device Type:      SCSI Disk         Firmware Rev:     HPDA
Device Qualifier: HPDG146BAAJB      Logical Unit:     0
Serial Number:            P4W5ALJA
Capacity (M Byte):          140014.41
   Block Size:              512
   Max Block Address:       286749487
Error Logs  
   Read Errors:                0    Buffer Overruns:        N/A   
   Read Reverse Errors:      N/A    Buffer Underruns:       N/A   
   Write Errors:               0    Non-Medium Errors:        1   
   Verify Errors:              0
-- Information Tool Log for SCSI Disk on path 0/1/1/0.0.0.0.0 --
View   - To View the file.
Print  - To Print the file.
SaveAs - To Save the file.
Enter Done, Help, Print, SaveAs, or View: [Done]
作者: lbseraph    时间: 2012-05-18 16:45
LS正解,加分。
作者: kelgoo    时间: 2012-05-24 12:20
回复 2# Proceed


    谢谢回复,试了,cstm不能运行,我的系统是HP-UX B.11.11,是这个原因吗
作者: lbseraph    时间: 2012-05-24 13:01
cstm不能运行那是cstm有问题,报错是什么(最好把你主机运行cstm的输出贴上来)?先确认域名解析有没有问题吧,很多时候这个也会导致cstm运行不了的。
作者: tangye    时间: 2012-05-24 13:56
cstm看到的设备信息应该是最详细的了
作者: kelgoo    时间: 2012-06-13 18:05
tangye 发表于 2012-05-24 13:56
cstm看到的设备信息应该是最详细的了


这个命令在我的系统上不能执行
# cstm
sh: cstm:  not found.
且 # find / -name cstm 也不能找到这个命令

我的系统是B.11.23 U 9000/800
作者: tangye    时间: 2012-06-13 22:37
root不能运行cstm?啥硬件平台?
作者: n1164_30    时间: 2012-06-21 16:20
kelgoo 发表于 2012-05-24 12:20
回复 2# Proceed


把CSTM服务重启下应该就可以了,

通过ps -ef|grep diagmond查看。

正常显示结果如下:ps -ef|grep diagmond

    root 22910     1  0 17:08:40 ?         0:01 /usr/sbin/stm/uut/bin/sys/diagmond
    root 25128 25100  1 17:42:01 pts/tb    0:00 grep diagmond

如果没有第一个进程,可以考虑重起进程。
#/sbin/init.d/diagnostic stop
#/sbin/init.d/diagnostic start.
作者: kelgoo    时间: 2012-07-27 16:49
n1164_30 发表于 2012-06-21 16:20
把CSTM服务重启下应该就可以了,

通过ps -ef|grep diagmond查看。


多谢,这套HP-UX不是官方原装的系统,没有CSTM这个程序,难怪不能运行

能不能在哪里下载到这个程序的安装包啊
作者: lbseraph    时间: 2012-07-27 19:04
回复 10# kelgoo

https://h20392.www2.hp.com/porta ... ductNumber=B6191AAE
作者: ulovko    时间: 2012-07-27 19:53
dmidecode不晓得可以不?
  1. dmidecode | grep -A5 -B5 -i 'serial number' | more
复制代码





欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2