Allow overriding the field list in -p
[ganeti-local] / hspace.1
index d88982c..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 "[-p]"
+.BI "[ -p[" fields "] ]"
 .B "[-v... | -q]"
 
 .B hspace
@@ -15,12 +15,14 @@ hspace \- Cluster space analyzer for Ganeti
 
 .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:
@@ -33,6 +35,8 @@ Request options:
 .BI "[--memory " mem "]"
 .BI "[--disk " disk "]"
 .BI "[--req-nodes " req-nodes "]"
+.BI "[--vcpus " vcpus "]"
+.BI "[--tiered-alloc " spec "]"
 
 
 .SH DESCRIPTION
@@ -130,6 +134,17 @@ size that can be still created on the cluster.
 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.
@@ -160,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.
 
+.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:
 
@@ -177,6 +198,10 @@ The number of nodes for the instances; the default of two means
 mirrored instances, while passing one means plain type instances.
 
 .TP
+.BI "--vcpus " vcpus
+The number of VCPUs of the instances to be placed (defaults to 1).
+
+.TP
 .BI "--max-cpu " cpu-ratio
 The maximum virtual-to-physical cpu ratio, as a floating point number
 between zero and one. For example, specifying \fIcpu-ratio\fR as
@@ -196,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.
 
-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
@@ -253,6 +281,18 @@ percent of free disk
 .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
@@ -295,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
+.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
@@ -331,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
-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), "