JavaScript is required to for searching.
跳过导航链接
退出打印视图
在 Oracle Solaris 11.1 中管理系统信息、进程和性能     Oracle Solaris 11.1 Information Library (简体中文)
为本文档评分
search filter icon
search icon

文档信息

前言

1.  管理系统信息(任务)

显示和更改系统信息方面的新增功能

hostnamedomainname 命令的增强功能

显示系统信息

显示系统信息(任务列表)

用于显示系统信息的命令

如何显示系统的发行版信息

如何显示日期和时间

如何显示系统的主机 ID 号

显示系统的体系结构和处理器类型

如何显示系统的产品名称

如何显示系统的已安装内存

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

如何显示系统诊断信息

识别有关芯片多线程功能的信息

如何显示系统的物理处理器类型

如何显示系统的虚拟处理器类型

更改系统信息

更改系统信息(任务列表)

如何手动设置系统的日期和时间

如何设置每日消息

如何更改系统标识

2.  管理系统进程(任务)

3.  监视系统性能(任务)

4.  调度系统任务(任务)

5.  管理系统控制台、终端设备和电源服务(任务)

索引

请告诉我们如何提高我们的文档:
过于简略
不易阅读或难以理解
重要信息缺失
错误的内容
需要翻译的版本
其他
Your rating has been updated
感谢您的反馈!

您的反馈将非常有助于我们提供更好的文档。 您是否愿意参与我们的内容改进并提供进一步的意见?

显示系统信息

下表介绍了用于显示常规系统信息的命令。

显示系统信息(任务列表)

任务
说明
参考
显示系统的发行版信息。
显示 /etc/release 文件的内容,以确定 Oracle Solaris 发行版的版本。
显示系统的日期和时间。
使用 date 命令显示系统的日期和时间。
显示系统的主机 ID 号。
使用 hostid 命令显示系统的主机 ID。
显示系统的体系结构或处理器类型。
使用 isainfo 命令显示系统的体系结构类型。使用 isalist 命令显示系统的处理器类型。
显示系统的产品名称。
可以使用 prtconf -b 命令显示系统的产品名称。
显示系统的已安装内存。
使用 prtconf 命令显示有关系统的已安装内存的信息。
显示设备的原始值和缺省值。
prtconf 命令和 -u 选项结合使用可以显示设备的缺省属性值和更新后的属性值。
显示系统的配置和诊断信息。
使用带有相应选项的 prtdiag 命令显示系统的配置和诊断信息。
显示系统的物理和虚拟处理器信息。
使用 psrinfo -p 命令列出系统中物理处理器的总数。

使用 psrinfo -pv 命令列出系统中的所有物理处理器以及与每个物理处理器关联的虚拟处理器。

用于显示系统信息的命令

表 1-1 用于显示系统信息的命令

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

如何显示系统的发行版信息

如何显示日期和时间

示例 1-1 显示日期和时间

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

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

如何显示系统的主机 ID 号

示例 1-2 显示系统的主机 ID 号

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

$ hostid
80a5d34c

显示系统的体系结构和处理器类型

以下示例显示 isainfoisalist 命令在基于 x86 和 SPARC 的系统上运行时的输出。

示例 1-3 显示系统的体系结构类型

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

以下输出来自基于 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
#

该示例显示来自 x86 系统的 isainfo -v 命令的输出:

$ 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) 手册页。

示例 1-4 显示系统的处理器类型

以下示例说明如何显示有关 x86 系统的处理器类型的信息。

$ 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(1M) 手册页。

示例 1-5 SPARC: 显示系统的产品名称

该示例显示来自 SPARC 系统上的 prtconf -b 命令的样例输出。

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

该示例显示来自 SPARC 系统上的 prtconf -vb 命令的样例输出。

$ 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'

如何显示系统的已安装内存

示例 1-6 显示系统的已安装内存

以下示例显示 prtconf 命令的样例输出。grep Memory 命令选择 prtconf 命令的输出,以便只显示内存信息。

$ prtconf | grep Memory
Memory size: 523776 Megabytes 

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

要显示设备的缺省属性值和定制属性值,请将 prtconf 命令和 -u 选项结合使用。有关此选项的更多信息,请参见 prtconf(1M) 手册页。

示例 1-7 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-8 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-9 x86: 显示系统配置信息

以下示例显示在基于 x86 的系统上如何使用带有 -v 选项的 prtconf 命令来确定与系统连接的磁盘、磁带和 DVD 设备。此命令的输出在设备实例旁显示了未关联驱动程序消息。此消息通常表示该设备实例中没有设备。

$ 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.1 管理:设备和文件系统》中的第 3  章 "管理设备(任务)"

如何显示系统诊断信息

示例 1-10 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-11 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
$

识别有关芯片多线程功能的信息

psrinfo 命令进行了修改,不仅可以提供有关虚拟处理器的信息,还可以提供有关物理处理器的信息。添加此增强功能是为了识别芯片多线程 (chip multithreading, CMT) 功能。新增的 -p 选项可报告系统中物理处理器的总数。使用 psrinfo -pv 命令可列出系统中所有的物理处理器,以及与每个物理处理器关联的虚拟处理器。psrinfo 命令的缺省输出仍然显示系统的虚拟处理器信息。

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

有关与此功能关联的过程的信息,请参见如何显示系统的物理处理器类型

如何显示系统的物理处理器类型

如何显示系统的虚拟处理器类型

示例 1-12 SPARC: 显示系统的虚拟处理器类型

此示例说明如何显示有关 SPARC 系统的虚拟处理器类型的信息。

$ psrinfo -v
Status of virtual processor 28 as of: 09/13/2010 14:07:47
  on-line since 04/08/2010 21:27:56.
  The sparcv9 processor operates at 1400 MHz,
        and has a sparcv9 floating point processor.
Status of virtual processor 29 as of: 09/13/2010 14:07:47
  on-line since 04/08/2010 21:27:56.
  The sparcv9 processor operates at 1400 MHz,
        and has a sparcv9 floating point processor.

示例 1-13 SPARC: 显示与系统上的每个物理处理器关联的虚拟处理器

以下示例显示在 Oracle SPARC T4-4 服务器上使用 -pv 选项运行 psrinfo 命令时的输出。输出显示有关线程位置的芯片(物理处理器)和核心信息。在确定线程位于哪个物理 CPU 上以及如何在核心级别映射时,这些信息可能很有用。

$ psrinfo -pv
The physical processor has 8 cores and 64 virtual processors (0-63)
  The core has 8 virtual processors (0-7)
  The core has 8 virtual processors (8-15)
  The core has 8 virtual processors (16-23)
  The core has 8 virtual processors (24-31)
  The core has 8 virtual processors (32-39)
  The core has 8 virtual processors (40-47)
  The core has 8 virtual processors (48-55)
  The core has 8 virtual processors (56-63)
    SPARC-T4 (chipid 0, clock 2998 MHz)
The physical processor has 8 cores and 64 virtual processors (64-127)
  The core has 8 virtual processors (64-71)
  The core has 8 virtual processors (72-79)
  The core has 8 virtual processors (80-87)
  The core has 8 virtual processors (88-95)
  The core has 8 virtual processors (96-103)
  The core has 8 virtual processors (104-111)
  The core has 8 virtual processors (112-119)
  The core has 8 virtual processors (120-127)
    SPARC-T4 (chipid 1, clock 2998 MHz)