Statistics
| Branch: | Tag: | Revision:

root / hscan.1 @ e2fa2baf

History | View | Annotate | Download (3.4 kB)

1
.TH HSCAN 1 2009-03-23 htools "Ganeti H-tools"
2
.SH NAME
3
hscan \- Scan clusters via RAPI and save node/instance data
4

    
5
.SH SYNOPSIS
6
.B hscan
7
.B "[-p]"
8
.B "[--no-headers]"
9
.BI "[-d " path "]"
10
.I cluster...
11

    
12
.B hscan
13
.B --version
14

    
15
.SH DESCRIPTION
16
hscan is a tool for scanning clusters via RAPI and saving their data
17
in the input format used by
18
.BR hbal "(1) and " hn1 "(1)."
19
It will also show a one-line score for each cluster scanned or, if
20
desired, the cluster state as show by the \fB-p\fR option to the other
21
tools.
22

    
23
For each cluster, two files named \fIcluster\fB.instances\fR and
24
\fIcluster\fB.nodes\fR will be generated holding the instance and node
25
data. These files can then be used in \fBhbal\fR(1) or \fBhn1\fR(1)
26
via the \fB-i\fR and \fB-n\fR options. In case the cluster name
27
contains slashes (as it can happen when the cluster is a
28
fully-specified URL), these will be replaced with underscores.
29

    
30
The one-line output for each cluster will show the following:
31
.RS
32
.TP
33
.B Name
34
The name of the cluster (or the IP address that was given, etc.)
35
.TP
36
.B Nodes
37
The number of nodes in the cluster
38
.TP
39
.B Inst
40
The number of instances in the cluster
41
.TP
42
.B BNode
43
The number of nodes failing N+1
44
.TP
45
.B BInst
46
The number of instances living on N+1-failed nodes
47
.TP
48
.B t_mem
49
Total memory in the cluster
50
.TP
51
.B f_mem
52
Free memory in the cluster
53
.TP
54
.B t_disk
55
Total disk in the cluster
56
.TP
57
.B f_disk
58
Free disk space in the cluster
59
.TP
60
.B Score
61
The score of the cluster, as would be reported by \fBhscan\fR(1) if
62
run on the generated data files.
63

    
64
.RE
65

    
66
In case of errors while collecting data, all fields after the name of
67
the cluster are replaced with the error display.
68

    
69
.B Note:
70
this output format is not yet final so it should not be used for
71
scripting yet.
72

    
73
.SH OPTIONS
74
The options that can be passed to the program are as follows:
75

    
76
.TP
77
.B -p, --print-nodes
78
Prints the node status for each cluster after the cluster's one-line
79
status display, in a format designed to allow the user to understand
80
the node's most important parameters. For details, see the man page
81
for \fBhbal\fR(1).
82

    
83
.TP
84
.BI "-d " path
85
Save the node and instance data for each cluster under \fIpath\fR,
86
instead of the current directory.
87

    
88
.TP
89
.B -V, --version
90
Just show the program version and exit.
91

    
92
.SH EXIT STATUS
93

    
94
The exist status of the command will be zero, unless for some reason
95
loading the input data failed fatally (e.g. wrong node or instance
96
data).
97

    
98
.SH BUGS
99

    
100
The program does not check its input data for consistency, and aborts
101
with cryptic errors messages in this case.
102

    
103
The RAPI collection doesn't deal with non-\fBdrbd\fR instances, and
104
chokes on input data which has such instances.
105

    
106
.SH EXAMPLE
107

    
108
.in +4n
109
.nf
110
.RB "$ " "hscan cluster1"
111
Name     Nodes  Inst BNode BInst  t_mem  f_mem t_disk f_disk      Score
112
cluster1     2     2     0     0   1008    652    255    253 0.24404762
113
.RB "$ " "ls -l cluster1.*"
114
-rw-r--r-- 1 root root 163 2009-03-23 07:26 cluster1.instances
115
-rw-r--r-- 1 root root  90 2009-03-23 07:26 cluster1.nodes
116
.fi
117
.in
118

    
119
.SH SEE ALSO
120
.BR hbal "(1), " hn1 "(1), " ganeti "(7), " gnt-instance "(8), " gnt-node "(8)"
121

    
122
.SH "COPYRIGHT"
123
.PP
124
Copyright (C) 2009 Google Inc. Permission is granted to copy,
125
distribute and/or modify under the terms of the GNU General Public
126
License as published by the Free Software Foundation; either version 2
127
of the License, or (at your option) any later version.
128
.PP
129
On Debian systems, the complete text of the GNU General Public License
130
can be found in /usr/share/common-licenses/GPL.