Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1199975
  • 博文数量: 146
  • 博客积分: 6619
  • 博客等级: 准将
  • 技术积分: 1621
  • 用 户 组: 普通用户
  • 注册时间: 2008-02-29 14:06
文章分类

全部博文(146)

文章存档

2020年(1)

2019年(4)

2018年(3)

2017年(5)

2015年(5)

2014年(7)

2013年(5)

2012年(11)

2011年(15)

2010年(13)

2009年(14)

2008年(63)

分类: 系统运维

2008-10-16 20:06:47

    近来学习了VMWARE ESX下的相关命令,现记录下一些主要的,以便以后可以温故而知新。

man -k esx
man -k vmware
ls /usr/bin | grep vm
ls /usr/sbin | grep vm

find /vmfs \( -name "*.vmdk" -a ! -name "*flat.vmdk" -a ! -name "*-s[0-9][0-9][0-9].vmdk" -a ! -name "*delta.vmdk" \) -exec grep CID {} \;
find /vmfs \( -name "*.vmdk" -a ! -name "*flat.vmdk" -a ! -name "*-s[0-9][0-9][0-9].vmdk" -a ! -name "*delta.vmdk" \) -exec grep -l 61f41183 {} \;
find /vmfs \( -name "*.vmdk" -a ! -name "*flat.vmdk" -a ! -name "*-s[0-9][0-9][0-9].vmdk" -a ! -name "*delta.vmdk" \) | while read line; do
  echo $line
  grep CID $line
  echo
done

esxcfg-vmhbadevs -q
esxcfg-vmhbadevs -m
fdisk -l | grep Disk
cd /vmfs/volumes; for i in `ls -F |grep /$`; do (vmkfstools -P $i; echo); done

esxcfg-mpath -a
esxcfg-mpath -l
esxcfg-vmhbadevs -q

cd /proc/vmware/config; for i in `find . -type f`; do esxcfg-advcfg -g ${i#*.}; done
for i in `awk -F[/\ ] '/adv/ {print "/"$3"/"$4}' /etc/vmware/esx.conf`; do esxcfg-advcfg -g $i ;done
esxcfg-info -o

vm-support
ps -efwww | grep vmx
service mgmt-vmware restart

vmware-cmd /vmfs/volumes/47c460ed-4173699d-e7e4-001b7837984c/99.1.73.148_Web03_Backup/99.1.73.148_Web03_Backup.vmx getconfig ide0:0.deviceType
vmware-cmd /vmfs/volumes/47c460b8-5263ce88-bb3a-001b7837984c/99.1.72.44_BServer/99.1.72.44_BServer.vmx getconfig "ide0:0.deviceType"

for i in `vmware-cmd -l`; do (echo $i; vmware-cmd $i getstate;echo);done
for i in `vmware-cmd -l`; do (echo $i; vmware-cmd $i getheartbeat;echo);done
for i in `vmware-cmd -l`; do (echo $i; vmware-cmd $i getuptime;echo);done
for i in `vmware-cmd -l`; do (echo $i; vmware-cmd $i gettoolslastactive;echo);done

for i in `vmware-cmd -l`; do (echo $i; vmware-cmd $i getguestinfo ip;echo);done
for i in `vmware-cmd -l`; do (echo $i; vmware-cmd $i getproductinfo platform;echo);done
for i in `vmware-cmd -l`; do (echo $i; vmware-cmd $i getproductinfo product;echo);done
for i in `vmware-cmd -l`; do (echo $i; for j in product platform build majorversion minorversion;do vmware-cmd $i getproductinfo $j;done;echo);done

for i in `vmware-cmd -l`; do (echo $i; vmware-cmd $i getresource cpu.number;echo);done
cat 1 | awk '$1~/^cpu/ || $1~/^mem/ || $1~/^disk/ || $1~/^net/ {print $1} END{print "worldid\npid\nuptime"}' |sed -e 's//}/'

for i in `vmware-cmd -l`; do
  HTL=`vmware-cmd $i getresource disk.HTL 2>/dev/null| awk '{print $NF}'`
  HTL=${HTL:=}
  mac=`vmware-cmd $i getresource net.adapters 2>/dev/null| awk '{print $NF}'`
  mac=${mac:=}
  echo $i
for j in `cat <cpu.number
cpu.emin
cpu.extrasec
cpu.syssec
cpu.uptime
cpu.usedsec
cpu.waitsec
cpu.affinity
cpu.htSharing
cpu.max
cpu.min
cpu.shares
mem.active
mem.cpt-tgt
memory
mem.cptread
mem.mctltgt
mem.memctl
mem.overhd
mem.ovhdmax
mem.shared
mem.size
mem.sizetgt
mem.swapin
mem.swapout
mem.swapped
mem.swaptgt
mem.affinity
mem.max
mem.min
mem.shares
disk.HTL
disk.${HTL}.KBread
disk.${HTL}.KBwritten
disk.${HTL}.busResets
disk.${HTL}.cmds
disk.${HTL}.cmdsAborted
disk.${HTL}.reads
disk.${HTL}.writes
disk.${HTL}.shares
net.adapters
net.${mac}.totKBRx
net.${mac}.totKBTx
net.${mac}.totPktsRx
net.${mac}.totPktsTx
worldid
pid
uptime
!
`; do (vmware-cmd $i getresource $j 2>/dev/null || echo $j);done
  echo
done

vmware-cmd /vmfs/volumes/47c460ed-4173699d-e7e4-001b7837984c/99.1.73.148_Web03_Backup/99.1.73.148_Web03_Backup.vmx getresource disk.vmhba1:0:3.KBread

esxcfg-boot -h
esxcfg-boot -q vmkmod
esxcfg-boot -q boot

 

 


[root@shoistvm07 config]# man -k esx
Hyper-Threading [hyperthreading] (8)  - VMware ESX Server Hyper-Threading support
NUMA -- Non-Uniform Memory Access [numa] (8)  - VMware ESX Server NUMA support
cpu                  (8)  - VMware ESX Server CPU resource management
diskbw               (8)  - VMware ESX Server disk bandwidth resource management
esxcfg-advcfg        (8)  - VMware ESX Server Advanced Configuration Option Tool
esxcfg-auth          (8)  - VMware ESX Server Network Management Utility
esxcfg-dumppart      (8)  - VMware ESX Server diagnostic partition configuration tool
esxcfg-firewall      (8)  - VMware ESX Server Firewall Configuration Tool
esxcfg-info          (8)  - VMware ESX Server Info tool
esxcfg-module        (8)  - VMware ESX Server Advanced Configuration Option Tool
esxcfg-mpath         (8)  - VMware ESX Server multipathing information
esxcfg-nas           (8)  - VMware ESX Server NAS configuration tool
esxcfg-nics          (8)  - VMware ESX Server Physical NIC information
esxcfg-resgrp        (8)  - VMware ESX Server resource group manipulation
esxcfg-route         (8)  - VMware ESX Server VMkernel IP stack default route Management Tool
esxcfg-swiscsi       (8)  - VMware ESX Server Software iSCSI configuration Tool
esxcfg-vmhbadevs     (8)  - VMware ESX Server SCSI HBA tool
esxcfg-vmknic        (8)  - VMware ESX Server VMkernel NIC configuration Tool
esxcfg-vswif         (8)  - VMware ESX Server Service Console NIC configuration Tool
esxcfg-vswitch       (8)  - VMware ESX Server Virtual Switch Configuration tool
esxtop               (1)  - display ESX Server resource utilization statistics
esxupdate            (8)  - VMware ESX Server software maintenance tool
mem                  (8)  - VMware ESX Server memory resource management
net                  (8)  - VMware ESX Server network interface management
storageMonitor       (1)  - Monitors sense errors experienced by storage devices attached to VMware ESX Server
vmkfstools           (1)  - VMware ESX Server file system management tool
[root@shoistvm07 config]#
[root@SHOISTVMW02 bin]# ls /usr/sbin | grep vm
esxcfg-vmhbadevs
esxcfg-vmknic
vmkchdev
vmkdump
vmkerrcode
vmkfstools
vmkiscsid
vmkiscsi-device
vmkiscsi-iname
vmkiscsi-ls
vmkiscsi-tool
vmkiscsi-util
vmkloader
vmkload_mod
vmklogger
vmkpcidivy
vmkping
vmkuptime.pl
vmres.pl
vmsnap_all
vmsnap.pl
vmware-authd
vmware-hostd
vmware-webAccess
[root@SHOISTVMW02 bin]# ls /usr/bin | grep vm
vmstat
vm-support
vmware
vmware-autostart.pl
vmware-cmd
vmware-config.pl
vmware-watchdog
[root@SHOISTVMW02 bin]#


[root@shoistvm07 D_sna_test]# esxcfg-vmhbadevs -q
vmhba0:0:0 /dev/cciss/c0d0
vmhba1:0:0 /dev/sda
vmhba1:0:1 /dev/sdb
vmhba1:0:2 /dev/sdc
vmhba1:0:3 /dev/sdd
vmhba1:0:4 /dev/sde
[root@shoistvm07 D_sna_test]# esxcfg-vmhbadevs -m
vmhba0:0:0:5        /dev/cciss/c0d0p5   47b9f8ca-593e1c09-973c-001b7837984c
vmhba1:0:0:1        /dev/sda1           47b280f9-6b47fc1d-8b36-001b78374ef4
vmhba1:0:1:1        /dev/sdb1           47b8b14e-8558d815-fc56-001b78374ef4
vmhba1:0:2:1        /dev/sdc1           47c460b8-5263ce88-bb3a-001b7837984c
vmhba1:0:3:1        /dev/sdd1           47c460ed-4173699d-e7e4-001b7837984c
vmhba1:0:4:1        /dev/sde1           47c4605f-d143d860-9320-001b7837984c
[root@shoistvm07 D_sna_test]# fdisk -l | grep Disk
Disk /dev/sda: 549.7 GB, 549755813888 bytes
Disk /dev/sdb: 1099.5 GB, 1099511627776 bytes
Disk /dev/sdc: 1099.5 GB, 1099511627776 bytes
Disk /dev/sdd: 1099.5 GB, 1099511627776 bytes
Disk /dev/sde: 549.7 GB, 549755813888 bytes
Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes
[root@shoistvm07 D_sna_test]# cd /vmfs/volumes; for i in `ls -F |grep /$`; do (vmkfstools -P $i; echo); done
VMFS-3.21 file system spanning 1 partitions.
File system label (if any): CX3_40_LUM100
Mode: public
Capacity 549487378432 (262016 file blocks * 2097152), 309405417472 (147536 blocks) avail
UUID: 47b280f9-6b47fc1d-8b36-001b78374ef4
Partitions spanned:
        vmhba1:0:0:1

VMFS-3.21 file system spanning 2 partitions.
File system label (if any): CX3_40_LUM200
Mode: public
Capacity 1098974756864 (1048064 file blocks * 1048576), 374504161280 (357155 blocks) avail
UUID: 47b8b14e-8558d815-fc56-001b78374ef4
Partitions spanned:
        vmhba1:0:1:1
        vmhba1:0:1:2

VMFS-3.21 file system spanning 1 partitions.
File system label (if any): storage1_96
Mode: public
Capacity 136902082560 (130560 file blocks * 1048576), 25647120384 (24459 blocks) avail
UUID: 47b9f8ca-593e1c09-973c-001b7837984c
Partitions spanned:
        vmhba0:0:0:5

VMFS-3.21 file system spanning 1 partitions.
File system label (if any): CX3_40_LUM101
Mode: public
Capacity 549487378432 (262016 file blocks * 2097152), 166394331136 (79343 blocks) avail
UUID: 47c4605f-d143d860-9320-001b7837984c
Partitions spanned:
        vmhba1:0:4:1

VMFS-3.21 file system spanning 1 partitions.
File system label (if any): CX3_40_LUM300_backup
Mode: public
Capacity 1099243192320 (262080 file blocks * 4194304), 672502120448 (160337 blocks) avail
UUID: 47c460b8-5263ce88-bb3a-001b7837984c
Partitions spanned:
        vmhba1:0:2:1

VMFS-3.21 file system spanning 1 partitions.
File system label (if any): CX3_40_LUM400_backup
Mode: public
Capacity 1099243192320 (262080 file blocks * 4194304), 852563591168 (203267 blocks) avail
UUID: 47c460ed-4173699d-e7e4-001b7837984c
Partitions spanned:
        vmhba1:0:3:1

[root@shoistvm07 volumes]#


[root@shoistvm07 etc]# esxcfg-mpath -a
vmhba1 500110a0001714de 14:0.0
[root@shoistvm07 etc]# esxcfg-mpath -l
Disk vmhba0:0:0 /dev/cciss/c0d0 (139979MB) has 1 paths and policy of Fixed
 Local 6:0.0 vmhba0:0:0 On active preferred

Disk vmhba1:0:0 /dev/sda (524288MB) has 2 paths and policy of Most Recently Used
 FC 14:0.0 500110a0001714de<->5006016141e07dae vmhba1:0:0 On active preferred
 FC 14:0.0 500110a0001714de<->5006016941e07dae vmhba1:1:0 Standby 

Disk vmhba1:0:1 /dev/sdb (1048576MB) has 2 paths and policy of Most Recently Used
 FC 14:0.0 500110a0001714de<->5006016141e07dae vmhba1:0:1 Standby  preferred
 FC 14:0.0 500110a0001714de<->5006016941e07dae vmhba1:1:1 On active

Disk vmhba1:0:2 /dev/sdc (1048576MB) has 2 paths and policy of Most Recently Used
 FC 14:0.0 500110a0001714de<->5006016141e07dae vmhba1:0:2 On active preferred
 FC 14:0.0 500110a0001714de<->5006016941e07dae vmhba1:1:2 Standby 

Disk vmhba1:0:3 /dev/sdd (1048576MB) has 2 paths and policy of Most Recently Used
 FC 14:0.0 500110a0001714de<->5006016141e07dae vmhba1:0:3 Standby  preferred
 FC 14:0.0 500110a0001714de<->5006016941e07dae vmhba1:1:3 On active

Disk vmhba1:0:4 /dev/sde (524288MB) has 2 paths and policy of Most Recently Used
 FC 14:0.0 500110a0001714de<->5006016141e07dae vmhba1:0:4 On active preferred
 FC 14:0.0 500110a0001714de<->5006016941e07dae vmhba1:1:4 Standby 

[root@shoistvm07 etc]# esxcfg-vmhbadevs -q
vmhba0:0:0 /dev/cciss/c0d0
vmhba1:0:0 /dev/sda
vmhba1:0:1 /dev/sdb
vmhba1:0:2 /dev/sdc
vmhba1:0:3 /dev/sdd
vmhba1:0:4 /dev/sde
[root@shoistvm07 etc]#


[root@shoistvm07 root]# cd /proc/vmware/config; for i in `find . -type f`; do esxcfg-advcfg -g ${i#*.}; done
Value of DeviceLockTries is 10
Value of DeviceLockWait is 1000
Value of DisallowSnapshotLun is 1
Value of EnableResignature is 0
Value of LvmMaxHeapSizeMB is 32
Value of FlushInterval is 30000
Value of HardMaxDirty is 95
Value of SoftMaxDirty is 15
Value of NBuffers is 64
Value of OpenIfNoJournal is 0
Value of HBTokenTimeout is 5000
Value of UseFileBlocksForDirsSymlinks is 1
Value of ZeroedThickVirtualDisks is 1
Value of MaxHBWait is 50000
Value of DentryCacheEnable is 1
Value of HBRenewalRetries is 8
Value of ClusterEvictRetries is 4
Value of ClusterEvictThreshold is 2
Value of EnableEagerEviction is 1
Value of ClusterLockRetries is 10
Value of ClusterLockWaitMult is 105
Value of MinClusterLockWait is 2000
Value of RemoveRetries is 5
Value of RenameRetries is 5
Value of TolerateSCSI3Incompliance is 1
Value of DoSyncDiskActions is 1
Value of LookupWait is 50
Value of LookupRetries is 5
Value of TransactionWait is 50
Value of TransactionRetries is 4
Value of VolumeRemountFrequency is 30
Value of ReceiveBufferSize is 128
Value of SendBufferSize is 264
Value of MaxVolumes is 8
Value of HeartbeatMaxFailures is 3
Value of HeartbeatDelta is 5
Value of HeartbeatTimeout is 5
Value of HeartbeatFrequency is 9
Value of LockDisable is 0
Value of LockRenewMaxFailureNumber is 3
Value of LockUpdateTimeout is 5
Value of DiskFileLockUpdateFreq is 10
Value of IndirectSend is 0
Value of CDROMSenseTimeout is 4
Value of ReaddirRetries is 3
Value of SCSITimeout_ReabortTime is 5000
Value of SCSITimeout_ScanTime is 1000
Value of MaxReserveTime is 100
Value of PrintCmdErrors is 0
Value of LogAborts is 0
Value of LogMultiPath is 0
Value of ConflictRetries is 80
Value of PassthroughLocking is 1
Value of PageInBeforeResume is 1
Value of PageInProgress is 15
Value of PageInTimeout is 180
Value of TSMaster is 0
Value of MemChksum is 0
Value of NetTimeout is 20
Value of PreCopyMinProgressMB is 16
Value of PreCopyLeftMB is 16
Value of Enabled is 1
Value of DirentryCacheShelfLife is 5000
Value of ImageParserOpts is 0
Value of VolShelfLife is 5000
Value of ObjShelfLife is 1000
Value of LockRetries is 15
Value of SANDevicesWithLevel3 is SYMM
Value of SANDevicesWithNonConstantSNInPage80 is HSV1:HSV2:DGC:MSA_VOLUME
Value of SANDevicesWithAPFailover is
Value of MaskLUNs is
Value of SPCmdsToSwitch is 50
Value of SPBlksToSwitch is 2048
Value of ResetOverdueLogPeriod is 60
Value of ResetThreadExpires is 1800
Value of ResetThreadMax is 16
Value of ResetThreadMin is 1
Value of ResetMaxRetries is 0
Value of ResetPeriod is 30
Value of MaxResetLatency is 2000
Value of ResetLatency is 1000
Value of DelayOnBusy is 400
Value of MaxDS400NotReadyTime is 60
Value of MaxVCNotReadyTime is 60
Value of PathEvalTime is 300
Value of ResetOnFailover is 0
Value of RetryUnitAttention is 1
Value of UseLunReset is 1
Value of UseDeviceReset is 1
Value of UseReportLUN is 1
Value of SupportSparseLUN is 1
Value of MaxLUN is 256
Value of SchedQControlVMSwitches is 6
Value of SchedQControlSeqReqs is 128
Value of SchedNumReqOutstanding is 16
Value of SchedQuantum is 8
Value of SectorMaxDiff is 2000
Value of SharesLow is 500
Value of SharesHigh is 2000
Value of SharesNormal is 1000
Value of PostMigUseActiveMetric is 0
Value of PageMigEnable is 1
Value of AutoMemAffinity is 1
Value of MonMigEnable is 1
Value of RebalanceCoresNode is 2
Value of RebalanceCoresTotal is 4
Value of RebalanceEnable is 1
Value of SwapLocalityEnable is 1
Value of SwapLoadEnable is 1
Value of MigThrashThreshold is 50
Value of MigThreshold is 2
Value of MigImbalanceThreshold is 10
Value of RebalancePeriod is 2000
Value of VMAdmitCheckPerVcpuMin is 1
Value of VMotionMinAllocPct is 30
Value of IntraCoreMigrate is 0
Value of IdlePackageRebalancePeriod is 541
Value of MachineClearThreshold is 100
Value of SkewSampleUsec is 1000
Value of IdleHalts is 1
Value of Quantum is 50
Value of CacheStats is 0
Value of BoundLagQuanta is 8
Value of CreditAgePeriod is 3000
Value of PcpuMigrateIdle is 1
Value of WakeupMigrateIdle is 0
Value of CellMigratePeriod is 1000
Value of MigratePeriod is 20
Value of SwapAsyncWritePages is 20
Value of SwapInBatchPages is 64
Value of SwapFilePersist is 0
Value of LowMemoryStateBT is 1
Value of kernelResvPad is 16
Value of ShareEstimateSamples is 100
Value of ShareEstimateProbe is 200
Value of ShareEstimatePeriod is 30000
Value of TestOnAlloc is 0
Value of SwapIORetry is 5000
Value of ShareCOSBufSize is 2
Value of MinFreePct is 6
Value of AdmitHeapMin is 1024
Value of AllocHighThreshold is 1500
Value of CtlMaxPercent is 65
Value of ShareScanTotal is 200
Value of ShareScanVM is 50
Value of IdleTax is 75
Value of SamplePeriod is 60
Value of BalancePeriod is 15
Value of TcpipHeapSize is 9
Value of MaxBeaconVlans is 100
Value of MinEtherLen is 60
Value of MaxBeaconsAtOnce is 100
Value of MaxPageInQueueLen is 500
Value of PortDisableTimeout is 5000
Value of PortKeepDetailedStats is 0
Value of PortTrackTxRace is 0
Value of PortFlushPktLimit is 64
Value of PortFlushIterLimit is 2
Value of PortSerializeInput is 1
Value of NoLocalCSum is 0
Value of EtherswitchHashSize is 1
Value of CoalesceTxAlwaysPoll is 1
Value of CoalesceHandlerPcpu is 1
Value of CoalesceLowRxMsRate is 6
Value of CoalesceLowTxMsRate is 4
Value of CoalesceDefaultOn is 1
Value of CoalesceTxTimeout is 2000
Value of NetPktAllocTries is 5
Value of NetTxDontClusterSize is 0
Value of NotifySwitch is 1
Value of ClusterHaltCheck is 1
Value of CopiesBeforeRemap is 10
Value of UseLegacyProc is 0
Value of UseProc is 0
Value of GuestTxCopyBreak is 64
Value of MaxNetifTxQueueLen is 100
Value of MaxNetifRxQueueLen is 100
Value of MaxPortRxQueueLen is 50
Value of CosCorefile is /vmfs/volumes/47b9f8ca-593e1c09-973c-001b7837984c/cos-core-shoistvm07
Value of ProcVerbose is
Value of IntTimeout is 0
Value of BHTimeout is 0
Value of WatchdogBacktrace is 0
Value of SerialBaudRate is 115200
Value of SerialPort is 0
Value of PsodOnCosPanic is 1
Value of KVMapGuardUncached is 1
Value of MemMapEntriesLow is 200
Value of MemAdmitMapEntriesMin is 30
Value of TimerMinGuestPeriod is 100
Value of TimerMaxHardPeriod is 1000
Value of TimerMinHardPeriod is 400
Value of EnableHighDMA is 0
Value of DebugBuddyEnable is 0
Value of DebugMemEnable is 0
Value of HeartbeatAnyPcpuPanic is 0
Value of HeartbeatPanicTimeout is 1800
Value of HeartbeatInterval is 10000
Value of HeartbeatTimeout is 60
Value of BlueScreenTimeout is 0
Value of MinimalPanic is 0
Value of LogWldPrefix is 1
Value of LogToSerial is 1
Value of LogToFile is 1
Value of IRQMaxLoadPct is 70
Value of IRQRebalancePeriod is 500
Value of BestVcpuRouting is 1
Value of RoutingPolicy is 1
[root@shoistvm07 config]#

[root@SHOISTVMW02 root]# esxcfg-advcfg -q -g /Misc/HostName
SHOISTVMW02
[root@SHOISTVMW02 root]# cd /proc/vmware/config/Misc
[root@SHOISTVMW02 Misc]# ls
BHTimeout          EnableHighDMA          IntTimeout          MemAdmitMapEntriesMin  SerialBaudRate       WatchdogBacktrace
BlueScreenTimeout  HeartbeatAnyPcpuPanic  KVMapGuardUncached  MemMapEntriesLow       SerialPort
CosCorefile        HeartbeatInterval      LogToFile           MinimalPanic           TimerMaxHardPeriod
DebugBuddyEnable   HeartbeatPanicTimeout  LogToSerial         ProcVerbose            TimerMinGuestPeriod
DebugMemEnable     HeartbeatTimeout       LogWldPrefix        PsodOnCosPanic         TimerMinHardPeriod
[root@SHOISTVMW02 Misc]# esxcfg-advcfg -q -g /Misc/HostIPAddr
99.1.73.93
[root@SHOISTVMW02 Misc]# esxcfg-advcfg  -g /Misc/HostIPAddr
Value of HostIPAddr is 99.1.73.93
[root@SHOISTVMW02 Misc]#

[root@SHOISTVMW02 Misc]# for i in `awk -F[/\ ] '/adv/ {print "/"$3"/"$4}' /etc/vmware/esx.conf`; do esxcfg-advcfg -g $i ;done
Value of DisallowSnapshotLun is 0
Value of EnableResignature is 1
Value of Enabled is 1
Value of CosCorefile is /vmfs/volumes/4797afbb-7323b47a-32a5-001b78372a6e/cos-core-SHOISTVMW02
Value of HostIPAddr is 99.1.73.93
Value of HostName is SHOISTVMW02
[root@SHOISTVMW02 Misc]#

[root@shoistvm07 bin]# vm-support

VMware ESX Server Support Script 1.28

Preparing files: /
Waiting up to 300 seconds for background commands to complete:

Waiting for background commands: -
Creating tar archive ...


File: /usr/bin/esx-2008-10-06--16.57.8300.tgz
Please attach this file when submitting an incident report.
To file a support incident, go to


To see the files collected, run: tar -tzf /usr/bin/esx-2008-10-06--16.57.8300.tgz

Done
[root@shoistvm07 bin]#


[root@SHOISTVMW02 bin]# ps -efwww | grep vmx
root      5029     1  0 Sep11 ?        00:00:57 /usr/lib/vmware/bin/vmkload_app /usr/lib/vmware/bin/vmware-vmx -ssched.group=host/user -@ pipe=/tmp/vmhsdaemon-0/vmxdfe502558077a9f6;vm=dfe502558077a9f6 /vmfs/volumes/47b280f9-6b47fc1d-8b36-001b78374ef4/99.1.73.126_yinqizhilian/99.1.73.126_yinqizhilian.vmx
root      5461     1  0 Sep11 ?        00:00:56 /usr/lib/vmware/bin/vmkload_app /usr/lib/vmware/bin/vmware-vmx -ssched.group=host/user -@ pipe=/tmp/vmhsdaemon-0/vmxfb7b8bab78ebb17c;vm=fb7b8bab78ebb17c /vmfs/volumes/47c460ed-4173699d-e7e4-001b7837984c/99.1.73.148_Web03_Backup/99.1.73.148_Web03_Backup.vmx
root     24191     1  0 Sep27 ?        00:00:22 /usr/lib/vmware/bin/vmkload_app /usr/lib/vmware/bin/vmware-vmx -ssched.group=host/user -@ pipe=/tmp/vmhsdaemon-0/vmx0a5ed5d3e868e7ee;vm=0a5ed5d3e868e7ee /vmfs/volumes/47c460b8-5263ce88-bb3a-001b7837984c/99.1.73.82_SocketServer_Backup/99.1.73.82_SocketServer_Backup.vmx
root     15001 12395  0 17:25 pts/0    00:00:00 grep vmx
[root@SHOISTVMW02 bin]#


[root@shoistvm07 root]# vmware-cmd 2>&1 | grep get
    /usr/bin/vmware-cmd -s getresource
    /usr/bin/vmware-cmd getconnectedusers
    /usr/bin/vmware-cmd getstate
    /usr/bin/vmware-cmd getconfig
    /usr/bin/vmware-cmd getguestinfo
    /usr/bin/vmware-cmd getproductinfo
    /usr/bin/vmware-cmd getconfigfile
    /usr/bin/vmware-cmd getheartbeat
    /usr/bin/vmware-cmd getuptime
    /usr/bin/vmware-cmd gettoolslastactive
    /usr/bin/vmware-cmd getresource
[root@shoistvm07 root]#


[root@SHOISTVMW02 root]# for i in `vmware-cmd -l`; do
>   HTL=`vmware-cmd $i getresource disk.HTL 2>/dev/null| awk '{print $NF}'`
>   HTL=${HTL:=}
>   mac=`vmware-cmd $i getresource net.adapters 2>/dev/null| awk '{print $NF}'`
>   mac=${mac:=}
>   echo $i
> for j in `cat <> cpu.number
> cpu.emin
> cpu.extrasec
> cpu.syssec
> cpu.uptime
> cpu.usedsec
> cpu.waitsec
> cpu.affinity
> cpu.htSharing
> cpu.max
> cpu.min
> cpu.shares
> mem.active
> mem.cpt-tgt
> memory
> mem.cptread
> mem.mctltgt
> mem.memctl
> mem.overhd
> mem.ovhdmax
> mem.shared
> mem.size
> mem.sizetgt
> mem.swapin
> mem.swapout
> mem.swapped
> mem.swaptgt
> mem.affinity
> mem.max
> mem.min
> mem.shares
> disk.HTL
> disk.${HTL}.KBread
> disk.${HTL}.KBwritten
> disk.${HTL}.busResets
> disk.${HTL}.cmds
> disk.${HTL}.cmdsAborted
> disk.${HTL}.reads
> disk.${HTL}.writes
> disk.${HTL}.shares
> net.adapters
> net.${mac}.totKBRx
> net.${mac}.totKBTx
> net.${mac}.totPktsRx
> net.${mac}.totPktsTx
> worldid
> pid
> uptime
> !
> `; do (vmware-cmd $i getresource $j 2>/dev/null || echo $j);done
>   echo
> done

/vmfs/volumes/47c460b8-5263ce88-bb3a-001b7837984c/99.1.72.44_BServer/99.1.72.44_BServer.vmx
getresource(cpu.number) = 4
cpu.emin
cpu.extrasec
cpu.syssec
cpu.uptime
cpu.usedsec
cpu.waitsec
cpu.affinity
cpu.htSharing
cpu.max
cpu.min
cpu.shares
mem.active
mem.cpt-tgt
memory
mem.cptread
mem.mctltgt
mem.memctl
mem.overhd
mem.ovhdmax
mem.shared
mem.size
mem.sizetgt
mem.swapin
mem.swapout
mem.swapped
mem.swaptgt
mem.affinity
getresource(mem.max) = 1024
getresource(mem.min) = 0
getresource(mem.shares) = 10240
disk.HTL
disk..KBread
disk..KBwritten
disk..busResets
disk..cmds
disk..cmdsAborted
disk..reads
disk..writes
disk..shares
getresource(net.adapters) = 4000
net.4000.totKBRx
net.4000.totKBTx
net.4000.totPktsRx
net.4000.totPktsTx
worldid
pid
uptime

/vmfs/volumes/47c460b8-5263ce88-bb3a-001b7837984c/99.1.73.82_SocketServer_Backup/99.1.73.82_SocketServer_Backup.vmx
getresource(cpu.number) = 2
cpu.emin
cpu.extrasec
cpu.syssec
getresource(cpu.uptime) = 881189
cpu.usedsec
cpu.waitsec
cpu.affinity
cpu.htSharing
cpu.max
cpu.min
cpu.shares
getresource(mem.active) = 104856
mem.cpt-tgt
memory
mem.cptread
getresource(mem.mctltgt) = 0
getresource(mem.memctl) = 0
getresource(mem.overhd) = 66668
getresource(mem.ovhdmax) = 66668
getresource(mem.shared) = 302660
getresource(mem.size) = 1048572
mem.sizetgt
getresource(mem.swapin) = 0
getresource(mem.swapout) = 0
getresource(mem.swapped) = 0
getresource(mem.swaptgt) = 0
mem.affinity
getresource(mem.max) = 1024
getresource(mem.min) = 0
getresource(mem.shares) = 1024
getresource(disk.HTL) = vmhba1:0:2
getresource(disk.vmhba1:0:2.KBread) = 3680849
getresource(disk.vmhba1:0:2.KBwritten) = 11480339
getresource(disk.vmhba1:0:2.busResets) = 0
getresource(disk.vmhba1:0:2.cmds) = 1658298
getresource(disk.vmhba1:0:2.cmdsAborted) = 0
getresource(disk.vmhba1:0:2.reads) = 637838
getresource(disk.vmhba1:0:2.writes) = 1020460
disk.vmhba1:0:2.shares
getresource(net.adapters) = 4000
getresource(net.4000.totKBRx) = 986818
getresource(net.4000.totKBTx) = 79271
getresource(net.4000.totPktsRx) = 3693180
getresource(net.4000.totPktsTx) = 589728
worldid
pid
uptime

/vmfs/volumes/47b280f9-6b47fc1d-8b36-001b78374ef4/99.1.73.126_yinqizhilian/99.1.73.126_yinqizhilian.vmx
getresource(cpu.number) = 2
cpu.emin
cpu.extrasec
cpu.syssec
getresource(cpu.uptime) = 2231927
cpu.usedsec
cpu.waitsec
cpu.affinity
cpu.htSharing
cpu.max
cpu.min
cpu.shares
getresource(mem.active) = 20968
mem.cpt-tgt
memory
mem.cptread
getresource(mem.mctltgt) = 0
getresource(mem.memctl) = 0
getresource(mem.overhd) = 66020
getresource(mem.ovhdmax) = 66020
getresource(mem.shared) = 639088
getresource(mem.size) = 1046424
mem.sizetgt
getresource(mem.swapin) = 0
getresource(mem.swapout) = 0
getresource(mem.swapped) = 2152
getresource(mem.swaptgt) = 0
mem.affinity
getresource(mem.max) = 1024
getresource(mem.min) = 0
getresource(mem.shares) = 1024
getresource(disk.HTL) = vmhba1:0:0
getresource(disk.vmhba1:0:0.KBread) = 41592
getresource(disk.vmhba1:0:0.KBwritten) = 22312300
getresource(disk.vmhba1:0:0.busResets) = 0
getresource(disk.vmhba1:0:0.cmds) = 1506694
getresource(disk.vmhba1:0:0.cmdsAborted) = 0
getresource(disk.vmhba1:0:0.reads) = 1705
getresource(disk.vmhba1:0:0.writes) = 1504989
disk.vmhba1:0:0.shares
getresource(net.adapters) = 4000
getresource(net.4000.totKBRx) = 1630297
getresource(net.4000.totKBTx) = 17928
getresource(net.4000.totPktsRx) = 8048869
getresource(net.4000.totPktsTx) = 122396
worldid
pid
uptime

/vmfs/volumes/47c460ed-4173699d-e7e4-001b7837984c/99.1.73.148_Web03_Backup/99.1.73.148_Web03_Backup.vmx
getresource(cpu.number) = 2
cpu.emin
cpu.extrasec
cpu.syssec
getresource(cpu.uptime) = 2231259
cpu.usedsec
cpu.waitsec
cpu.affinity
cpu.htSharing
cpu.max
cpu.min
cpu.shares
getresource(mem.active) = 41940
mem.cpt-tgt
memory
mem.cptread
getresource(mem.mctltgt) = 0
getresource(mem.memctl) = 0
getresource(mem.overhd) = 66080
getresource(mem.ovhdmax) = 66080
getresource(mem.shared) = 358160
getresource(mem.size) = 1048576
mem.sizetgt
getresource(mem.swapin) = 0
getresource(mem.swapout) = 0
getresource(mem.swapped) = 0
getresource(mem.swaptgt) = 0
mem.affinity
getresource(mem.max) = 1024
getresource(mem.min) = 0
getresource(mem.shares) = 1024
getresource(disk.HTL) = vmhba1:0:3
getresource(disk.vmhba1:0:3.KBread) = 9172443
getresource(disk.vmhba1:0:3.KBwritten) = 29197143
getresource(disk.vmhba1:0:3.busResets) = 0
getresource(disk.vmhba1:0:3.cmds) = 3988080
getresource(disk.vmhba1:0:3.cmdsAborted) = 0
getresource(disk.vmhba1:0:3.reads) = 1568859
getresource(disk.vmhba1:0:3.writes) = 2419221
disk.vmhba1:0:3.shares
getresource(net.adapters) = 4000
getresource(net.4000.totKBRx) = 1699537
getresource(net.4000.totKBTx) = 74853
getresource(net.4000.totPktsRx) = 8156879
getresource(net.4000.totPktsTx) = 237974
worldid
pid
uptime

[root@SHOISTVMW02 root]#

阅读(3448) | 评论(2) | 转发(0) |
给主人留下些什么吧!~~

小公猫2008-10-25 15:43:40

不好意思,我也不知道哦 :-(

chinaunix网友2008-10-22 15:20:09

老大,你知道vmres.pl这个命令怎么用吗?