Command line tools - PVE 3.x: Difference between revisions

From Proxmox VE
Jump to navigation Jump to search
(→‎qm: added link to Manual:_qm which is more recent and more complete)
No edit summary
Line 1: Line 1:
=Introduction=
= Introduction =
This page lists the important Proxmox VE and Debian command line tools. All CLI tools have also manual pages.


=KVM specific=
This page lists the important Proxmox VE and Debian command line tools. All CLI tools have also manual pages.
==qm==
qm - qemu/kvm manager - see [[Manual:_qm]] and [[qm manual]]


=OpenVZ specific=
= KVM specific =
==vzctl==


vzctl - utility to control an OpenVZ container - see [[vzctl manual]]
== qm  ==


==vztop==
qm - qemu/kvm manager - see [[Manual: qm]] and [[Qm manual]]


vztop - display top CPU processes
= OpenVZ specific  =


==user_beancounters==
== vzctl  ==
cat /proc/user_beancounters
 
vzctl - utility to control an OpenVZ container - see [[Vzctl manual]]
 
== vztop  ==
 
vztop - display top CPU processes
 
== user_beancounters ==
 
cat /proc/user_beancounters  
 
== vzlist  ==


==vzlist==
:example:
:example:
<pre>
<pre>vzlist
vzlist
       CTID      NPROC STATUS    IP_ADDR        HOSTNAME
       CTID      NPROC STATUS    IP_ADDR        HOSTNAME
       101        26 running  -              localhost.fantinibakery.com
       101        26 running  -              localhost.fantinibakery.com
       102        121 running  10.100.100.18  mediawiki.fantinibakery.com
       102        121 running  10.100.100.18  mediawiki.fantinibakery.com
       114        49 running  -              fbc14.fantinibakery.com
       114        49 running  -              fbc14.fantinibakery.com
</pre>
</pre>  
= Backup  =
 
== vzdump  ==


=Backup=
vzdump - backup utility for virtual machine - see [[Vzdump manual]]
==vzdump==


vzdump - backup utility for virtual machine - see [[Vzdump manual]]
== vzrestore  ==


==vzrestore==
vzrestore - restore OpenVZ vzdump backups - see [[Vzrestore manual]]


vzrestore - restore OpenVZ vzdump backups - see [[vzrestore manual]]
== qmrestore  ==


==qmrestore==
qmrestore - restore KVM vzdump backups - see [[Qmrestore manual]]


qmrestore - restore KVM vzdump backups - see [[qmrestore manual]]
= Cluster management  =


=Cluster management=
== pveca ==
==pveca==


PVE Cluster Administration Toolkit
PVE Cluster Administration Toolkit  


===USAGE===
=== USAGE ===
* pveca -l            # show cluster status
* pveca -c            # create new cluster with localhost as master
* pveca -s [-h IP]    # sync cluster configuration from master (or IP)
* pveca -d ID          # delete a node
* pveca -a [-h IP]    # add new node to cluster
* pveca -m            # force local node to become master
* pveca -i            # print node info (CID NAME IP ROLE)


=Software version check=
*pveca -l # show cluster status
==pveversion==
*pveca -c # create new cluster with localhost as master
*pveca -s [-h IP] # sync cluster configuration from master (or IP)
*pveca -d ID # delete a node
*pveca -a [-h IP] # add new node to cluster
*pveca -m # force local node to become master
*pveca -i # print node info (CID NAME IP ROLE)


Proxmox VE version info - Print version information for Proxmox VE packages.
= Software version check =


===USAGE===
== pveversion  ==
pveversion [--verbose]
 
Proxmox VE version info - Print version information for Proxmox VE packages.
 
=== USAGE ===
 
pveversion [--verbose]  
 
*without any argument shows the version of pve-manager, something like:


* without any argument shows the version of pve-manager, something like:
:pve-manager/1.5/4660
:pve-manager/1.5/4660


* with -v argument it shows a list of programs versions related to pve, like:
*with -v argument it shows a list of programs versions related to pve, like:


:pve-manager: 1.5-7 (pve-manager/1.5/4660)
:pve-manager: 1.5-7 (pve-manager/1.5/4660)  
:running kernel: 2.6.18-2-pve
:running kernel: 2.6.18-2-pve  
:proxmox-ve-2.6.18: 1.5-5
:proxmox-ve-2.6.18: 1.5-5  
:pve-kernel-2.6.18-2-pve: 2.6.18-5
:pve-kernel-2.6.18-2-pve: 2.6.18-5  
:pve-kernel-2.6.18-1-pve: 2.6.18-4
:pve-kernel-2.6.18-1-pve: 2.6.18-4  
:qemu-server: 1.1-11
:qemu-server: 1.1-11  
:pve-firmware: 1.0-3
:pve-firmware: 1.0-3  
:libpve-storage-perl: 1.0-10
:libpve-storage-perl: 1.0-10  
:vncterm: 0.9-2
:vncterm: 0.9-2  
:vzctl: 3.0.23-1pve8
:vzctl: 3.0.23-1pve8  
:vzdump: 1.2-5
:vzdump: 1.2-5  
:vzprocps: 2.0.11-1dso2
:vzprocps: 2.0.11-1dso2  
:vzquota: 3.0.11-1
:vzquota: 3.0.11-1  
:pve-qemu-kvm-2.6.18: 0.9.1-5
:pve-qemu-kvm-2.6.18: 0.9.1-5


==aptitude==
== aptitude ==
Standard Debian package update tool
 
=LVM=
Standard Debian package update tool  
=iSCSI=
 
=DRBD=
= LVM =
See [[DRBD]]
 
=Debian Appliance Builder=
Most of the commands in LVM are very similar to each other. Each valid command is preceded by one of the following:
==dab==
 
See [[Debian_Appliance_Builder]]
*Physical Volume = pv
=Other useful tools=
*Volume Group = vg
==pveperf==
*Logical Volume = lv
Simple host performance test.
 
=== USAGE  ===
 
{| width="200" border="1" align="center" cellpadding="1" cellspacing="1"
|-
| <br>
| Logical Volume Management
| Physicl Volume
| Volume Group
| Logical Volume
|-
|
| LVM
| PV
| VG
| LV
|-
| s
| No
| Yes
|
Yes
 
| Yes
|-
| display
| No
| Yes
| Yes
| Yes
|-
| create
| No
| Yes
| Yes
| Yes
|-
| rename
| No
| No
| Yes
| Yes
|-
| change
| Yes
| Yes
| Yes
| Yes
|-
| move
| No
| Yes
| Yes
| No
|-
| extend
| No
| No
| Yes
| Yes
|-
| reduce
| No
| No
| Yes
| Yes
|-
| resize
| No
| Yes
| No
| Yes
|-
| split
| No
| No
| Yes
| No
|-
| merge
| No
| No
| Yes
| No
|-
| convert
| No
| No
| Yes
| Yes
|-
| import
| No
| No
| Yes
| No
|-
| export
| No
| No
| Yes
| No
|-
| importclone
| No
| No
| Yes
| No
|-
| cfgbackup
| No
| No
| Yes
| No
|-
| cfgrestore
| No
| No
| Yes
| No
|-
| ck
| No
| Yes
| Yes
| No
|-
| scan
| diskscan
| Yes
| Yes
| Yes
|-
| mknodes
| No
| No
| Yes
| No
|-
| remove
| No
| Yes
| Yes
| Yes
|-
| dump
| Yes
| No
| No
| No
|}
 
<br>
 
= iSCSI  =
 
= DRBD  =
 
See [[DRBD]]


(from man page)
= Debian Appliance Builder  =
 
== dab  ==
 
See [[Debian Appliance Builder]]
 
= Other useful tools  =
 
== pveperf  ==
 
Simple host performance test.
 
(from man page)  
 
=== USAGE  ===


===USAGE===
:pveperf [PATH]
:pveperf [PATH]


===DESCRIPTION===
=== DESCRIPTION ===
 
:Tries to gather some CPU/Hardisk performance data on the hardisk mounted at PATH (/ is used as default)
:Tries to gather some CPU/Hardisk performance data on the hardisk mounted at PATH (/ is used as default)
It dumps on the terminal:


* CPU BOGOMIPS: bogomips sum of all CPUs
It dumps on the terminal:  
* REGEX/SECOND: regular expressions per second (perl performance test), should be above 300000
* HD SIZE: harddisk size
* BUFFERED READS: simple HD read test. Modern HDs should reach at least 40 MB/sec
* AVERAGE SEEK TIME: tests average seek time. Fast SCSI HDs reach values < 8 milliseconds. Common IDE/SATA disks get values from 15 to 20 ms.
* FSYNCS/SECOND: value should be greater than 200 (you should enable "write back" cache mode on you RAID controller - needs a battery backed cache (BBWC)).
* DNS EXT: average time to resolve an external DNS name
* DNS INT: average time to resolve a local DNS name


Note: this command may require root privileges (or sudo) to run, otherwise you get an error after "HD SIZE" value, like:
*CPU BOGOMIPS: bogomips sum of all CPUs
<<sh: /proc/sys/vm/drop_caches: Permission denied
*REGEX/SECOND: regular expressions per second (perl performance test), should be above 300000
unable to open HD at /usr/bin/pveperf line 149.>>
*HD SIZE: harddisk size
*BUFFERED READS: simple HD read test. Modern HDs should reach at least 40 MB/sec
*AVERAGE SEEK TIME: tests average seek time. Fast SCSI HDs reach values &lt; 8 milliseconds. Common IDE/SATA disks get values from 15 to 20 ms.
*FSYNCS/SECOND: value should be greater than 200 (you should enable "write back" cache mode on you RAID controller - needs a battery backed cache (BBWC)).
*DNS EXT: average time to resolve an external DNS name
*DNS INT: average time to resolve a local DNS name


Note: this command may require root privileges (or sudo) to run, otherwise you get an error after "HD SIZE" value, like: &lt;&lt;sh: /proc/sys/vm/drop_caches: Permission denied unable to open HD at /usr/bin/pveperf line 149.&gt;&gt;


[[Category: HOWTO]][[Category: Installation]]
[[Category:HOWTO]] [[Category:Installation]]

Revision as of 08:37, 10 March 2013

Introduction

This page lists the important Proxmox VE and Debian command line tools. All CLI tools have also manual pages.

KVM specific

qm

qm - qemu/kvm manager - see Manual: qm and Qm manual

OpenVZ specific

vzctl

vzctl - utility to control an OpenVZ container - see Vzctl manual

vztop

vztop - display top CPU processes

user_beancounters

cat /proc/user_beancounters

vzlist

example:
vzlist
      CTID      NPROC STATUS    IP_ADDR         HOSTNAME
       101         26 running   -               localhost.fantinibakery.com
       102        121 running   10.100.100.18   mediawiki.fantinibakery.com
       114         49 running   -               fbc14.fantinibakery.com

Backup

vzdump

vzdump - backup utility for virtual machine - see Vzdump manual

vzrestore

vzrestore - restore OpenVZ vzdump backups - see Vzrestore manual

qmrestore

qmrestore - restore KVM vzdump backups - see Qmrestore manual

Cluster management

pveca

PVE Cluster Administration Toolkit

USAGE

  • pveca -l # show cluster status
  • pveca -c # create new cluster with localhost as master
  • pveca -s [-h IP] # sync cluster configuration from master (or IP)
  • pveca -d ID # delete a node
  • pveca -a [-h IP] # add new node to cluster
  • pveca -m # force local node to become master
  • pveca -i # print node info (CID NAME IP ROLE)

Software version check

pveversion

Proxmox VE version info - Print version information for Proxmox VE packages.

USAGE

pveversion [--verbose]

  • without any argument shows the version of pve-manager, something like:
pve-manager/1.5/4660
  • with -v argument it shows a list of programs versions related to pve, like:
pve-manager: 1.5-7 (pve-manager/1.5/4660)
running kernel: 2.6.18-2-pve
proxmox-ve-2.6.18: 1.5-5
pve-kernel-2.6.18-2-pve: 2.6.18-5
pve-kernel-2.6.18-1-pve: 2.6.18-4
qemu-server: 1.1-11
pve-firmware: 1.0-3
libpve-storage-perl: 1.0-10
vncterm: 0.9-2
vzctl: 3.0.23-1pve8
vzdump: 1.2-5
vzprocps: 2.0.11-1dso2
vzquota: 3.0.11-1
pve-qemu-kvm-2.6.18: 0.9.1-5

aptitude

Standard Debian package update tool

LVM

Most of the commands in LVM are very similar to each other. Each valid command is preceded by one of the following:

  • Physical Volume = pv
  • Volume Group = vg
  • Logical Volume = lv

USAGE


Logical Volume Management Physicl Volume Volume Group Logical Volume
LVM PV VG LV
s No Yes

Yes

Yes
display No Yes Yes Yes
create No Yes Yes Yes
rename No No Yes Yes
change Yes Yes Yes Yes
move No Yes Yes No
extend No No Yes Yes
reduce No No Yes Yes
resize No Yes No Yes
split No No Yes No
merge No No Yes No
convert No No Yes Yes
import No No Yes No
export No No Yes No
importclone No No Yes No
cfgbackup No No Yes No
cfgrestore No No Yes No
ck No Yes Yes No
scan diskscan Yes Yes Yes
mknodes No No Yes No
remove No Yes Yes Yes
dump Yes No No No


iSCSI

DRBD

See DRBD

Debian Appliance Builder

dab

See Debian Appliance Builder

Other useful tools

pveperf

Simple host performance test.

(from man page)

USAGE

pveperf [PATH]

DESCRIPTION

Tries to gather some CPU/Hardisk performance data on the hardisk mounted at PATH (/ is used as default)

It dumps on the terminal:

  • CPU BOGOMIPS: bogomips sum of all CPUs
  • REGEX/SECOND: regular expressions per second (perl performance test), should be above 300000
  • HD SIZE: harddisk size
  • BUFFERED READS: simple HD read test. Modern HDs should reach at least 40 MB/sec
  • AVERAGE SEEK TIME: tests average seek time. Fast SCSI HDs reach values < 8 milliseconds. Common IDE/SATA disks get values from 15 to 20 ms.
  • FSYNCS/SECOND: value should be greater than 200 (you should enable "write back" cache mode on you RAID controller - needs a battery backed cache (BBWC)).
  • DNS EXT: average time to resolve an external DNS name
  • DNS INT: average time to resolve a local DNS name

Note: this command may require root privileges (or sudo) to run, otherwise you get an error after "HD SIZE" value, like: <<sh: /proc/sys/vm/drop_caches: Permission denied unable to open HD at /usr/bin/pveperf line 149.>>