您在这里:首页 > 学员专区 > 技术文章
Oracle视频
Oracle
CUUG课程

AIX常用命令

 

  
一.查看CPU

--物理cpu数

1.prtconf

Processor Type: PowerPC_POWER5

Number Of Processors: 2

Processor Clock Speed: 2097 MHz

CPU Type: 64-bit

2.lsdev

-bash-3.00$ lsdev -Cc processor

proc0 Available 00-00 Processor

proc2 Available 00-02 Processor

--逻辑cpu数

3.bindprocessor

-bash-3.00$ bindprocessor -q

The available processors are:  0 1 2 3

4.vmstat

-bash-3.00$ vmstat

System configuration: lcpu=4 mem=1904MB

kthr    memory              page              faults        cpu

----- ----------- ------------------------ ------------ -----------

 r  b   avm   fre  re  pi  po  fr   sr  cy  in   sy  cs us sy id wa

 1  1 386273 51470   0   0   0   0    1   0 120 5221 937  1  2 97  1

5.smtctl

因为无权限执行,没有测试

二.查看内存

1.lsattr

-bash-3.00$  lsdev -Cc memory

L2cache0 Available  L2 Cache

mem0     Available  Memory

-bash-3.00$  lsattr -El L2cache0

size 1920 Size of L2 cache in Kbytes False

-bash-3.00$  lsattr -El mem0

goodsize 1904 Amount of usable physical memory in Mbytes False

size     1904 Total amount of physical memory in Mbytes  False

2.prtconf

-bash-3.00$ prtconf|grep Memory|grep -v +

Memory Size: 1904 MB

Good Memory Size: 1904 MB

3.vmstat

-bash-3.00$ vmstat

System configuration: lcpu=4 mem=1904MB

kthr    memory              page              faults        cpu

----- ----------- ------------------------ ------------ -----------

 r  b   avm   fre  re  pi  po  fr   sr  cy  in   sy  cs us sy id wa

 1  1 387550 50188   0   0   0   0    1   0 120 5221 937  1  2 97  1

4.topas

 MEMORY

Real,MB    1904

% Comp     76

% Noncomp  13

% Client   13

三.查看交互分区

1.lsps

-bash-3.00$ lsps -a

Page Space      Physical Volume   Volume Group    Size %Used Active  Auto  Type

hd6             hdisk0            rootvg         512MB    38   yes   yes    lv

2.lsps

-bash-3.00$  lsps -s

Total Paging Space   Percent Used

      512MB              38%

3.prtconf

Paging Space Information

        Total Paging Space: 512MB

        Percent Used: 38%

4.topas

PAGING SPACE

Size,MB     512

% Used     38

% Free     62

四.查看网络配置

--网络硬件信息

1.lsdev

-bash-3.00$ lsdev -Cc adapter|grep ent

ent0      Available 0D-08 2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902)

ent1      Available 0D-09 2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902)

2.lscfg

-bash-3.00$ lscfg -vl ent0

  ent0             U788C.001.AAA8364-P1-T1  2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902)

      2-Port 10/100/1000 Base-TX PCI-X Adapter:

        Network Address.............001125C5CDA4

        ROM Level.(alterable).......DV0210

        Hardware Location Code......U788C.001.AAA8364-P1-T1

--网络配置信息

3.ifconfig

-bash-3.00$ ifconfig -a

en0: flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,LARGESEND,CHAIN>

        inet 192.168.1.18 netmask 0xffffff00 broadcast 192.168.1.255

         tcp_sendspace 131072 tcp_recvspace 65536

lo0: flags=e08084b<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT>

        inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255

        inet6 ::1/0

         tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1

4.netstat

-bash-3.00$ netstat -in|grep en

en0   1500  link#2      0.11.25.c5.cd.a4  1071676281     0 688122516     4     0

en0   1500  192.168.1   192.168.1.18      1071676281     0 688122516     4     0

5.lsattr

-bash-3.00$ lsattr -El en0

alias4                      IPv4 Alias including Subnet Mask           True

alias6                      IPv6 Alias including Prefix Length         True

arp           on            Address Resolution Protocol (ARP)          True

authority                   Authorized Users                           True

broadcast                   Broadcast Address                          True

mtu           1500          Maximum IP Packet Size for This Device     True

netaddr       192.168.1.18  Internet Address                           True

netaddr6                    IPv6 Internet Address                      True

netmask       255.255.255.0 Subnet Mask                                True

prefixlen                   Prefix Length for IPv6 Internet Address    True

remmtu        576           Maximum IP Packet Size for REMOTE Networks True

rfc1323                     Enable/Disable TCP RFC 1323 Window Scaling True

security      none          Security Level                             True

state         up            Current Interface Status                   True

tcp_mssdflt                 Set TCP Maximum Segment Size               True

tcp_nodelay                 Enable/Disable TCP_NODELAY Option          True

tcp_recvspace               Set Socket Buffer Space for Receiving      True

tcp_sendspace               Set Socket Buffer Space for Sending        True

--配置网络

ifconfig en0 192.168.0.5 netmask 255.255.255.0 up

chdev -l en1 -a netaddr='192.168.1.1' -a netmask='255.255.255.0'

五.查看硬盘

--硬盘使用情况

1.df

-bash-3.00$ df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/hd4              5.2G   77M  5.1G   2% /

/dev/hd2              5.5G  1.6G  4.0G  28% /usr

/dev/hd9var           640M  640M     0 100% /var

/dev/hd3              128M   48M   81M  38% /tmp

/dev/fwdump           128M  348K  128M   1% /var/adm/ras/platform

/dev/hd1              640M  580M   61M  91% /home0

/proc                    -     -     0   -  /proc

/dev/hd10opt          2.3G  496M  1.8G  22% /opt

192.168.2.5:/store/home

                      2.3T  576G  1.7T  26% /home

--物理硬盘

2.lspv

-bash-3.00$ lspv

hdisk0          000b45c0688a5c5d                    rootvg          active

hdisk1          00c97ac06a9cef35                    None            

-bash-3.00$ lspv hdisk0

PHYSICAL VOLUME:    hdisk0                   VOLUME GROUP:     rootvg

PV IDENTIFIER:      000b45c0688a5c5d VG IDENTIFIER     000b45c00000d7000000011b688a6044

PV STATE:           active

STALE PARTITIONS:   0                        ALLOCATABLE:      yes

PP SIZE:            128 megabyte(s)          LOGICAL VOLUMES:  11

TOTAL PPs:          546 (69888 megabytes)    VG DESCRIPTORS:   2

FREE PPs:           417 (53376 megabytes)    HOT SPARE:        no

USED PPs:           129 (16512 megabytes)    MAX REQUEST:      256 kilobytes

FREE DISTRIBUTION:  109..90..00..109..109

USED DISTRIBUTION:  01..19..109..00..00  

3.lsdev

-bash-3.00$ lsdev -Cc disk

hdisk0 Available 0G-08-01-8,0 16 Bit LVD SCSI Disk Drive

hdisk1 Available 0G-08-01-5,0 16 Bit LVD SCSI Disk Drive

4.lsattr

-bash-3.00$ lsattr -El hdisk0

PCM             PCM/friend/scsiscsd                         Path Control Module           False

algorithm       fail_over                                   Algorithm                     True

dist_err_pcnt   0                                           Distributed Error Percentage  True

dist_tw_width   50                                          Distributed Error Sample Time True

hcheck_interval 0                                           Health Check Interval         True

hcheck_mode     nonactive                                   Health Check Mode             True

max_transfer    0x40000                                     Maximum TRANSFER Size         True

pvid            000b45c0688a5c5d0000000000000000            Physical volume identifier    False

queue_depth     3                                           Queue DEPTH                   False

reserve_policy  single_path                                 Reserve Policy                True

size_in_mb      73400                                       Size in Megabytes             False

unique_id       2B08004F478B0FHUS153073VL380008IBM   H0scsi Unique device identifier      False

5.lscfg

-bash-3.00$ lscfg -vpl hdisk0

  hdisk0           U788C.001.AAA8364-P1-T11-L8-L0  16 Bit LVD SCSI Disk Drive (73400 MB)

        Manufacturer................IBM   H0

        Machine Type and Model......HUS153073VL3800

        FRU Number..................03N5282

        ROS Level and ID............53343130

        Serial Number...............004F478B

        EC Level....................H17923Y

        Part Number.................03N5281

        Device Specific.(Z0)........000004129F00013A

        Device Specific.(Z1)........VBPSS410

        Device Specific.(Z2)........0068

        Device Specific.(Z3)........08076

        Device Specific.(Z4)........0001

        Device Specific.(Z5)........22

        Device Specific.(Z6)........H17923Y

        Brand.......................H0

  PLATFORM SPECIFIC

  Name:  sd

    Node:  sd

    Device Type:  block                      

--逻辑卷

6.lsvg

-bash-3.00$ lsvg

rootvg

-bash-3.00$ lsvg -l rootvg

rootvg:

LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT

hd5                 boot       1       1       1    closed/syncd  N/A

hd6                 paging     4       4       1    open/syncd    N/A

hd8                 jfs2log    1       1       1    open/syncd    N/A

hd4                 jfs2       41      41      1    open/syncd    /

hd2                 jfs2       44      44      1    open/syncd    /usr

hd9var              jfs2       5       5       1    open/syncd    /var

hd3                 jfs2       1       1       1    open/syncd    /tmp

hd1                 jfs2       5       5       1    open/syncd    /home0

hd10opt             jfs2       18      18      1    open/syncd    /opt

fwdump              jfs2       1       1       1    open/syncd    /var/adm/ras/platform

lg_dumplv           sysdump    8       8       1    open/syncd    N/A

7.lslv

-bash-3.00$ lslv  hd5

LOGICAL VOLUME:     hd5                    VOLUME GROUP:   rootvg

LV IDENTIFIER:      000b45c00000d7000000011b688a6044.1 PERMISSION:     read/write

VG STATE:           active/complete        LV STATE:       closed/syncd

TYPE:               boot                   WRITE VERIFY:   off

MAX LPs:            512                    PP SIZE:        128 megabyte(s)

COPIES:             1                      SCHED POLICY:   parallel

LPs:                1                      PPs:            1

STALE PPs:          0                      BB POLICY:      relocatable

INTER-POLICY:       minimum                RELOCATABLE:    no

INTRA-POLICY:       edge                   UPPER BOUND:    32

MOUNT POINT:        N/A                    LABEL:          primary_bootlv

MIRROR WRITE CONSISTENCY: on/ACTIVE

EACH LP COPY ON A SEPARATE PV ?: yes

Serialize IO ?:     NO                    

8.prtconf

Volume Groups Information

==============================================================================

rootvg:

PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION

hdisk0            active            546         417         109..90..00..109..109

============================================================================== 

9.topas

Disk    Busy%     KBPS     TPS KB-Read KB-Writ

hdisk0   21.0     3.2K   20.0     0.0     3.2K

hdisk1    0.0     0.0     0.0     0.0     0.0

cd0       0.0     0.0     0.0     0.0     0.0

六.说明

1.cpu/memory/swap/network/disk的主要信息都可以通过topas和parconf查看

2.这些命令还和shell的类型有很多关系,这里是bash

 

 

 

(以上内容摘于网络,如有侵权,请告之,将第一时间删除)

相关文章 [上一篇] nmon使用说明
010-56426307(59426319)
CUUG热门培训课程
Oracle DBA就业培训
CUUG名师
网络课程
技术沙龙
最新动态

总机:(010)-56426307,59426319 QQ讨论群:243729577 182441349 邮箱:yuezt@cuug.com
通信地址:北京市海淀区紫竹院路88号紫竹花园D座703(CUUG)邮政编码:100089 
中国UNIX用户协会 Copyright 2010  ALL Rights Reserved 北京神脑资讯技术有限公司
京ICP备11008061号