在 Oracle® Solaris 11.2 中管理系统信息、进程和性能

退出打印视图

更新时间: 2014 年 9 月
 
 

用于显示系统信息的命令

表 1-1  用于显示系统信息的命令
命令
显示的系统信息
手册页
date
日期和时间
hostid
主机 ID 号
isainfo
正在运行的系统中本机应用程序所支持的位数,该位数可以作为标记传递给脚本
isalist
处理器类型
prtconf
系统配置信息,已安装的内存、设备属性和产品名称
prtdiag
系统配置和诊断信息,包括任何发生故障的现场可更换单元 (Field Replaceable Unit, FRU)
psrinfo
处理器信息
uname
操作系统名称、发行版、版本、节点名称、硬件名称和处理器类型

显示系统的发行版信息

显示 /etc/release 文件的内容,以确定发行版的版本。

$ cat /etc/release

显示日期和时间

要根据系统时钟显示当前的日期和时间,请使用 date 命令。

以下示例显示 date 命令的样例输出。

$ date
Fri Jun  1 16:07:44 MDT 2012
$

显示系统的主机 ID 号

要以数字(十六进制)格式显示主机 ID 号,请使用 hostid 命令。

以下示例显示 hostid 命令的样例输出。

$ hostid
80a5d34c

显示系统的体系结构类型

使用 isainfo 命令显示如何为当前操作系统支持的应用程序显示本机指令集的体系结构类型和名称。

以下示例输出来自基于 x86 的系统:

$ isainfo
amd64 i386

以下示例输出来自基于 SPARC 的系统:

$ isainfo
sparcv9 sparc

isainfo –v 命令显示 32 位和 64 位应用程序支持。例如,以下示例输出来自基于 SPARC 的系统:

$ isainfo -v
64-bit sparcv9 applications
        asi_blk_init
32-bit sparc applications
        asi_blk_init v8plus div32 mul32
#

以下示例显示 isainfo –v 命令在基于 x86 的系统上的输出:

$ isainfo -v
64-bit amd64 applications
        sse4.1 ssse3 ahf cx16 sse3 sse2 sse fxsr mmx cmov amd_sysc cx8 tsc fpu
32-bit i386 applications
        sse4.1 ssse3 ahf cx16 sse3 sse2 sse fxsr mmx cmov sep cx8 tsc fpu

请参见 isainfo(1) 手册页。

有关更多信息,请参见 isainfo (1) 手册页。

显示系统的处理器类型

使用 isalist 命令可以显示有关系统的处理器类型的信息。

The following sample output is from an x86 based system:
$ isalist
pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86

以下示例输出来自基于 SPARC 的系统:

$ isalist
sparcv9 sparcv8plus sparcv8 sparcv8-fsmuld sparcv7 sparc sparcv9+vis sparcv9+vis2 \
sparcv8plus+vis sparcv8plus+vis2

请参见 isalist(1) 手册页。

显示系统的产品名称

要显示系统的产品名称,请将 prtconf 命令与 –b 选项结合使用:

$ prtconf -b

有关更多信息,请参见 prtconf(1M) 手册页。

该示例显示来自基于 SPARC 的系统上的 prtconf –b 命令示例输出。

$ prtconf -b
name:  ORCL,SPARC-T4-2
banner-name:  SPARC T4-2
compatible: 'sun4v'
$

该示例显示来自基于 SPARC 的系统上的 prtconf –vb 命令示例输出。添加的 –v 选项指定详细输出。

$ prtconf -vb
name:  ORCL,SPARC-T3-4
banner-name:  SPARC T3-4
compatible: 'sun4v'
idprom: 01840014.4fa02d28.00000000.a02d28de.00000000.00000000.00000000.00000000
openprom model:  SUNW,4.33.0.b
openprom version: 'OBP 4.33.0.b 2011/05/16 16:26'

显示系统的已安装内存

要显示系统中已安装的内存量,请结合使用 prtconf 命令和 grep Memory 命令。以下示例显示示例输出,其中,grep Memory 命令选择 prtconf 命令的输出,以便只显示内存信息。

$ prtconf | grep Memory
Memory size: 523776 Megabytes 

显示设备的缺省和定制属性值

要显示设备的缺省属性值和定制属性值,请将 prtconf 命令和 –u 选项结合使用。

$ prtconf -u

prtconf –u 命令的输出显示系统上所有驱动程序的缺省属性和定制属性。

有关此选项的更多信息,请参见 prtconf(1M) 手册页。

示例 1-1  SPARC: 显示缺省和定制设备属性

此示例显示了 bge.conf 文件的缺省属性和定制属性。请注意,供应商提供的配置文件位于 /kernel/platform 目录,而修改后的相应驱动程序配置文件则位于 /etc/driver/drv 目录。

$ prtconf -u
System Configuration:  Oracle Corporation  sun4v
Memory size: 523776 Megabytes
System Peripherals (Software Nodes):

ORCL,SPARC-T3-4
    scsi_vhci, instance #0
        disk, instance #4
        disk, instance #5
        disk, instance #6
        disk, instance #8
        disk, instance #9
        disk, instance #10
        disk, instance #11
        disk, instance #12
    packages (driver not attached)
        SUNW,builtin-drivers (driver not attached)
        deblocker (driver not attached)
        disk-label (driver not attached)
        terminal-emulator (driver not attached)
        dropins (driver not attached)
        SUNW,asr (driver not attached)
        kbd-translator (driver not attached)
        obp-tftp (driver not attached)
        zfs-file-system (driver not attached)
        hsfs-file-system (driver not attached)
    chosen (driver not attached)
    openprom (driver not attached)
        client-services (driver not attached)
    options, instance #0
    aliases (driver not attached)
    memory (driver not attached)
    virtual-memory (driver not attached)
    iscsi-hba (driver not attached)
        disk, instance #0 (driver not attached)
    virtual-devices, instance #0
        flashprom (driver not attached)
        tpm, instance #0 (driver not attached)
        n2cp, instance #0
        ncp, instance #0
        random-number-generator, instance #0
        console, instance #0
        channel-devices, instance #0
            virtual-channel, instance #0
            virtual-channel, instance #1
            virtual-channel-client, instance #2
            virtual-channel-client, instance #3
            virtual-domain-service, instance #0
    cpu (driver not attached)
    cpu (driver not attached)
    cpu (driver not attached)
    cpu (driver not attached)
    cpu (driver not attached)
    cpu (driver not attached)
    cpu (driver not attached) 
示例 1-2  x86: 显示缺省和定制设备属性

此示例显示了 bge.conf 文件的缺省属性和定制属性。请注意,供应商提供的配置文件位于 /kernel/platform 目录,而修改后的相应驱动程序配置文件则位于 /etc/driver/drv 目录。

$ prtconf -u
System Configuration:  Oracle Corporation  i86pc
Memory size: 8192 Megabytes
System Peripherals (Software Nodes):

i86pc
    scsi_vhci, instance #0
    pci, instance #0
        pci10de,5e (driver not attached)
        isa, instance #0
            asy, instance #0
            motherboard (driver not attached)
            pit_beep, instance #0
        pci10de,cb84 (driver not attached)
        pci108e,cb84, instance #0
            device, instance #0
                keyboard, instance #0
                mouse, instance #1
        pci108e,cb84, instance #0
        pci-ide, instance #0
            ide, instance #0
                sd, instance #0
            ide (driver not attached)
        pci10de,5c, instance #0
            display, instance #0
        pci10de,cb84, instance #0
        pci10de,5d (driver not attached)
        pci10de,5d (driver not attached)
        pci10de,5d (driver not attached)
        pci10de,5d (driver not attached)
        pci1022,1100, instance #0
        pci1022,1101, instance #1
        pci1022,1102, instance #2
        pci1022,1103 (driver not attached)
        pci1022,1100, instance #3
        pci1022,1101, instance #4
        pci1022,1102, instance #5
        pci1022,1103 (driver not attached)
    pci, instance #1
        pci10de,5e (driver not attached)
        pci10de,cb84 (driver not attached)
        pci10de,cb84, instance #1
        pci10de,5d (driver not attached)
        pci10de,5d (driver not attached)
        pci10de,5d (driver not attached)
        pci10de,5d (driver not attached)
        pci1022,7458, instance #1
        pci1022,7459 (driver not attached)
        pci1022,7458, instance #2
            pci8086,1011, instance #0
            pci8086,1011, instance #1
            pci1000,3060, instance #0
                sd, instance #1
                sd, instance #2
        pci1022,7459 (driver not attached)
    ioapics (driver not attached)
        ioapic, instance #0 (driver not attached)
        ioapic, instance #1 (driver not attached)
    fw, instance #0
        cpu (driver not attached)
        cpu (driver not attached)
        cpu (driver not attached)
        cpu (driver not attached)
        sb, instance #1
    used-resources (driver not attached)
    iscsi, instance #0
    fcoe, instance #0
    pseudo, instance #0
    options, instance #0
    xsvc, instance #0
    vga_arbiter, instance #0
示例 1-3  x86: 显示系统配置信息

以下示例显示在基于 x86 的系统上如何使用带有 –v 选项的 prtconf 命令来确定与系统连接的磁盘、磁带和 DVD 设备。此命令的输出在不存在设备的设备实例旁显示了 "driver not attached" 消息。

$ prtconf -v | more
System Configuration:  Oracle Corporation  i86pc
Memory size: 8192 Megabytes
System Peripherals (Software Nodes):

i86pc
    System properties:
        name='#size-cells' type=int items=1
            value=00000002
        name='#address-cells' type=int items=1
            value=00000003
        name='relative-addressing' type=int items=1
            value=00000001
        name='MMU_PAGEOFFSET' type=int items=1
            value=00000fff
        name='MMU_PAGESIZE' type=int items=1
            value=00001000
        name='PAGESIZE' type=int items=1
            value=00001000
        name='acpi-status' type=int items=1
            value=00000013
        name='biosdev-0x81' type=byte items=588
            value=01.38.74.0e.08.1e.db.e4.fe.00.d0.ed.fe.f8.6b.04.08.d3.db.e4.fe
.
.
.

有关更多信息,请参见 driver(4)driver.conf(4)prtconf(1M) 手册页。

有关如何创建通过管理行为提供的配置文件的说明,请参见在 Oracle Solaris 11.2 中管理设备 中的第 1  章 在 Oracle Solaris 中管理设备

显示系统诊断信息

使用 prtdiag 命令显示系统的配置和诊断信息。

$ prtdiag [-v] [-l]
–v

详细模式。

–l

记录输出。如果系统中存在故障或错误,则仅将此信息输出到 syslogd (1M) 。

示例 1-4  SPARC: 显示系统诊断信息

以下示例显示 prtdiag –v 命令在基于 SPARC 的系统上的示例输出。为简短起见,示例做了截断。

$ prtdiag -v | more
System Configuration:  Oracle Corporation  sun4v Sun Fire T200
Memory size: 16256 Megabytes

================================ Virtual CPUs ================================


CPU ID Frequency Implementation         Status
------ --------- ---------------------- -------
0      1200 MHz  SUNW,UltraSPARC-T1     on-line
1      1200 MHz  SUNW,UltraSPARC-T1     on-line
2      1200 MHz  SUNW,UltraSPARC-T1     on-line
3      1200 MHz  SUNW,UltraSPARC-T1     on-line
4      1200 MHz  SUNW,UltraSPARC-T1     on-line
5      1200 MHz  SUNW,UltraSPARC-T1     on-line
6      1200 MHz  SUNW,UltraSPARC-T1     on-line
.
.
.
======================= Physical Memory Configuration ========================
Segment Table:
--------------------------------------------------------------
Base           Segment  Interleave  Bank     Contains
Address        Size     Factor      Size     Modules
--------------------------------------------------------------
0x0            16 GB    4           2 GB     MB/CMP0/CH0/R0/D0
                                             MB/CMP0/CH0/R0/D1
                                    2 GB     MB/CMP0/CH0/R1/D0
                                             MB/CMP0/CH0/R1/D1
                                    2 GB     MB/CMP0/CH1/R0/D0
                                             MB/CMP0/CH1/R0/D1
                                    2 GB     MB/CMP0/CH1/R1/D0
.
.
System PROM revisions:
----------------------
OBP 4.30.4.d 2011/07/06 14:29

IO ASIC revisions:
------------------
Location             Path                                   Device
                  Revision
-------------------- ------------------
IOBD/IO-BRIDGE                                     /pci@780      SUNW,sun4v-pci     0
.
.
.
示例 1-5  x86: 显示系统诊断信息

以下示例显示 prtdiag –l 命令在基于 x86 的系统上的输出。

$ prtdiag -l
System Configuration: ... Sun Fire X4100 M2
BIOS Configuration: American Megatrends Inc. 0ABJX104 04/09/2009
BMC Configuration: IPMI 1.5 (KCS: Keyboard Controller Style)

==== Processor Sockets ====================================

Version                          Location Tag
-------------------------------- --------------------------
Dual-Core AMD Opteron(tm) Processor 2220 CPU 1
Dual-Core AMD Opteron(tm) Processor 2220 CPU 2

==== Memory Device Sockets ================================

Type        Status Set Device Locator      Bank Locator
----------- ------ --- ------------------- ----------------
unknown     empty  0   DIMM0                NODE0
unknown     empty  0   DIMM1                NODE0
DDR2        in use 0   DIMM2                NODE0
DDR2        in use 0   DIMM3                NODE0
unknown     empty  0   DIMM0                NODE1
unknown     empty  0   DIMM1                NODE1
DDR2        in use 0   DIMM2                NODE1
DDR2        in use 0   DIMM3                NODE1

==== On-Board Devices =====================================
 LSI serial-SCSI #1
 Gigabit Ethernet #1
 ATI Rage XL VGA

==== Upgradeable Slots ====================================

ID  Status    Type             Description
--- --------- ---------------- ----------------------------
1   available PCI Express      PCIExp SLOT0
2   available PCI Express      PCIExp SLOT1
3   available PCI-X            PCIX SLOT2
4   available PCI Express      PCIExp SLOT3
5   available PCI Express      PCIExp SLOT4
$