Merge lp:~tribaal/landscape-client/landscape-sysinfo-man-page into lp:~landscape/landscape-client/trunk

Proposed by Chris Glass
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
Reviewer Review Type Date Requested Status
Thomas Herve (community) Approve
Jerry Seutter (community) Approve
Review via email: mp+124861@code.launchpad.net

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.

To post a comment you must log in.
Revision history for this message
Jerry Seutter (jseutter) wrote :

+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.

review: Approve
Revision history for this message
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!

review: Needs Fixing
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

Revision history for this message
Chris Glass (tribaal) wrote :

Should be fixed

585. By Chris Glass

Forward-merging trunk

Revision history for this message
Thomas Herve (therve) wrote :

[3] There is still one extra line in man/landscape-config.1 for the log-level option.

Looks great, +1!

review: Approve
586. By Chris Glass

Fixed extra log level linefeed

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
--- .bzrignore 2012-03-22 15:11:27 +0000
+++ .bzrignore 2012-09-20 09:57:20 +0000
@@ -25,6 +25,7 @@
25man/landscape-client.125man/landscape-client.1
26man/landscape-config.126man/landscape-config.1
27man/landscape-message.127man/landscape-message.1
28man/landscape-sysinfo.1
28smart-update/smart-update29smart-update/smart-update
29apt-update/apt-update30apt-update/apt-update
30docs31docs
3132
=== modified file 'Makefile'
--- Makefile 2012-05-31 00:31:39 +0000
+++ Makefile 2012-09-20 09:57:20 +0000
@@ -61,6 +61,7 @@
61 ${TXT2MAN} -P Landscape -s 1 -t landscape-client < man/landscape-client.txt > man/landscape-client.161 ${TXT2MAN} -P Landscape -s 1 -t landscape-client < man/landscape-client.txt > man/landscape-client.1
62 ${TXT2MAN} -P Landscape -s 1 -t landscape-config < man/landscape-config.txt > man/landscape-config.162 ${TXT2MAN} -P Landscape -s 1 -t landscape-config < man/landscape-config.txt > man/landscape-config.1
63 ${TXT2MAN} -P Landscape -s 1 -t landscape-message < man/landscape-message.txt > man/landscape-message.163 ${TXT2MAN} -P Landscape -s 1 -t landscape-message < man/landscape-message.txt > man/landscape-message.1
64 ${TXT2MAN} -P Landscape -s 1 -t landscape-sysinfo < man/landscape-sysinfo.txt > man/landscape-sysinfo.1
6465
65origtarball: sdist66origtarball: sdist
66 cp -f sdist/landscape-client-$(TARBALL_VERSION).tar.gz \67 cp -f sdist/landscape-client-$(TARBALL_VERSION).tar.gz \
6768
=== modified file 'debian/rules'
--- debian/rules 2012-09-05 15:37:17 +0000
+++ debian/rules 2012-09-20 09:57:20 +0000
@@ -77,7 +77,7 @@
77 dh_testdir77 dh_testdir
78 dh_testroot78 dh_testroot
79 dh_installdocs79 dh_installdocs
80 dh_installman -p landscape-client man/landscape-client.1 man/landscape-config.1 man/landscape-message.180 dh_installman -p landscape-client man/landscape-client.1 man/landscape-config.1 man/landscape-message.1 man/landscape-sysinfo.1
81 dh_installchangelogs81 dh_installchangelogs
82 dh_install --sourcedir debian/tmp/82 dh_install --sourcedir debian/tmp/
83 dh_installinit -- start 45 2 3 4 5 . stop 15 0 1 6 .83 dh_installinit -- start 45 2 3 4 5 . stop 15 0 1 6 .
8484
=== modified file 'landscape/deployment.py'
--- landscape/deployment.py 2012-09-14 07:05:37 +0000
+++ landscape/deployment.py 2012-09-20 09:57:20 +0000
@@ -230,12 +230,17 @@
230 @return: An L{OptionParser} preset with options that all230 @return: An L{OptionParser} preset with options that all
231 landscape-related programs accept. These include231 landscape-related programs accept. These include
232 - C{config} (C{None})232 - C{config} (C{None})
233 - C{data_path} (C{"/var/lib/landscape/client/"})
233 """234 """
234 parser = OptionParser(version=VERSION)235 parser = OptionParser(version=VERSION)
235 parser.add_option("-c", "--config", metavar="FILE",236 parser.add_option("-c", "--config", metavar="FILE",
236 help="Use config from this file (any command line "237 help="Use config from this file (any command line "
237 "options override settings from the file) "238 "options override settings from the file) "
238 "(default: '/etc/landscape/client.conf').")239 "(default: '/etc/landscape/client.conf').")
240 parser.add_option("-d", "--data-path", metavar="PATH",
241 default="/var/lib/landscape/client/",
242 help="The directory to store data files in "
243 "(default: '/var/lib/landscape/client/').")
239 return parser244 return parser
240245
241 def get_config_filename(self):246 def get_config_filename(self):
@@ -278,7 +283,6 @@
278283
279 @return: An L{OptionParser} preset for all options284 @return: An L{OptionParser} preset for all options
280 from L{BaseConfiguration.make_parser} plus:285 from L{BaseConfiguration.make_parser} plus:
281 - C{data_path} (C{"/var/lib/landscape/client/"})
282 - C{quiet} (C{False})286 - C{quiet} (C{False})
283 - C{log_dir} (C{"/var/log/landscape"})287 - C{log_dir} (C{"/var/log/landscape"})
284 - C{log_level} (C{"info"})288 - C{log_level} (C{"info"})
@@ -292,10 +296,6 @@
292 - C{ignore_sigint} (C{False})296 - C{ignore_sigint} (C{False})
293 """297 """
294 parser = super(Configuration, self).make_parser()298 parser = super(Configuration, self).make_parser()
295 parser.add_option("-d", "--data-path", metavar="PATH",
296 default="/var/lib/landscape/client/",
297 help="The directory to store data files in "
298 "(default: '/var/lib/landscape/client/').")
299 parser.add_option("-q", "--quiet", default=False, action="store_true",299 parser.add_option("-q", "--quiet", default=False, action="store_true",
300 help="Do not log to the standard output.")300 help="Do not log to the standard output.")
301 parser.add_option("-l", "--log-dir", metavar="FILE",301 parser.add_option("-l", "--log-dir", metavar="FILE",
302302
=== modified file 'landscape/sysinfo/deployment.py'
--- landscape/sysinfo/deployment.py 2011-02-08 08:10:05 +0000
+++ landscape/sysinfo/deployment.py 2012-09-20 09:57:20 +0000
@@ -7,7 +7,7 @@
7from twisted.python.reflect import namedClass7from twisted.python.reflect import namedClass
8from twisted.internet.defer import Deferred, maybeDeferred8from twisted.internet.defer import Deferred, maybeDeferred
99
10from landscape.deployment import Configuration10from landscape.deployment import BaseConfiguration
11from landscape.sysinfo.sysinfo import SysInfoPluginRegistry, format_sysinfo11from landscape.sysinfo.sysinfo import SysInfoPluginRegistry, format_sysinfo
1212
1313
@@ -15,7 +15,7 @@
15 "LoggedInUsers", "LandscapeLink", "Network"]15 "LoggedInUsers", "LandscapeLink", "Network"]
1616
1717
18class SysInfoConfiguration(Configuration):18class SysInfoConfiguration(BaseConfiguration):
19 """Specialized configuration for the Landscape sysinfo tool."""19 """Specialized configuration for the Landscape sysinfo tool."""
2020
21 default_config_filenames = ("/etc/landscape/client.conf",)21 default_config_filenames = ("/etc/landscape/client.conf",)
2222
=== modified file 'man/landscape-client.1'
--- man/landscape-client.1 2012-09-18 08:57:15 +0000
+++ man/landscape-client.1 2012-09-20 09:57:20 +0000
@@ -1,5 +1,5 @@
1.\"Text automatically generated by txt2man1.\"Text automatically generated by txt2man
2.TH landscape-client 1 "18 September 2012" "" ""2.TH landscape-client 1 "20 September 2012" "" ""
3.SH NAME3.SH NAME
4\fBlandscape-client \fP- Landscape system client4\fBlandscape-client \fP- Landscape system client
5\fB5\fB
66
=== modified file 'man/landscape-config.1'
--- man/landscape-config.1 2012-09-18 08:57:15 +0000
+++ man/landscape-config.1 2012-09-20 09:57:20 +0000
@@ -1,5 +1,5 @@
1.\"Text automatically generated by txt2man1.\"Text automatically generated by txt2man
2.TH landscape-config 1 "18 September 2012" "" ""2.TH landscape-config 1 "20 September 2012" "" ""
3.SH NAME3.SH NAME
4\fBlandscape-config \fP- configure the Landscape management client4\fBlandscape-config \fP- configure the Landscape management client
5\fB5\fB
@@ -42,13 +42,11 @@
42.B42.B
43\fB-c\fP FILE, \fB--config\fP=FILE43\fB-c\fP FILE, \fB--config\fP=FILE
44Use config from this file (any command line \fIoptions\fP44Use config from this file (any command line \fIoptions\fP
45override settings from the file) (default:45override settings from the file) (default: '/etc/landscape/client.conf').
46'/etc/landscape/client.conf').
47.TP46.TP
48.B47.B
49\fB-d\fP PATH, \fB--data-path\fP=PATH48\fB-d\fP PATH, \fB--data-path\fP=PATH
50The directory to store data files in (default:49The directory to store data files in (default: '/var/lib/landscape/client').
51'/var/lib/landscape/client').
52.TP50.TP
53.B51.B
54\fB-q\fP, \fB--quiet\fP52\fB-q\fP, \fB--quiet\fP
@@ -56,13 +54,11 @@
56.TP54.TP
57.B55.B
58\fB-l\fP FILE, \fB--log-dir\fP=FILE56\fB-l\fP FILE, \fB--log-dir\fP=FILE
59The directory to write log files to (default:57The directory to write log files to (default: '/var/log/landscape').
60'/var/log/landscape').
61.TP58.TP
62.B59.B
63\fB--log-level\fP=LOG_LEVEL60\fB--log-level\fP=LOG_LEVEL
64One of 'debug', 'info', 'warning', 'error' or 61One of 'debug', 'info', 'warning', 'error' or 'critical' (default: 'info').
65'critical' (default: 'info').
66.TP62.TP
67.B63.B
68\fB--ignore-sigint\fP64\fB--ignore-sigint\fP
6965
=== modified file 'man/landscape-config.txt'
--- man/landscape-config.txt 2012-09-18 08:57:15 +0000
+++ man/landscape-config.txt 2012-09-20 09:57:20 +0000
@@ -26,15 +26,11 @@
26 --version Show program's version number and exit.26 --version Show program's version number and exit.
27 -h, --help Show this help message and exit.27 -h, --help Show this help message and exit.
28 -c FILE, --config=FILE Use config from this file (any command line options28 -c FILE, --config=FILE Use config from this file (any command line options
29 override settings from the file) (default:29 override settings from the file) (default: '/etc/landscape/client.conf').
30 '/etc/landscape/client.conf').30 -d PATH, --data-path=PATH The directory to store data files in (default: '/var/lib/landscape/client').
31 -d PATH, --data-path=PATH The directory to store data files in (default:
32 '/var/lib/landscape/client').
33 -q, --quiet Do not log to the standard output.31 -q, --quiet Do not log to the standard output.
34 -l FILE, --log-dir=FILE The directory to write log files to (default:32 -l FILE, --log-dir=FILE The directory to write log files to (default: '/var/log/landscape').
35 '/var/log/landscape').33 --log-level=LOG_LEVEL One of 'debug', 'info', 'warning', 'error' or 'critical' (default: 'info').
36 --log-level=LOG_LEVEL One of 'debug', 'info', 'warning', 'error' or
37 'critical' (default: 'info').
38 --ignore-sigint Ignore interrupt signals.34 --ignore-sigint Ignore interrupt signals.
39 --ignore-sigusr1 Ignore SIGUSR1 signal to rotate logs.35 --ignore-sigusr1 Ignore SIGUSR1 signal to rotate logs.
40 -a NAME, --account-name=NAME The account this computer belongs to.36 -a NAME, --account-name=NAME The account this computer belongs to.
4137
=== modified file 'man/landscape-message.1'
--- man/landscape-message.1 2012-09-18 08:57:15 +0000
+++ man/landscape-message.1 2012-09-20 09:57:20 +0000
@@ -1,5 +1,5 @@
1.\"Text automatically generated by txt2man1.\"Text automatically generated by txt2man
2.TH landscape-message 1 "18 September 2012" "" ""2.TH landscape-message 1 "20 September 2012" "" ""
3.SH NAME3.SH NAME
4\fBlandscape-message \fP- Send a message to the landscape web interface4\fBlandscape-message \fP- Send a message to the landscape web interface
5\fB5\fB
66
=== added file 'man/landscape-sysinfo.1'
--- man/landscape-sysinfo.1 1970-01-01 00:00:00 +0000
+++ man/landscape-sysinfo.1 2012-09-20 09:57:20 +0000
@@ -0,0 +1,132 @@
1.\"Text automatically generated by txt2man
2.TH landscape-sysinfo 1 "20 September 2012" "" ""
3.SH NAME
4\fBlandscape-sysinfo \fP- Display a summary of the current system status
5\fB
6.SH SYNOPSIS
7.nf
8.fam C
9
10\fBlandscape-sysinfo\fP [\fIoptions\fP]
11
12.fam T
13.fi
14.fam T
15.fi
16.SH DESCRIPTION
17
18\fBlandscape-sysinfo\fP is a utility that displays information about the computer it is run
19on. This information is displayed upon login for console users
20(ssh and terminal login supported) and can also be seen at anytime
21by just calling \fBlandscape-sysinfo\fP from the command line.
22.PP
23The information displayed at login time is updated by update-motd. On
24systems where update-motd is not available, such as Ubuntu Dapper or
25Hardy, the output of \fBlandscape-sysinfo\fP is not included.
26.PP
27The output of \fBlandscape-sysinfo\fP can be controlled by enabling or
28disabling its plugins. See below how to do that.
29.PP
30If the system load is higher than the number of cores, as determined by the
31count of processor lines in /proc/cpuinfo, then
32\fBlandscape-sysinfo\fP will not run at login time. This is to prevent it from
33potentially making a bad situation worse by interfering with what could be an
34administrator logging in to try to fix the problem causing the high load.
35.SH OPTIONS
36.TP
37.B
38\fB--version\fP
39show program's version number and exit
40.TP
41.B
42\fB-h\fP, \fB--help\fP
43show this help message and exit
44.TP
45.B
46\fB-c\fP FILE, \fB--config\fP=FILE
47Use config from this file (any command line \fIoptions\fP
48override settings from the file) (default: '/etc/landscape/client.conf').
49.TP
50.B
51\fB-d\fP PATH, \fB--data-path\fP=PATH
52The directory to store data files in (default: '/var/lib/landscape/client/').
53.TP
54.B
55\fB--sysinfo-plugins\fP=PLUGIN_LIST
56Comma-delimited list of sysinfo plugins to use.
57Default is to use all plugins.
58.TP
59.B
60\fB--exclude-sysinfo-plugins\fP=PLUGIN_LIST
61Comma-delimited list of sysinfo plugins to NOT use.
62This always take precedence over plugins to include.
63.RE
64.PP
65Default plugins: Load, Disk, Memory, Temperature, Processes, LoggedInUsers,
66LandscapeLink, Network
67.SH CONFIGURATION FILE
68
69Any of the long command-line \fIoptions\fP can be used as a configuration directive
70in that configuration file, under the section [sysinfo], by replacing the hyphen
71(-) with an underscore (_).
72.PP
73For example, to disable the LandscapeLink and Temperature plugins
74without having to use the command line option, the following can be added to
75/etc/landscape/client.conf:
76.PP
77.nf
78.fam C
79 [sysinfo]
80 exclude_sysinfo_plugins = Temperature, LandscapeLink
81
82
83.fam T
84.fi
85.SH EXAMPLES
86
87This is the default configuration with all plugins enabled:
88.PP
89.nf
90.fam C
91 $ landscape-sysinfo
92 System load: 0.66 Processes: 242
93 Usage of /home: 72.0% of 27.50GB Users logged in: 1
94 Memory usage: 31% IP address for wlan0: 10.0.1.6
95 Swap usage: 0% IP address for virbr0: 192.168.122.1
96 Temperature: 47 C
97
98 => There is 1 zombie process.
99
100 Graph this data and manage this system at https://landscape.canonical.com/
101
102.fam T
103.fi
104If you want to disable the temperature and Landscape plugins, you could run it like this:
105.PP
106.nf
107.fam C
108 $ landscape-sysinfo --exclude-sysinfo-plugins=Temperature,LandscapeLink
109 System load: 1.08 Processes: 242
110 Usage of /home: 72.0% of 27.50GB Users logged in: 1
111 Memory usage: 31% IP address for wlan0: 10.0.1.6
112 Swap usage: 0% IP address for virbr0: 192.168.122.1
113
114 => There is 1 zombie process.
115
116.fam T
117.fi
118.SH FILES
119.TP
120.B
121/etc/landscape/client.conf
122Configuration file
123.TP
124.B
125/var/log/landscape/sysinfo.log
126Log file for when the tool is run as root. This file will usually be empty,
127unless something wrong happened. In that case, it will have more information
128about the problem.
129When a regular non-root user runs the tool, the log file is ~/.landscape/sysinfo.log.
130.SH SEE ALSO
131\fBlandscape-client\fP(1)
132\fBupdate-motd\fP(5)
0133
=== added file 'man/landscape-sysinfo.txt'
--- man/landscape-sysinfo.txt 1970-01-01 00:00:00 +0000
+++ man/landscape-sysinfo.txt 2012-09-20 09:57:20 +0000
@@ -0,0 +1,98 @@
1NAME
2 landscape-sysinfo - Display a summary of the current system status
3
4SYNOPSIS
5
6 landscape-sysinfo [options]
7
8DESCRIPTION
9
10landscape-sysinfo is a utility that displays information about the computer it is run
11on. This information is displayed upon login for console users
12(ssh and terminal login supported) and can also be seen at anytime
13by just calling landscape-sysinfo from the command line.
14
15The information displayed at login time is updated by update-motd. On
16systems where update-motd is not available, such as Ubuntu Dapper or
17Hardy, the output of landscape-sysinfo is not included.
18
19The output of landscape-sysinfo can be controlled by enabling or
20disabling its plugins. See below how to do that.
21
22If the system load is higher than the number of cores, as determined by the
23count of processor lines in /proc/cpuinfo, then
24landscape-sysinfo will not run at login time. This is to prevent it from
25potentially making a bad situation worse by interfering with what could be an
26administrator logging in to try to fix the problem causing the high load.
27
28OPTIONS
29 --version show program's version number and exit
30 -h, --help show this help message and exit
31 -c FILE, --config=FILE
32 Use config from this file (any command line options
33 override settings from the file) (default: '/etc/landscape/client.conf').
34 -d PATH, --data-path=PATH
35 The directory to store data files in (default: '/var/lib/landscape/client/').
36 --sysinfo-plugins=PLUGIN_LIST
37 Comma-delimited list of sysinfo plugins to use.
38 Default is to use all plugins.
39 --exclude-sysinfo-plugins=PLUGIN_LIST
40 Comma-delimited list of sysinfo plugins to NOT use.
41 This always take precedence over plugins to include.
42
43Default plugins: Load, Disk, Memory, Temperature, Processes, LoggedInUsers,
44LandscapeLink, Network
45
46CONFIGURATION FILE
47
48Any of the long command-line options can be used as a configuration directive
49in that configuration file, under the section [sysinfo], by replacing the hyphen
50(-) with an underscore (_).
51
52For example, to disable the LandscapeLink and Temperature plugins
53without having to use the command line option, the following can be added to
54/etc/landscape/client.conf:
55
56 [sysinfo]
57 exclude_sysinfo_plugins = Temperature, LandscapeLink
58
59
60EXAMPLES
61
62This is the default configuration with all plugins enabled:
63
64 $ landscape-sysinfo
65 System load: 0.66 Processes: 242
66 Usage of /home: 72.0% of 27.50GB Users logged in: 1
67 Memory usage: 31% IP address for wlan0: 10.0.1.6
68 Swap usage: 0% IP address for virbr0: 192.168.122.1
69 Temperature: 47 C
70
71 => There is 1 zombie process.
72
73 Graph this data and manage this system at https://landscape.canonical.com/
74
75If you want to disable the temperature and Landscape plugins, you could run it like this:
76
77 $ landscape-sysinfo --exclude-sysinfo-plugins=Temperature,LandscapeLink
78 System load: 1.08 Processes: 242
79 Usage of /home: 72.0% of 27.50GB Users logged in: 1
80 Memory usage: 31% IP address for wlan0: 10.0.1.6
81 Swap usage: 0% IP address for virbr0: 192.168.122.1
82
83 => There is 1 zombie process.
84
85FILES
86/etc/landscape/client.conf
87Configuration file
88
89/var/log/landscape/sysinfo.log
90Log file for when the tool is run as root. This file will usually be empty,
91unless something wrong happened. In that case, it will have more information
92about the problem.
93When a regular non-root user runs the tool, the log file is ~/.landscape/sysinfo.log.
94
95SEE ALSO
96landscape-client(1)
97update-motd(5)
98

Subscribers

People subscribed via source and target branches

to all changes: