首页 > 代码库 > HPUnix平台常用命令列举
HPUnix平台常用命令列举
原创作品,出自 “深蓝的blog” 博客,欢迎转载,转载时请务必注明出处,否则追究版权法律责任。
深蓝的blog:http://blog.csdn.net/huangyanlong/article/details/40130803
常用查询
[root@hp171/dev]#file /sbin/ls --查看文件属性,PA表示以前的cpu,较新的cpu显示为IA
/sbin/ls: PA-RISC1.1 shared executable
[root@hp171/]#bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 204800 128160 76056 63% /
/dev/vg00/lvol1 298928 65760 203272 24% /stand
/dev/vg00/lvol8 2613248 1368040 1237040 53% /var
/dev/vg00/lvol7 2334720 1614672 714456 69% /usr
/dev/vg00/lvol4 819200 23776 789920 3% /tmp
/dev/vg00/lvol6 3506176 2437328 1060520 70% /opt
/dev/vg00/lvol5 24576 2400 22008 10% /home
/dev/vg00/lv_db 23642112 5006512 18344808 21% /db
[root@hp171/]#df
/db (/dev/vg00/lv_db ): 36689616 blocks 1164724 i-nodes
/home (/dev/vg00/lvol5 ): 44016 blocks 679 i-nodes
/opt (/dev/vg00/lvol6 ): 2121040 blocks 33379 i-nodes
/tmp (/dev/vg00/lvol4 ): 1579840 blocks 24838 i-nodes
/usr (/dev/vg00/lvol7 ): 1428912 blocks 22499 i-nodes
/var (/dev/vg00/lvol8 ): 2474032 blocks 38912 i-nodes
/stand (/dev/vg00/lvol1 ): 406544 blocks 32645 i-nodes
/ (/dev/vg00/lvol3 ): 152112 blocks 2368 i-nodes
开机启动
[root@hp171/db]#vi /etc/fstab --修改开机启动
/dev/vg00/lvol1/stand hfs defaults 0 1
/dev/vg00/lvol4/tmp vxfs delaylog 0 2
/dev/vg00/lvol5/home vxfs delaylog 0 2
/dev/vg00/lvol6/opt vxfs delaylog 0 2
/dev/vg00/lvol7/usr vxfs delaylog 0 2
/dev/vg00/lvol8/var vxfs delaylog 0 2
/dev/vg00/lv_db/db vxfs rw,suid,nolargefiles,delaylog,datainlog 0 2
~
~
样例:
[root@hp175:/dev]#cat/etc/fstab
/dev/vg00/lvol3/ vxfs delaylog 0 1
/dev/vg00/lvol1/stand hfs defaults 0 1
/dev/vg00/lvol4/tmp vxfs delaylog 0 2
/dev/vg00/lvol5/home vxfs delaylog 0 2
/dev/vg00/lvol6/opt vxfs delaylog 0 2
/dev/vg00/lvol7/usr vxfs delaylog 0 2
/dev/vg00/lvol8/var vxfs delaylog 0 2
/dev/vg00/tibero/tibero vxfs rw,suid,nolargefiles,delaylog,datainlog 0 2
/dev/vg00/lv_u01 /u01vxfs rw,suid,nolargefiles,delaylog,datainlog 0 2
环境变量
[oracle@hp171oracle]$ cat .profile --HP主机oracle环境变量设置
#@(#)B.11.11_LR
#Default user .profile file (/usr/bin/sh initialization).
#Set up the terminal:
if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ‘:?hp‘ `
else
eval ` tset -s -Q `
fi
stty erase "^H" kill"^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs
#Set up the search paths:
PATH=$PATH:.
#Set up the shell environment:
set -u
trap "echo ‘logout‘" 0
#Set up the shell variables:
EDITOR=vi
export EDITOR
exportORACLE_HOME=/db/oralce/product/10.2.0
export ORACLE_BASE=/db/oralce
export ORACLE_SID=prod
export JAVE_HOME=/opt/java1.3
exportTNS_ADMIN=$ORACLE_HOME/network/admin
exportNLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export NLS_LANGUAGE=$NLS_LANG
exportORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
exportLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:$ORACLE_HOME/rdbms/lib
exportSHLIB_PATH=$ORACLE_HOME/lib32:$ORACLE_HOME/rdbms/lib32
stty erase
PATH=$PATH:/opt/java1.3/bin:/bin:/usr/bin:/usr/sbin:/etc:/opt/bin:/usr/cos/bin:/usr/local/bin:$ORACLE_HOME/bin:.
export PATH
export TMP=/tmp
export TMPDIR=/tmp
export PS1=‘[\u@\h \W]\$ ‘
umask 022
exportCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib:$ORACLE_HOME/jdbc/lib/classes12.zip
登录IP
[root@hp175:/]#who-R --查询登录端IP
root pts/ta Jun 25 10:14 (192.168.8.145)
root pts/tb Jun 25 09:36 (192.168.8.103)
oracle pts/tc Jun 25 09:36 (192.168.8.103)
查询文件大小
[oracle@hp171bin]$ du -sk /db/oralce/product/10.2.0/oui/bin/* --查看文件大小
4 /db/oralce/product/10.2.0/oui/bin/addLangs.sh
4 /db/oralce/product/10.2.0/oui/bin/addNode.sh
32 /db/oralce/product/10.2.0/oui/bin/lsnodes
4 /db/oralce/product/10.2.0/oui/bin/ouica.sh
156 /db/oralce/product/10.2.0/oui/bin/resource
4 /db/oralce/product/10.2.0/oui/bin/runConfig.sh
356 /db/oralce/product/10.2.0/oui/bin/runInstaller
0 /db/oralce/product/10.2.0/oui/bin/runInstaller.sh
逻辑卷
[oracle@hp171bin]$ vgdisplay -v --查看逻辑卷状态
--标准:VG Status、LV Status、PVStatus正常为available,如发现状态为unavailable或者stale,则为异常
---Volume groups ---
VGName /dev/vg00
VGWrite Access read/write
VGStatus available
MaxLV 255
CurLV 9
OpenLV 9
MaxPV 16
CurPV 1
ActPV 1
MaxPE per PV 4350
VGDA 2
PESize (Mbytes) 8
TotalPE 4340
AllocPE 4340
FreePE 0
TotalPVG 0
TotalSpare PVs 0
TotalSpare PVs in use 0
--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 304
Current LE 38
Allocated PE 38
Used PV 1
LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Size (Mbytes) 2048
Current LE 256
Allocated PE 256
Used PV 1
LV Name /dev/vg00/lvol3
LV Status available/syncd
LV Size (Mbytes) 200
Current LE 25
Allocated PE 25
Used PV 1
LV Name /dev/vg00/lvol4
LV Status available/syncd
LV Size (Mbytes) 800
Current LE 100
Allocated PE 100
Used PV 1
LV Name /dev/vg00/lvol5
LV Status available/syncd
LV Size (Mbytes) 24
Current LE 3
Allocated PE 3
Used PV 1
LV Name /dev/vg00/lvol6
LV Status available/syncd
LV Size (Mbytes) 3424
Current LE 428
Allocated PE 428
Used PV 1
LV Name /dev/vg00/lvol7
LV Status available/syncd
LV Size (Mbytes) 2280
Current LE 285
Allocated PE 285
Used PV 1
LV Name /dev/vg00/lvol8
LV Status available/syncd
LV Size (Mbytes) 2552
Current LE 319
Allocated PE 319
Used PV 1
LV Name /dev/vg00/lv_db
LV Status available/syncd
LV Size (Mbytes) 23088
Current LE 2886
Allocated PE 2886
Used PV 1
--- Physical volumes ---
PV Name /dev/dsk/c3t5d0
PV Status available
Total PE 4340
Free PE 0
Autoswitch On
Proactive Polling On
巡检基本信息
[root@hp171/]#model
9000/785/C3700
[root@hp171/]#top
System:hp171 Tue Jun 24 21:53:04 2014
Loadaverages: 0.05, 0.04, 0.05
155processes: 147 sleeping, 8 running
Cpustates:
LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0.05 5.8% 0.0% 5.8% 88.4% 0.0% 0.0% 0.0% 0.0%
Memory:131376K (81408K) real, 369340K (300500K) virtual, 486140K free Page# 1/12
TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
? 33 root 152 20 992K 992K run 0:02 0.32 0.32 vxfsd
? 1245 root 152 20 217M 21076K run 0:14 0.22 0.22 java
? 2340 root 157 20 4520K 460K sleep 0:09 0.18 0.18 dtlogin
? 2213 root 152 20 24860K 4608K run 0:00 0.10 0.10 vxsvc
pts/021161 root 178 20 7108K 5092K run 0:00 0.08 0.07 top
? 1202 root 152 20 28280K 7464K run 0:10 0.06 0.06 cimserver
? 0 root 127 20 32K 0K sleep 0:03 0.05 0.05 swapper
? 1107 root 154 20 3984K 756K sleep 0:01 0.05 0.05 sendmail:
? 2346 root 152 20 15528K 3148K run 0:00 0.04 0.04 samd
? 1 root 168 20 496K 204K sleep 0:00 0.02 0.02 init
? 2 root 128 20 32K 32K sleep 0:00 0.02 0.02 vhand
? 3 root 128 20 32K 32K sleep 0:01 0.02 0.02 statdaemon
? 4 root 128 20 32K 32K sleep 0:00 0.02 0.02 unhashdaemon
? 8 root 100 20 32K 32K sleep 0:00 0.02 0.02 supsched
[root@hp171/]#ioscan --简要查看设备信息
H/WPath Class Description
====================================================
bc
10 ioa System Bus Adapter (582)
10/0 ba Local PCI Bus Adapter (782)
10/0/12/0 lan HP PCI 10/100Base-TX Core
10/0/13/0 audio Built-in Audio
10/0/14/0 ext_bus IDE Primary Channel
10/0/14/0.0 target
10/0/14/0.0.0 disk LITEON CD-ROM LTN486S
10/0/14/0.7 target
10/0/14/0.7.0 ctl Initiator
10/0/14/1 ba PCI Core I/O Adapter
10/0/14/1/1 tty Built-in RS-232C
10/0/14/1/2 tty Built-in RS-232C
10/0/14/1/3 ext_bus Built-in Parallel Interface
10/0/14/2 usb Built-in USB Interface
10/0/14/2.1 usbhub USB Root Hub
10/0/15/0 ext_bus SCSI C896 Ultra Narrow Single-Ended
10/0/15/0.7 target
10/0/15/0.7.0 ctl Initiator
10/0/15/1 ext_bus SCSI C896 Ultra2 Wide LVD
10/0/15/1.5 target
10/0/15/1.5.0 disk HP 36.4GB C 80-F612
10/0/15/1.7 target
10/0/15/1.7.0 ctl Initiator
10/1 ba Local PCI Bus Adapter (782)
10/1/4/0 fc HP Tachyon XL2 Fibre Channel MassStorage Adapter
10/1/6/0 lan HP A5230A/B5509BA PCI10/100Base-TX Addon
10/4 ba Local PCI Bus Adapter (782)
10/6 ba Local PCI Bus Adapter (782)
10/6/2/0 graphics PCI Display (103c1008)
32 processor Processor
49 memory Memory
[root@hp171dsk]#ioscan -funC disk --硬盘个数
Class I H/W Path Driver S/WState H/W Type Description
=======================================================================
disk 0 10/0/14/0.0.0 sdisk CLAIMED DEVICE LITEON CD-ROM LTN486S
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk 1 10/0/15/1.5.0 sdisk CLAIMED DEVICE HP 36.4GB C 80-F612
/dev/dsk/c3t5d0 /dev/rdsk/c3t5d0
[root@hp175:/]#lssf/dev/rdsk/c3t5d0 --列出设备详细信息,连接到哪个接口上,地址是多少(查看到了接口的具体信息,如下可知为SCSI3上面的目标5的接口上面,故障排除时经常使用)
sdiskcard instance 3 SCSI target 5 SCSI LUN 0 section 0 at address 10/0/15/1.5.0/dev/rdsk/c3t5d0
[root@hp171/dev]#ls -l /dev/vg00 --存放卷组划分出的逻辑卷的名字,既有块设备名,又有裸设备名
total0
crw-r----- 1 root sys 64 0x000000 Mar 2421:48 group
br--r----- 1 root sys 64 0x000009 May 2901:33 lv_db
brw-r----- 1 root sys 64 0x000001 Jun 2609:47 lvol1
brw-r----- 1 root sys 64 0x000002 Mar 2421:48 lvol2
brw-r----- 1 root sys 64 0x000003 Mar 24 21:48 lvol3
brw-r----- 1 root sys 64 0x000004 Mar 2421:48 lvol4
brw-r----- 1 root sys 64 0x000005 Mar 2421:48 lvol5
brw-r----- 1 root sys 64 0x000006 Mar 2421:48 lvol6
brw-r----- 1 root sys 64 0x000007 Mar 2421:48 lvol7
brw-r----- 1 root sys 64 0x000008 Mar 2421:48 lvol8
cr--r----- 1 root sys 64 0x000009 May 2901:33 rlv_db
crw-r----- 1 root sys 64 0x000001 Mar 2421:48 rlvol1
crw-r----- 1 root sys 64 0x000002 Mar 2421:48 rlvol2
crw-r----- 1 root sys 64 0x000003 Mar 2421:48 rlvol3
crw-r----- 1 root sys 64 0x000004 Mar 2421:48 rlvol4
crw-r----- 1 root sys 64 0x000005 Mar 2421:48 rlvol5
crw-r----- 1 root sys 64 0x000006 Mar 2421:48 rlvol6
crw-r----- 1 root sys 64 0x000007 Mar 2421:48 rlvol7
crw-r----- 1 root sys 64 0x000008 Mar 2421:48 rlvol8
[root@hp175:/dev]#lvcreate -L 16 -n testnew vg00
--在175机器上操作,创建逻辑卷(在卷组vg00上,取名testnew,大小16M),看到下面信息显示:创建了字符型设备名(裸设备名rtestnew块设备?)、块设备名(testnew??字符设备?)有点晕~~~?????
--有待补充
Logicalvolume "/dev/vg00/testnew" has been successfully created with
characterdevice "/dev/vg00/rtestnew".
Logicalvolume "/dev/vg00/testnew" has been successfully extended.
VolumeGroup configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
[root@hp175:/dev]#ls-l /dev/vg00 --创建完设备名后查看/dev下设备名称信息
total0
crw-rw---- 1 root sys 64 0x000000 Apr26 2012 group
br--r----- 1 root sys 64 0x000009 Jun 2416:33 lv_u01
brw-rw---- 1 root sys 64 0x000001 Jun 2609:34 lvol1
brw-rw---- 1 root sys 64 0x000002 Apr26 2012 lvol2
brw-rw---- 1 root sys 64 0x000003 Apr26 2012 lvol3
brw-rw---- 1 root sys 64 0x000004 Apr26 2012 lvol4
brw-rw---- 1 root sys 64 0x000005 Apr26 2012 lvol5
brw-rw---- 1 root sys 64 0x000006 Apr26 2012 lvol6
brw-rw---- 1 root sys 64 0x000007 Apr 26 2012 lvol7
brw-rw---- 1 root sys 64 0x000008 Apr26 2012 lvol8
cr--r----- 1 root sys 64 0x000009 Jun 2416:33 rlv_u01
crw-rw---- 1 root sys 64 0x000001 Apr26 2012 rlvol1
crw-rw---- 1 root sys 64 0x000002 Apr26 2012 rlvol2
crw-rw---- 1 root sys 64 0x000003 Apr26 2012 rlvol3
crw-rw---- 1 root sys 64 0x000004 Apr26 2012 rlvol4
crw-rw---- 1 root sys 64 0x000005 Apr 26 2012 rlvol5
crw-rw---- 1 root sys 64 0x000006 Apr26 2012 rlvol6
crw-rw---- 1 root sys 64 0x000007 Apr26 2012 rlvol7
crw-rw---- 1 root sys 64 0x000008 Apr26 2012 rlvol8
crw-r----- 1 root sys 64 0x00000b Jun 2612:08 rtestnew
crw-rw---- 1 root sys 64 0x00000a Aug18 2012 rtibero
brw-r----- 1 root sys 64 0x00000b Jun 2612:08 testnew
brw-rw---- 1 root sys 64 0x00000a Aug18 2012 tibero
[root@hp175:/dev]#uname -a --系统版本
HP-UXhp175 B.11.11 U 9000/785 2002214594 unlimited-user license
[root@hp175:/dev]#mount -v --使用vxfs文件系统
/dev/vg00/lvol3on / typevxfslog on Thu Jun 26 09:34:03 2014
/dev/vg00/lvol1on /stand typehfs defaults on Thu Jun 2609:34:04 2014 --hfs文件系统,内核
/dev/vg00/lvol8on /var typevxfs delaylog,nodatainlog on Thu Jun 26 09:34:10 2014
/dev/vg00/lvol7on /usr typevxfs delaylog,nodatainlog on Thu Jun 26 09:34:10 2014
/dev/vg00/lv_u01on /u01 typevxfs delaylog,nodatainlog,nolargefiles on Thu Jun 2609:34:10 2014
/dev/vg00/lvol4on /tmp typevxfs delaylog,nodatainlog on Thu Jun 26 09:34:10 2014
/dev/vg00/tiberoon /tibero typevxfs delaylog,nodatainlog,nolargefiles on Thu Jun 2609:34:10 2014
/dev/vg00/lvol6on /opt typevxfs delaylog,nodatainlog on Thu Jun 26 09:34:10 2014
/dev/vg00/lvol5on /home typevxfs delaylog,nodatainlog on Thu Jun 26 09:34:10 2014
-hostson /net type autofs ignore,indirect,nosuid,soft,rsize=32768,wsize=32768 on ThuJun 26 09:34:44 2014
[root@hp171dsk]#diskinfo /dev/rdsk/c0t0d0 --显示硬盘的信息
SCSIdescribe of /dev/rdsk/c0t0d0:
vendor: LITEON
product id: CD-ROM LTN486S
type: CD-ROM
size: 0 Kbytes
bytes per sector: 0
[root@hp171dsk]#diskinfo /dev/rdsk/c3t5d0
SCSIdescribe of /dev/rdsk/c3t5d0:
vendor: HP
product id: 36.4GB C 80-F612
type: direct access
size: 35566480 Kbytes
bytes per sector: 512
[root@hp171/]#lvlnboot -v --查看系统发现没有做镜像,只有一个BootDisk
BootDefinitions for Volume Group /dev/vg00:
PhysicalVolumes belonging in Root Volume Group:
/dev/dsk/c3t5d0 (10/0/15/1.5.0) -- BootDisk
Boot:lvol1 on: /dev/dsk/c3t5d0
Root:lvol3 on: /dev/dsk/c3t5d0
Swap:lvol2 on: /dev/dsk/c3t5d0
Dump:lvol2 on: /dev/dsk/c3t5d0
[root@hp175:/dev]#df -k --查看使用情况,allocation used:分配已经使用的
/testnew (/dev/vg00/testnew ) : 15437 total allocated Kb
14328 free allocated Kb
1109 used allocated Kb
7 % allocation used
/home (/dev/vg00/lvol5 ) : 520592 total allocated Kb
517560 free allocated Kb
3032 used allocated Kb
0 % allocation used
/opt (/dev/vg00/lvol6 ) : 3502568 total allocated Kb
465368 free allocated Kb
3037200 used allocated Kb
86 % allocation used
/tibero (/dev/vg00/tibero ) : 6839438 total allocated Kb
1856680 free allocated Kb
4982758 used allocated Kb
72 % allocation used
/tmp (/dev/vg00/lvol4 ) : 1565968 total allocated Kb
983080 free allocated Kb
582888used allocated Kb
37 % allocation used
/u01 (/dev/vg00/lv_u01 ) : 10292608 total allocated Kb
6001538 free allocated Kb
4291070 used allocated Kb
41 % allocation used
/usr (/dev/vg00/lvol7 ) : 2329136 total allocated Kb
714552 free allocated Kb
1614584 used allocated Kb
69 % allocation used
/var (/dev/vg00/lvol8 ) : 2602704 total allocated Kb
1541424 free allocated Kb
1061280 used allocated Kb
40 % allocation used
/stand (/dev/vg00/lvol1 ) : 454848 total allocated Kb
348272 free allocated Kb
106576 used allocated Kb
23 % allocation used
/ (/dev/vg00/lvol3 ) : 1041768 total allocated Kb
904080 free allocated Kb
137688used allocated Kb
13 % allocation used
[root@hp175:/dev]#df --显示多少个块、多少个I结点
/testnew (/dev/vg00/testnew ): 28656blocks 3816 i-nodes
/home (/dev/vg00/lvol5 ): 1035120 blocks 16274 i-nodes
/opt (/dev/vg00/lvol6 ): 930736 blocks 14627 i-nodes
/tibero (/dev/vg00/tibero ): 3713360 blocks 495108 i-nodes
/tmp (/dev/vg00/lvol4 ): 1966160 blocks 30915 i-nodes
/u01 (/dev/vg00/lv_u01 ): 12003076 blocks 774335 i-nodes
/usr (/dev/vg00/lvol7 ): 1429104 blocks 22481 i-nodes
/var (/dev/vg00/lvol8 ): 3082832 blocks 48490 i-nodes
/stand (/dev/vg00/lvol1 ): 696544 blocks 49359 i-nodes
/ (/dev/vg00/lvol3 ): 1808160 blocks 28457 i-nodes
创建逻辑卷
[root@hp175:/dev]#lvcreate -L 16 -n testnew vg00
Logicalvolume "/dev/vg00/testnew" has been successfully created with
characterdevice "/dev/vg00/rtestnew".
Logicalvolume "/dev/vg00/testnew" has been successfully extended.
VolumeGroup configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
[root@hp175:/dev]#ls -l /dev/vg00 --查看到创建的逻辑卷
[root@hp175:/dev]#newfs /dev/vg00/rtestnew --使用块设备名????????
newfs:/etc/default/fs is used for determining the file system type
version 4 layout
16384 sectors, 16384 blocks of size 1024,log size 1024 blocks
unlimited inodes, largefiles not supported
16384 data blocks, 15288 free data blocks
1 allocation units of 32768 blocks, 32768data blocks
last allocation unit has 16384 data blocks
[root@hp175:/dev]#mkdir/testnew
[root@hp175:/dev]#mount/dev/vg00/testnew /testnew
[root@hp175:/dev]#bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 1048576 137688 904080 13% /
/dev/vg00/lvol1 505392 106576 348272 23% /stand
/dev/vg00/lvol8 2613248 1061232 1541472 41% /var
/dev/vg00/lvol7 2334720 1614584 714552 69% /usr
/dev/vg00/lv_u01 10485760 4280828 6011462 42% /u01
/dev/vg00/lvol4 1572864 582888 983080 37% /tmp
/dev/vg00/tibero 6963200 4982758 1856680 73% /tibero
/dev/vg00/lvol6 3506176 3037200 465368 87% /opt
/dev/vg00/lvol5 524288 3032 517560 1% /home
/dev/vg00/testnew 16384 1109 14328 7% /testnew
扩展逻辑卷
[root@hp175:/dev]#lvextend-L 32 /dev/vg00/testnew --使用块设备???
Logicalvolume "/dev/vg00/testnew" has been successfully extended.
VolumeGroup configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
[root@hp175:/dev]#bdf --查看testnew逻辑卷仍是16M
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 1048576 137688 904080 13% /
/dev/vg00/lvol1 505392 106576 348272 23% /stand
/dev/vg00/lvol8 2613248 1061344 1541360 41% /var
/dev/vg00/lvol7 2334720 1614584 714552 69% /usr
/dev/vg00/lv_u01 10485760 4291078 6001530 42% /u01
/dev/vg00/lvol4 1572864 582888 983080 37% /tmp
/dev/vg00/tibero 6963200 4982758 1856680 73% /tibero
/dev/vg00/lvol6 3506176 3037200 465368 87% /opt
/dev/vg00/lvol5 524288 3032 517560 1% /home
/dev/vg00/testnew 16384 1109 14328 7% /testnew
[root@hp175:/dev]#umount/testnew
[root@hp175:/dev]#extendfs/dev/vg00/testnew
extendfs:/etc/default/fs is used for determining the file system type
[root@hp175:/dev]#mount/dev/vg00/testnew /testnew
[root@hp175:/dev]#bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 1048576 137688 904080 13% /
/dev/vg00/lvol1 505392 106576 348272 23% /stand
/dev/vg00/lvol8 2613248 1061360 1541344 41% /var
/dev/vg00/lvol7 2334720 1614584 714552 69% /usr
/dev/vg00/lv_u01 10485760 4291078 6001530 42% /u01
/dev/vg00/lvol4 1572864 582888 983080 37% /tmp
/dev/vg00/tibero 6963200 4982758 1856680 73% /tibero
/dev/vg00/lvol6 3506176 3037200 465368 87% /opt
/dev/vg00/lvol5 524288 3032 517560 1% /home
/dev/vg00/testnew 32768 1109 29688 4% /testnew
删除逻辑卷
[root@hp175:/]#sam
同步进程查询
[root@hp175:/dev]#ps-ef |grep syncer
root 550 1 0 09:34:23 ? 0:02 /usr/sbin/syncer
root 8957 3542 1 15:29:06 pts/ta 0:00 grep syncer
[root@hp175:/dev]#sync --正常关闭操作时,会自动调用sync操作命令
fsck
[root@hp175:/dev]#mount-v --查看操作系统的类型
/dev/vg00/lvol3on / type vxfs log on Thu Jun 26 09:34:03 2014
/dev/vg00/lvol1on /stand type hfs defaults on Thu Jun 26 09:34:04 2014
/dev/vg00/lvol8on /var type vxfs delaylog,nodatainlog on Thu Jun 26 09:34:10 2014
/dev/vg00/lvol7on /usr type vxfs delaylog,nodatainlog on Thu Jun 26 09:34:10 2014
/dev/vg00/lv_u01on /u01 type vxfs delaylog,nodatainlog,nolargefiles on Thu Jun 26 09:34:10 2014
/dev/vg00/lvol4on /tmp type vxfs delaylog,nodatainlog on Thu Jun 26 09:34:10 2014
/dev/vg00/tiberoon /tibero type vxfs delaylog,nodatainlog,nolargefiles on Thu Jun 26 09:34:102014
/dev/vg00/lvol6on /opt type vxfs delaylog,nodatainlog on Thu Jun 26 09:34:10 2014
/dev/vg00/lvol5on /home type vxfs delaylog,nodatainlog on Thu Jun 26 09:34:10 2014
-hostson /net type autofs ignore,indirect,nosuid,soft,rsize=32768,wsize=32768 on ThuJun 26 09:34:44 2014
/dev/vg00/testnewon /testnew type vxfs log,nodatainlog on Thu Jun 26 14:53:47 2014
#umount/dev/vg01/myfs2 --把文件系统umount
#fsck -F hfs/dev/vg01/myfs2 --制定一个文件系统类型,进行修复
#mount/dev/vg01/myfs2 --修复完成后,把文件系统mount上
清空日志文件
[root@hp175:/dev]#ls-l /var/adm/syslog/syslog.log
-rw-r--r-- 1 root root 9869 Jun 26 12:08/var/adm/syslog/syslog.log
[root@hp175:/dev]#cat/dev/null > /var/adm/syslog/syslog.log
[root@hp175:/dev]#ls-l /var/adm/syslog/syslog.log
-rw-r--r-- 1 root root 0 Jun 26 15:46/var/adm/syslog/syslog.log
检查日志
[root@hp171/]#cd /var/adm/syslog
[root@hp171syslog]#ls
OLDsyslog.log mail.log syslog.log
[root@hp171syslog]#more syslog.log --检查syslog.log
[root@hp171/etc]#more /etc/rc.log --检查rc.log
[root@hp171log]#cd /var/opt/resmon/log/
[root@hp171log]#more event.log --检查event.log
SWAP空间
[root@hp171log]#swapinfo -a --检查swap空间
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 2097152 0 2097152 0% 0 - 1 /dev/vg00/lvol2
reserve - 160492 -160492
memory 581384 106360 475024 18%
[root@hp175:/dev]#swapinfo
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 2097152 96560 2000592 5% 0 - 1 /dev/vg00/lvol2
reserve - 602972 -602972
memory 593576 107636 485940 18%
[root@hp171log]#date 0625141614 --同步系统时间
WedJun 25 14:16:00 MDT 2014
说明:由于HPUnix接触较少,相关指令及解释有待补充完善。
原创作品,出自 “深蓝的blog” 博客,欢迎转载,转载时请务必注明出处,否则追究版权法律责任。
深蓝的blog:http://blog.csdn.net/huangyanlong/article/details/40130803
HPUnix平台常用命令列举