Allow overriding the field list in -p
[ganeti-local] / hspace.1
index 960bc67..075f01d 100644 (file)
--- a/hspace.1
+++ b/hspace.1
@@ -7,7 +7,7 @@ hspace \- Cluster space analyzer for Ganeti
 .B "[backend options...]"
 .B "[algorithm options...]"
 .B "[request options..."]
 .B "[backend options...]"
 .B "[algorithm options...]"
 .B "[request options..."]
-.B "[-p]"
+.BI "[ -p[" fields "] ]"
 .B "[-v... | -q]"
 
 .B hspace
 .B "[-v... | -q]"
 
 .B hspace
@@ -15,12 +15,14 @@ hspace \- Cluster space analyzer for Ganeti
 
 .TP
 Backend options:
 
 .TP
 Backend options:
-.BI "[ -m " cluster " ]"
+.BI " -m " cluster
 |
 |
-.BI "[ -L[" path "]]"
+.BI " -L[" path "]"
 |
 |
-.BI "[ -n " nodes-file " ]"
-.BI "[ -i " instances-file " ]"
+.BI " -n " nodes-file
+.BI " -i " instances-file
+|
+.BI " --simulate " spec
 
 .TP
 Algorithm options:
 
 .TP
 Algorithm options:
@@ -34,6 +36,7 @@ Request options:
 .BI "[--disk " disk "]"
 .BI "[--req-nodes " req-nodes "]"
 .BI "[--vcpus " vcpus "]"
 .BI "[--disk " disk "]"
 .BI "[--req-nodes " req-nodes "]"
 .BI "[--vcpus " vcpus "]"
+.BI "[--tiered-alloc " spec "]"
 
 
 .SH DESCRIPTION
 
 
 .SH DESCRIPTION
@@ -131,6 +134,17 @@ size that can be still created on the cluster.
 Like the above but for disk.
 
 .TP
 Like the above but for disk.
 
 .TP
+.I TSPEC
+If the tiered allocation mode has been enabled, this parameter holds
+the pairs of specifications and counts of instances that can be
+created in this mode. The value of the key is a space-separated list
+of values; each value is of the form \fImemory,disk,vcpu=count\fR
+where the memory, disk and vcpu are the values for the current spec,
+and count is how many instances of this spec can be created. A
+complete value for this variable could be: \fB4096,102400,2=225
+2560,102400,2=20 512,102400,2=21\fR.
+
+.TP
 .I ALLOC_USAGE
 The current usage represented as initial number of instances divided
 per final number of instances.
 .I ALLOC_USAGE
 The current usage represented as initial number of instances divided
 per final number of instances.
@@ -161,6 +175,12 @@ having value "1". If this key is not present in the output it means
 that the computation failed and any values present should not be
 relied upon.
 
 that the computation failed and any values present should not be
 relied upon.
 
+.PP
+
+If the tiered allocation mode is enabled, then many of the INI_/FIN_
+metrics will be also displayed with a TRL_ prefix, and denote the
+cluster status at the end of the tiered allocation run.
+
 .SH OPTIONS
 The options that can be passed to the program are as follows:
 
 .SH OPTIONS
 The options that can be passed to the program are as follows:
 
@@ -201,7 +221,10 @@ that at least one quarter of disk space should be left free on nodes.
 Prints the before and after node status, in a format designed to allow
 the user to understand the node's most important parameters.
 
 Prints the before and after node status, in a format designed to allow
 the user to understand the node's most important parameters.
 
-The node list will contain these informations:
+It is possible to customise the listed information by passing a
+comma-separated list of field names to this option (the field list is
+currently undocumented). By default, the node list will contain these
+informations:
 .RS
 .TP
 .B F
 .RS
 .TP
 .B F
@@ -258,6 +281,18 @@ percent of free disk
 .TP
 .B r_cpu
 ratio of virtual to physical cpus
 .TP
 .B r_cpu
 ratio of virtual to physical cpus
+.TP
+.B lCpu
+the dynamic CPU load (if the information is available)
+.TP
+.B lMem
+the dynamic memory load (if the information is available)
+.TP
+.B lDsk
+the dynamic disk load (if the information is available)
+.TP
+.B lNet
+the dynamic net load (if the information is available)
 .RE
 
 .TP
 .RE
 
 .TP
@@ -300,6 +335,71 @@ socket on which the master daemon listens; otherwise, the default path
 used by ganeti when installed with "--localstatedir=/var" is used.
 
 .TP
 used by ganeti when installed with "--localstatedir=/var" is used.
 
 .TP
+.BI "--simulate " description
+Instead of using actual data, build an empty cluster given a node
+description. The \fIdescription\fR parameter must be a comma-separated
+list of four elements, describing in order:
+
+.RS
+
+.RS
+.TP
+the number of nodes in the cluster
+
+.TP
+the disk size of the nodes, in mebibytes
+
+.TP
+the memory size of the nodes, in mebibytes
+
+.TP
+the cpu core count for the nodes
+
+.RE
+
+An example description would be \fB20,102400,16384,4\fR describing a
+20-node cluster where each node has 100GiB of disk space, 16GiB of
+memory and 4 CPU cores. Note that all nodes must have the same specs
+currently.
+
+.RE
+
+.TP
+.BI "--tiered-alloc " spec
+Beside the standard, fixed-size allocation, also do a tiered
+allocation scheme where the algorithm starts from the given
+specification and allocates until there is no more space; then it
+decreases the specification and tries the allocation again. The
+decrease is done on the matric that last failed during allocation. The
+specification given is similar to the "--simulate" option and it
+holds:
+
+.RS
+
+.RS
+
+.TP
+the disk size of the instance
+
+.TP
+the memory size of the instance
+
+.TP
+the vcpu count for the insance
+
+.RE
+
+An example description would be \fB10240,8192,2\fR describing an
+initial starting specification of 10GiB of disk space, 4GiB of memory
+and 2 VCPUs.
+
+Also note that the normal allocation and the tiered allocation are
+independent, and both start from the initial cluster state; as such,
+the instance count for these two modes are not related one to another.
+
+.RE
+
+.TP
 .B -v, --verbose
 Increase the output verbosity. Each usage of this option will increase
 the verbosity (currently more than 2 doesn't make sense) from the
 .B -v, --verbose
 Increase the output verbosity. Each usage of this option will increase
 the verbosity (currently more than 2 doesn't make sense) from the
@@ -336,7 +436,7 @@ taking into consideration the impact on future placements.
 If the variables \fBHTOOLS_NODES\fR and \fBHTOOLS_INSTANCES\fR are
 present in the environment, they will override the default names for
 the nodes and instances files. These will have of course no effect
 If the variables \fBHTOOLS_NODES\fR and \fBHTOOLS_INSTANCES\fR are
 present in the environment, they will override the default names for
 the nodes and instances files. These will have of course no effect
-when RAPI is used.
+when the RAPI or Luxi backends are used.
 
 .SH SEE ALSO
 .BR hbal "(1), " hscan "(1), " ganeti "(7), " gnt-instance "(8), "
 
 .SH SEE ALSO
 .BR hbal "(1), " hscan "(1), " ganeti "(7), " gnt-instance "(8), "