Merge lp:~tribaal/landscape-client/landscape-sysinfo-man-page into lp:~landscape/landscape-client/trunk
- landscape-sysinfo-man-page
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Thomas Herve |
Approved revision: | 585 |
Merged at revision: | 580 |
Proposed branch: | lp:~tribaal/landscape-client/landscape-sysinfo-man-page |
Merge into: | lp:~landscape/landscape-client/trunk |
Diff against target: |
428 lines (+251/-27) 11 files modified
.bzrignore (+1/-0) Makefile (+1/-0) debian/rules (+1/-1) landscape/deployment.py (+5/-5) landscape/sysinfo/deployment.py (+2/-2) man/landscape-client.1 (+1/-1) man/landscape-config.1 (+5/-9) man/landscape-config.txt (+4/-8) man/landscape-message.1 (+1/-1) man/landscape-sysinfo.1 (+132/-0) man/landscape-sysinfo.txt (+98/-0) |
To merge this branch: | bzr merge lp:~tribaal/landscape-client/landscape-sysinfo-man-page |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Thomas Herve (community) | Approve | ||
Jerry Seutter (community) | Approve | ||
Review via email:
|
Commit message
Description of the change
This branch reuses the submitted man page and commits it as a text file (to remain consistent with how we currently generate man pages using txt2man).
I'm not entirely sure if txt2man supports some of the fancier formatting that was originally submitted - don't hesitate to let me know if you think this first branch is not good enough.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Thomas Herve (therve) wrote : | # |
[1] The different default values are not displayed properly in the man version (-c, -d, -l). I realize it's the same for the other pages, it's be great to find a fix.
[2] Actually, most of the options are not relevant to sysinfo. Maybe using BaseConfiguration instead of Configuration would fix it.
Thanks!
- 582. By Chris Glass
-
Made landscape-sysinfo use BaseConfigruation instead of Configuration as suggested.
- 583. By Chris Glass
-
Fixed manpages displaying the default values incorrectly. This was due to linefeeds :(
- 584. By Chris Glass
-
Fixed extra whitelines in the FILES section
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Chris Glass (tribaal) wrote : | # |
Should be fixed
- 585. By Chris Glass
-
Forward-merging trunk
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Thomas Herve (therve) wrote : | # |
[3] There is still one extra line in man/landscape-
Looks great, +1!
- 586. By Chris Glass
-
Fixed extra log level linefeed
Preview Diff
1 | === modified file '.bzrignore' |
2 | --- .bzrignore 2012-03-22 15:11:27 +0000 |
3 | +++ .bzrignore 2012-09-20 09:57:20 +0000 |
4 | @@ -25,6 +25,7 @@ |
5 | man/landscape-client.1 |
6 | man/landscape-config.1 |
7 | man/landscape-message.1 |
8 | +man/landscape-sysinfo.1 |
9 | smart-update/smart-update |
10 | apt-update/apt-update |
11 | docs |
12 | |
13 | === modified file 'Makefile' |
14 | --- Makefile 2012-05-31 00:31:39 +0000 |
15 | +++ Makefile 2012-09-20 09:57:20 +0000 |
16 | @@ -61,6 +61,7 @@ |
17 | ${TXT2MAN} -P Landscape -s 1 -t landscape-client < man/landscape-client.txt > man/landscape-client.1 |
18 | ${TXT2MAN} -P Landscape -s 1 -t landscape-config < man/landscape-config.txt > man/landscape-config.1 |
19 | ${TXT2MAN} -P Landscape -s 1 -t landscape-message < man/landscape-message.txt > man/landscape-message.1 |
20 | + ${TXT2MAN} -P Landscape -s 1 -t landscape-sysinfo < man/landscape-sysinfo.txt > man/landscape-sysinfo.1 |
21 | |
22 | origtarball: sdist |
23 | cp -f sdist/landscape-client-$(TARBALL_VERSION).tar.gz \ |
24 | |
25 | === modified file 'debian/rules' |
26 | --- debian/rules 2012-09-05 15:37:17 +0000 |
27 | +++ debian/rules 2012-09-20 09:57:20 +0000 |
28 | @@ -77,7 +77,7 @@ |
29 | dh_testdir |
30 | dh_testroot |
31 | dh_installdocs |
32 | - dh_installman -p landscape-client man/landscape-client.1 man/landscape-config.1 man/landscape-message.1 |
33 | + dh_installman -p landscape-client man/landscape-client.1 man/landscape-config.1 man/landscape-message.1 man/landscape-sysinfo.1 |
34 | dh_installchangelogs |
35 | dh_install --sourcedir debian/tmp/ |
36 | dh_installinit -- start 45 2 3 4 5 . stop 15 0 1 6 . |
37 | |
38 | === modified file 'landscape/deployment.py' |
39 | --- landscape/deployment.py 2012-09-14 07:05:37 +0000 |
40 | +++ landscape/deployment.py 2012-09-20 09:57:20 +0000 |
41 | @@ -230,12 +230,17 @@ |
42 | @return: An L{OptionParser} preset with options that all |
43 | landscape-related programs accept. These include |
44 | - C{config} (C{None}) |
45 | + - C{data_path} (C{"/var/lib/landscape/client/"}) |
46 | """ |
47 | parser = OptionParser(version=VERSION) |
48 | parser.add_option("-c", "--config", metavar="FILE", |
49 | help="Use config from this file (any command line " |
50 | "options override settings from the file) " |
51 | "(default: '/etc/landscape/client.conf').") |
52 | + parser.add_option("-d", "--data-path", metavar="PATH", |
53 | + default="/var/lib/landscape/client/", |
54 | + help="The directory to store data files in " |
55 | + "(default: '/var/lib/landscape/client/').") |
56 | return parser |
57 | |
58 | def get_config_filename(self): |
59 | @@ -278,7 +283,6 @@ |
60 | |
61 | @return: An L{OptionParser} preset for all options |
62 | from L{BaseConfiguration.make_parser} plus: |
63 | - - C{data_path} (C{"/var/lib/landscape/client/"}) |
64 | - C{quiet} (C{False}) |
65 | - C{log_dir} (C{"/var/log/landscape"}) |
66 | - C{log_level} (C{"info"}) |
67 | @@ -292,10 +296,6 @@ |
68 | - C{ignore_sigint} (C{False}) |
69 | """ |
70 | parser = super(Configuration, self).make_parser() |
71 | - parser.add_option("-d", "--data-path", metavar="PATH", |
72 | - default="/var/lib/landscape/client/", |
73 | - help="The directory to store data files in " |
74 | - "(default: '/var/lib/landscape/client/').") |
75 | parser.add_option("-q", "--quiet", default=False, action="store_true", |
76 | help="Do not log to the standard output.") |
77 | parser.add_option("-l", "--log-dir", metavar="FILE", |
78 | |
79 | === modified file 'landscape/sysinfo/deployment.py' |
80 | --- landscape/sysinfo/deployment.py 2011-02-08 08:10:05 +0000 |
81 | +++ landscape/sysinfo/deployment.py 2012-09-20 09:57:20 +0000 |
82 | @@ -7,7 +7,7 @@ |
83 | from twisted.python.reflect import namedClass |
84 | from twisted.internet.defer import Deferred, maybeDeferred |
85 | |
86 | -from landscape.deployment import Configuration |
87 | +from landscape.deployment import BaseConfiguration |
88 | from landscape.sysinfo.sysinfo import SysInfoPluginRegistry, format_sysinfo |
89 | |
90 | |
91 | @@ -15,7 +15,7 @@ |
92 | "LoggedInUsers", "LandscapeLink", "Network"] |
93 | |
94 | |
95 | -class SysInfoConfiguration(Configuration): |
96 | +class SysInfoConfiguration(BaseConfiguration): |
97 | """Specialized configuration for the Landscape sysinfo tool.""" |
98 | |
99 | default_config_filenames = ("/etc/landscape/client.conf",) |
100 | |
101 | === modified file 'man/landscape-client.1' |
102 | --- man/landscape-client.1 2012-09-18 08:57:15 +0000 |
103 | +++ man/landscape-client.1 2012-09-20 09:57:20 +0000 |
104 | @@ -1,5 +1,5 @@ |
105 | .\"Text automatically generated by txt2man |
106 | -.TH landscape-client 1 "18 September 2012" "" "" |
107 | +.TH landscape-client 1 "20 September 2012" "" "" |
108 | .SH NAME |
109 | \fBlandscape-client \fP- Landscape system client |
110 | \fB |
111 | |
112 | === modified file 'man/landscape-config.1' |
113 | --- man/landscape-config.1 2012-09-18 08:57:15 +0000 |
114 | +++ man/landscape-config.1 2012-09-20 09:57:20 +0000 |
115 | @@ -1,5 +1,5 @@ |
116 | .\"Text automatically generated by txt2man |
117 | -.TH landscape-config 1 "18 September 2012" "" "" |
118 | +.TH landscape-config 1 "20 September 2012" "" "" |
119 | .SH NAME |
120 | \fBlandscape-config \fP- configure the Landscape management client |
121 | \fB |
122 | @@ -42,13 +42,11 @@ |
123 | .B |
124 | \fB-c\fP FILE, \fB--config\fP=FILE |
125 | Use config from this file (any command line \fIoptions\fP |
126 | -override settings from the file) (default: |
127 | -'/etc/landscape/client.conf'). |
128 | +override settings from the file) (default: '/etc/landscape/client.conf'). |
129 | .TP |
130 | .B |
131 | \fB-d\fP PATH, \fB--data-path\fP=PATH |
132 | -The directory to store data files in (default: |
133 | -'/var/lib/landscape/client'). |
134 | +The directory to store data files in (default: '/var/lib/landscape/client'). |
135 | .TP |
136 | .B |
137 | \fB-q\fP, \fB--quiet\fP |
138 | @@ -56,13 +54,11 @@ |
139 | .TP |
140 | .B |
141 | \fB-l\fP FILE, \fB--log-dir\fP=FILE |
142 | -The directory to write log files to (default: |
143 | -'/var/log/landscape'). |
144 | +The directory to write log files to (default: '/var/log/landscape'). |
145 | .TP |
146 | .B |
147 | \fB--log-level\fP=LOG_LEVEL |
148 | -One of 'debug', 'info', 'warning', 'error' or |
149 | -'critical' (default: 'info'). |
150 | +One of 'debug', 'info', 'warning', 'error' or 'critical' (default: 'info'). |
151 | .TP |
152 | .B |
153 | \fB--ignore-sigint\fP |
154 | |
155 | === modified file 'man/landscape-config.txt' |
156 | --- man/landscape-config.txt 2012-09-18 08:57:15 +0000 |
157 | +++ man/landscape-config.txt 2012-09-20 09:57:20 +0000 |
158 | @@ -26,15 +26,11 @@ |
159 | --version Show program's version number and exit. |
160 | -h, --help Show this help message and exit. |
161 | -c FILE, --config=FILE Use config from this file (any command line options |
162 | - override settings from the file) (default: |
163 | - '/etc/landscape/client.conf'). |
164 | - -d PATH, --data-path=PATH The directory to store data files in (default: |
165 | - '/var/lib/landscape/client'). |
166 | + override settings from the file) (default: '/etc/landscape/client.conf'). |
167 | + -d PATH, --data-path=PATH The directory to store data files in (default: '/var/lib/landscape/client'). |
168 | -q, --quiet Do not log to the standard output. |
169 | - -l FILE, --log-dir=FILE The directory to write log files to (default: |
170 | - '/var/log/landscape'). |
171 | - --log-level=LOG_LEVEL One of 'debug', 'info', 'warning', 'error' or |
172 | - 'critical' (default: 'info'). |
173 | + -l FILE, --log-dir=FILE The directory to write log files to (default: '/var/log/landscape'). |
174 | + --log-level=LOG_LEVEL One of 'debug', 'info', 'warning', 'error' or 'critical' (default: 'info'). |
175 | --ignore-sigint Ignore interrupt signals. |
176 | --ignore-sigusr1 Ignore SIGUSR1 signal to rotate logs. |
177 | -a NAME, --account-name=NAME The account this computer belongs to. |
178 | |
179 | === modified file 'man/landscape-message.1' |
180 | --- man/landscape-message.1 2012-09-18 08:57:15 +0000 |
181 | +++ man/landscape-message.1 2012-09-20 09:57:20 +0000 |
182 | @@ -1,5 +1,5 @@ |
183 | .\"Text automatically generated by txt2man |
184 | -.TH landscape-message 1 "18 September 2012" "" "" |
185 | +.TH landscape-message 1 "20 September 2012" "" "" |
186 | .SH NAME |
187 | \fBlandscape-message \fP- Send a message to the landscape web interface |
188 | \fB |
189 | |
190 | === added file 'man/landscape-sysinfo.1' |
191 | --- man/landscape-sysinfo.1 1970-01-01 00:00:00 +0000 |
192 | +++ man/landscape-sysinfo.1 2012-09-20 09:57:20 +0000 |
193 | @@ -0,0 +1,132 @@ |
194 | +.\"Text automatically generated by txt2man |
195 | +.TH landscape-sysinfo 1 "20 September 2012" "" "" |
196 | +.SH NAME |
197 | +\fBlandscape-sysinfo \fP- Display a summary of the current system status |
198 | +\fB |
199 | +.SH SYNOPSIS |
200 | +.nf |
201 | +.fam C |
202 | + |
203 | +\fBlandscape-sysinfo\fP [\fIoptions\fP] |
204 | + |
205 | +.fam T |
206 | +.fi |
207 | +.fam T |
208 | +.fi |
209 | +.SH DESCRIPTION |
210 | + |
211 | +\fBlandscape-sysinfo\fP is a utility that displays information about the computer it is run |
212 | +on. This information is displayed upon login for console users |
213 | +(ssh and terminal login supported) and can also be seen at anytime |
214 | +by just calling \fBlandscape-sysinfo\fP from the command line. |
215 | +.PP |
216 | +The information displayed at login time is updated by update-motd. On |
217 | +systems where update-motd is not available, such as Ubuntu Dapper or |
218 | +Hardy, the output of \fBlandscape-sysinfo\fP is not included. |
219 | +.PP |
220 | +The output of \fBlandscape-sysinfo\fP can be controlled by enabling or |
221 | +disabling its plugins. See below how to do that. |
222 | +.PP |
223 | +If the system load is higher than the number of cores, as determined by the |
224 | +count of processor lines in /proc/cpuinfo, then |
225 | +\fBlandscape-sysinfo\fP will not run at login time. This is to prevent it from |
226 | +potentially making a bad situation worse by interfering with what could be an |
227 | +administrator logging in to try to fix the problem causing the high load. |
228 | +.SH OPTIONS |
229 | +.TP |
230 | +.B |
231 | +\fB--version\fP |
232 | +show program's version number and exit |
233 | +.TP |
234 | +.B |
235 | +\fB-h\fP, \fB--help\fP |
236 | +show this help message and exit |
237 | +.TP |
238 | +.B |
239 | +\fB-c\fP FILE, \fB--config\fP=FILE |
240 | +Use config from this file (any command line \fIoptions\fP |
241 | +override settings from the file) (default: '/etc/landscape/client.conf'). |
242 | +.TP |
243 | +.B |
244 | +\fB-d\fP PATH, \fB--data-path\fP=PATH |
245 | +The directory to store data files in (default: '/var/lib/landscape/client/'). |
246 | +.TP |
247 | +.B |
248 | +\fB--sysinfo-plugins\fP=PLUGIN_LIST |
249 | +Comma-delimited list of sysinfo plugins to use. |
250 | +Default is to use all plugins. |
251 | +.TP |
252 | +.B |
253 | +\fB--exclude-sysinfo-plugins\fP=PLUGIN_LIST |
254 | +Comma-delimited list of sysinfo plugins to NOT use. |
255 | +This always take precedence over plugins to include. |
256 | +.RE |
257 | +.PP |
258 | +Default plugins: Load, Disk, Memory, Temperature, Processes, LoggedInUsers, |
259 | +LandscapeLink, Network |
260 | +.SH CONFIGURATION FILE |
261 | + |
262 | +Any of the long command-line \fIoptions\fP can be used as a configuration directive |
263 | +in that configuration file, under the section [sysinfo], by replacing the hyphen |
264 | +(-) with an underscore (_). |
265 | +.PP |
266 | +For example, to disable the LandscapeLink and Temperature plugins |
267 | +without having to use the command line option, the following can be added to |
268 | +/etc/landscape/client.conf: |
269 | +.PP |
270 | +.nf |
271 | +.fam C |
272 | + [sysinfo] |
273 | + exclude_sysinfo_plugins = Temperature, LandscapeLink |
274 | + |
275 | + |
276 | +.fam T |
277 | +.fi |
278 | +.SH EXAMPLES |
279 | + |
280 | +This is the default configuration with all plugins enabled: |
281 | +.PP |
282 | +.nf |
283 | +.fam C |
284 | + $ landscape-sysinfo |
285 | + System load: 0.66 Processes: 242 |
286 | + Usage of /home: 72.0% of 27.50GB Users logged in: 1 |
287 | + Memory usage: 31% IP address for wlan0: 10.0.1.6 |
288 | + Swap usage: 0% IP address for virbr0: 192.168.122.1 |
289 | + Temperature: 47 C |
290 | + |
291 | + => There is 1 zombie process. |
292 | + |
293 | + Graph this data and manage this system at https://landscape.canonical.com/ |
294 | + |
295 | +.fam T |
296 | +.fi |
297 | +If you want to disable the temperature and Landscape plugins, you could run it like this: |
298 | +.PP |
299 | +.nf |
300 | +.fam C |
301 | + $ landscape-sysinfo --exclude-sysinfo-plugins=Temperature,LandscapeLink |
302 | + System load: 1.08 Processes: 242 |
303 | + Usage of /home: 72.0% of 27.50GB Users logged in: 1 |
304 | + Memory usage: 31% IP address for wlan0: 10.0.1.6 |
305 | + Swap usage: 0% IP address for virbr0: 192.168.122.1 |
306 | + |
307 | + => There is 1 zombie process. |
308 | + |
309 | +.fam T |
310 | +.fi |
311 | +.SH FILES |
312 | +.TP |
313 | +.B |
314 | +/etc/landscape/client.conf |
315 | +Configuration file |
316 | +.TP |
317 | +.B |
318 | +/var/log/landscape/sysinfo.log |
319 | +Log file for when the tool is run as root. This file will usually be empty, |
320 | +unless something wrong happened. In that case, it will have more information |
321 | +about the problem. |
322 | +When a regular non-root user runs the tool, the log file is ~/.landscape/sysinfo.log. |
323 | +.SH SEE ALSO |
324 | +\fBlandscape-client\fP(1) |
325 | +\fBupdate-motd\fP(5) |
326 | |
327 | === added file 'man/landscape-sysinfo.txt' |
328 | --- man/landscape-sysinfo.txt 1970-01-01 00:00:00 +0000 |
329 | +++ man/landscape-sysinfo.txt 2012-09-20 09:57:20 +0000 |
330 | @@ -0,0 +1,98 @@ |
331 | +NAME |
332 | + landscape-sysinfo - Display a summary of the current system status |
333 | + |
334 | +SYNOPSIS |
335 | + |
336 | + landscape-sysinfo [options] |
337 | + |
338 | +DESCRIPTION |
339 | + |
340 | +landscape-sysinfo is a utility that displays information about the computer it is run |
341 | +on. This information is displayed upon login for console users |
342 | +(ssh and terminal login supported) and can also be seen at anytime |
343 | +by just calling landscape-sysinfo from the command line. |
344 | + |
345 | +The information displayed at login time is updated by update-motd. On |
346 | +systems where update-motd is not available, such as Ubuntu Dapper or |
347 | +Hardy, the output of landscape-sysinfo is not included. |
348 | + |
349 | +The output of landscape-sysinfo can be controlled by enabling or |
350 | +disabling its plugins. See below how to do that. |
351 | + |
352 | +If the system load is higher than the number of cores, as determined by the |
353 | +count of processor lines in /proc/cpuinfo, then |
354 | +landscape-sysinfo will not run at login time. This is to prevent it from |
355 | +potentially making a bad situation worse by interfering with what could be an |
356 | +administrator logging in to try to fix the problem causing the high load. |
357 | + |
358 | +OPTIONS |
359 | + --version show program's version number and exit |
360 | + -h, --help show this help message and exit |
361 | + -c FILE, --config=FILE |
362 | + Use config from this file (any command line options |
363 | + override settings from the file) (default: '/etc/landscape/client.conf'). |
364 | + -d PATH, --data-path=PATH |
365 | + The directory to store data files in (default: '/var/lib/landscape/client/'). |
366 | + --sysinfo-plugins=PLUGIN_LIST |
367 | + Comma-delimited list of sysinfo plugins to use. |
368 | + Default is to use all plugins. |
369 | + --exclude-sysinfo-plugins=PLUGIN_LIST |
370 | + Comma-delimited list of sysinfo plugins to NOT use. |
371 | + This always take precedence over plugins to include. |
372 | + |
373 | +Default plugins: Load, Disk, Memory, Temperature, Processes, LoggedInUsers, |
374 | +LandscapeLink, Network |
375 | + |
376 | +CONFIGURATION FILE |
377 | + |
378 | +Any of the long command-line options can be used as a configuration directive |
379 | +in that configuration file, under the section [sysinfo], by replacing the hyphen |
380 | +(-) with an underscore (_). |
381 | + |
382 | +For example, to disable the LandscapeLink and Temperature plugins |
383 | +without having to use the command line option, the following can be added to |
384 | +/etc/landscape/client.conf: |
385 | + |
386 | + [sysinfo] |
387 | + exclude_sysinfo_plugins = Temperature, LandscapeLink |
388 | + |
389 | + |
390 | +EXAMPLES |
391 | + |
392 | +This is the default configuration with all plugins enabled: |
393 | + |
394 | + $ landscape-sysinfo |
395 | + System load: 0.66 Processes: 242 |
396 | + Usage of /home: 72.0% of 27.50GB Users logged in: 1 |
397 | + Memory usage: 31% IP address for wlan0: 10.0.1.6 |
398 | + Swap usage: 0% IP address for virbr0: 192.168.122.1 |
399 | + Temperature: 47 C |
400 | + |
401 | + => There is 1 zombie process. |
402 | + |
403 | + Graph this data and manage this system at https://landscape.canonical.com/ |
404 | + |
405 | +If you want to disable the temperature and Landscape plugins, you could run it like this: |
406 | + |
407 | + $ landscape-sysinfo --exclude-sysinfo-plugins=Temperature,LandscapeLink |
408 | + System load: 1.08 Processes: 242 |
409 | + Usage of /home: 72.0% of 27.50GB Users logged in: 1 |
410 | + Memory usage: 31% IP address for wlan0: 10.0.1.6 |
411 | + Swap usage: 0% IP address for virbr0: 192.168.122.1 |
412 | + |
413 | + => There is 1 zombie process. |
414 | + |
415 | +FILES |
416 | +/etc/landscape/client.conf |
417 | +Configuration file |
418 | + |
419 | +/var/log/landscape/sysinfo.log |
420 | +Log file for when the tool is run as root. This file will usually be empty, |
421 | +unless something wrong happened. In that case, it will have more information |
422 | +about the problem. |
423 | +When a regular non-root user runs the tool, the log file is ~/.landscape/sysinfo.log. |
424 | + |
425 | +SEE ALSO |
426 | +landscape-client(1) |
427 | +update-motd(5) |
428 | + |
+1 looks good
Right-justification should be turned off. There are spaces unevenly interspersed in the text.
The FILES list has a blank line under each file so it looks like the explanation could either belong to the file above or the file below. This is a minor nitpick and I don't care if it gets fixed.