Helpfull XenServer Commands

1
xe help --all|more

Show a list of XenServer CLI commands

1
xsconsole

Runs up the XenServer text based console

1
xe-toolstack-restart

Restarts the XenServer management tools

1
ls –l

List files in a Directory

1
less /var/log/dmesg

Display Boot Messages from Linux

1
xe host-dmesg

Xen Hypervisor Boot messages

1
tail –f /var/log/xensource.log

Look at xapi messages as they happen

1
tail –f /var/log/xensource.log | grep xxx

Look at xapi messages only for vm uuid xxx

1
tail –f [log name] > [target filename]

Send output to a file for analysis later

1
cat /etc/xensource-inventory

Display XenSource Inventory info

1
xen-bugtool --yes

Build a status report when xapi is down

1
xe-backup-metadata -d –u [uuid of SR]

Back up Pool metadata for all VMs

1
tcpdump –i [inf] –vvv –w [filename]

Get a Packet trace from [inf]. E.g. Inf=eth0, xenbr0, vif2.0 etc.

1
top

List the top processes running in Dom0

1
xentop

List top Xen processes

1
mpstat 5

Processor stats in Dom0

1
vmstat 2

Virtual memory in Dom0

1
netstat –s

Networking statistics

1
iostat -d 2 6

Storage traffic stats

1
list_domains

Lists VMs that are running

1
fdisk –l

List the disk partitions

1
hdparm –t /dev/sda3

Device read times for sda3 (normally local SR)

1
pvs

Show local and remote LVHD SRs

1
ll /dev/disks/by-id

Look at disk partitions

1
lvs

List logical volumes (virtual disks)

1
vgs

List LVM volume groups

1
cd /var/run/sr-mount

Look at NFS SRs

1
df -h

Shows how much disk space you have left

1
dd if=/dev/sdb of=/dev/null iflag=direct bs=1M count=512

Read data performance from sdb.

1
dd if=/dev/zero of=/dev/sdb oflag=direct bs=1M count=4096

Write performance on sdb. * Don’t use on disks with VMs on them!

1
ifconfig

Show info on NICs, virtual switches and vNICs

1
brctl show

Show info on virtual switches

1
ethtool eth0

Info for NIC eth0

1
mii-tool

Info on NIC bonding

1
iscsiadm -m discovery --type sendtargets --port 192.168.250.14

Discover iSCSI targets available to this server

1
iscsiadm –m session

Open iscsi sessions

1
history

Lists the history of commands you’ve used

1
!136

Executes command #136 in the history

1
history -w history-list.txt

Writes the history info to a text file

Залишити відповідь