Merge lp:~ahasenack/landscape-client/sysinfo-manpage-303274 into lp:~landscape/landscape-client/trunk

Proposed by Andreas Hasenack
Status: Work in progress
Proposed branch: lp:~ahasenack/landscape-client/sysinfo-manpage-303274
Merge into: lp:~landscape/landscape-client/trunk
Diff against target: 165 lines (+139/-1)
4 files modified
debian/landscape-client.manpages (+3/-0)
debian/landscape-common.manpages (+1/-0)
debian/rules (+1/-1)
man/landscape-sysinfo.1 (+134/-0)
To merge this branch: bzr merge lp:~ahasenack/landscape-client/sysinfo-manpage-303274
Reviewer Review Type Date Requested Status
Jamu Kakar (community) Needs Information
Landscape Pending
Review via email: mp+46944@code.launchpad.net

Description of the change

This branch adds a manpage for landscape-sysinfo(1), originally written by Jonathan Marsden (https://launchpad.net/~jmarsden) and further changed by myself. It also changes the way the debian packaging installs the manpages by using a file called debian/<package>.manpages and listing the manpages inside it.

To post a comment you must log in.
Revision history for this message
Jamu Kakar (jkakar) wrote :

[1]

I was expecting a man/landscape-sysinfo.txt file, which would be the
source for a manpage generated by txt2man...?

[2]

+in that configuration file, under the section \fI[sysinfo]\fP, by replacing the hifen

s/hifen/hyphen/ please.

[3]

Nice work on the manpage contents!

review: Needs Information
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

[1]
I didn't create one, since I got the manpage from the bug ticket by a contributor. Do we need the .txt files or are they there just to create the manpage? If they just serve as a template for the manpage, I vote to delete them. I recall we had issues with txt2man in different distributions not working as we wanted and that being a blocker once upon a time for us to update the manpages.

[2]
fixed

[3]
er, fixed :)

314. By Andreas Hasenack

hyphen spelling

Revision history for this message
Jamu Kakar (jkakar) wrote :

Andreas:

I find the text files much easier to read and edit. Also, to answer
your question, they are just source files for txt2man to generate
manpages. Even though we had some problems, it seems like we don't
have them now, and it'd be nice to keep the writing/editing process
simple.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I tried txt2man in all distros. It generated broken manpages on dapper and hardy, basically escaping a control char that it shouldn't:
"\\fB--version\fP" should have been "\fB--version\fP", for example. As a result, the manpage looks like:

"""
(...)
OPTIONS
       \fB--version
              Show program’s version number and exit.

       \fB-h, --help
              Show this help message and exit.
(...)
"""

Unmerged revisions

314. By Andreas Hasenack

hyphen spelling

313. By Andreas Hasenack

Use package.manpages to install the manpages, and include the new sysinfo
manpage in the list.

312. By Andreas Hasenack

- use package name in header, without a version though
- correct markup for filenames

311. By Andreas Hasenack

A whole bunch of updates to the manpage.

310. By Andreas Hasenack

Added first draft of a manpage for landscape-sysinfo from Jonathan Marsden
(https://launchpad.net/~jmarsden).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'debian/landscape-client.manpages'
2--- debian/landscape-client.manpages 1970-01-01 00:00:00 +0000
3+++ debian/landscape-client.manpages 2011-01-20 18:53:28 +0000
4@@ -0,0 +1,3 @@
5+man/landscape-client.1
6+man/landscape-config.1
7+man/landscape-message.1
8
9=== added file 'debian/landscape-common.manpages'
10--- debian/landscape-common.manpages 1970-01-01 00:00:00 +0000
11+++ debian/landscape-common.manpages 2011-01-20 18:53:28 +0000
12@@ -0,0 +1,1 @@
13+man/landscape-sysinfo.1
14
15=== modified file 'debian/rules'
16--- debian/rules 2011-01-11 23:04:59 +0000
17+++ debian/rules 2011-01-20 18:53:28 +0000
18@@ -70,7 +70,7 @@
19 dh_testdir
20 dh_testroot
21 dh_installdocs
22- dh_installman -p landscape-client man/landscape-client.1 man/landscape-config.1 man/landscape-message.1
23+ dh_installman
24 dh_installchangelogs
25 dh_install --sourcedir debian/tmp/
26 dh_installinit -- start 45 2 3 4 5 . stop 15 1 .
27
28=== added file 'man/landscape-sysinfo.1'
29--- man/landscape-sysinfo.1 1970-01-01 00:00:00 +0000
30+++ man/landscape-sysinfo.1 2011-01-20 18:53:28 +0000
31@@ -0,0 +1,134 @@
32+.TH LANDSCAPE-SYSINFO "1" "14 January 2011" "landscape-common" "User Commands"
33+.SH NAME
34+landscape-sysinfo \- display a summary of the current system status
35+.SH SYNOPSIS
36+.B landscape-sysinfo
37+[\fIoptions\fR]
38+.SH DESCRIPTION
39+.B landscape-sysinfo
40+is a utility that displays information about the computer it is run
41+on. This information is displayed upon login for console users
42+(ssh and terminal login supported) and can also be seen at anytime
43+by just calling \fBlandscape-sysinfo\fP from the command line.
44+
45+The information displayed at login time is updated by \fBupdate-motd\fP. On
46+systems where \fBupdate-motd\fP is not available, such as Ubuntu Dapper or
47+Hardy, the output of \fBlandscape-sysinfo\fP is not included.
48+
49+The output of \fBlandscape-sysinfo\fP can be controlled by enabling or
50+disabling its plugins. See below how to do that.
51+
52+If the system load is higher than the number of cores, as determined by the
53+count of \fIprocessor\fP lines in \fI/proc/cpuinfo\fP, then
54+\fBlandscape-sysinfo\fP will not run at login time. This is to prevent it from
55+potentially making a bad situation worse by interfering with what could be an
56+administrator logging in to try to fix the problem causing the high load.
57+
58+.SH OPTIONS
59+.TP
60+\fB\-\-version\fR
61+show landscape-sysinfo's version number and exit
62+.TP
63+\fB\-h\fR, \fB\-\-help\fR
64+show this help message and exit
65+.TP
66+\fB\-c\fR FILE, \fB\-\-config\fR=\fIFILE\fR
67+Use config from this file (any command line options
68+override settings from the file) (default:
69+\fI/etc/landscape/client.conf\fP).
70+.TP
71+\fB\-d\fR PATH, \fB\-\-data\-path\fR=\fIPATH\fR
72+The directory to store data files in (default:
73+\fI/var/lib/landscape/client/\fP).
74+.TP
75+\fB\-q\fR, \fB\-\-quiet\fR
76+Do not log to the standard output.
77+.TP
78+\fB\-l\fR FILE, \fB\-\-log\-dir\fR=\fIFILE\fR
79+The directory to write log files to (default:
80+\fI/var/log/landscape\fP).
81+.TP
82+\fB\-\-log\-level\fR=\fILOG_LEVEL\fR
83+One of debug, info, warning, error or critical.
84+.TP
85+\fB\-\-ignore\-sigint\fR
86+Ignore interrupt signals.
87+.TP
88+\fB\-\-ignore\-sigusr1\fR
89+Ignore SIGUSR1 signal to rotate logs.
90+.TP
91+\fB\-\-sysinfo\-plugins\fR=\fIPLUGIN_LIST\fR
92+Comma\-delimited list of sysinfo plugins to use.
93+Default is to use all plugins.
94+.TP
95+\fB\-\-exclude\-sysinfo\-plugins\fR=\fIPLUGIN_LIST\fR
96+Comma\-delimited list of sysinfo plugins to NOT use.
97+This always take precedence over plugins to include.
98+.PP
99+Default plugins: Load, Disk, Memory, Temperature, Processes, LoggedInUsers,
100+LandscapeLink, Network
101+.SH CONFIGURATION FILE
102+The configuration file controlling the behaviour of \fBlandscape-sysinfo\fP is
103+\fI/etc/landscape/client.conf\fP and it is shared with the
104+\fBlandscape-client\fP program.
105+
106+Any of the long command-line options can be used as a configuration directive
107+in that configuration file, under the section \fI[sysinfo]\fP, by replacing the hyphen
108+(-) with an underscore (_).
109+
110+For example, to disable the \fILandscapeLink\fP and \fITemperature\fP plugins
111+without having to use the command line option, the following can be added to
112+\fI/etc/landscape/client.conf\fP:
113+.PP
114+.nf
115+.fam C
116+ [sysinfo]
117+ exclude_sysinfo_plugins = Temperature, LandscapeLink
118+.fam T
119+.fi
120+
121+.SH EXAMPLES
122+This is the default configuration, with all plugins enabled:
123+.PP
124+.nf
125+.fam C
126+ $ landscape-sysinfo
127+ System load: 0.66 Processes: 242
128+ Usage of /home: 72.0% of 27.50GB Users logged in: 1
129+ Memory usage: 31% IP address for wlan0: 10.0.1.6
130+ Swap usage: 0% IP address for virbr0: 192.168.122.1
131+ Temperature: 47 C
132+
133+ => There is 1 zombie process.
134+
135+ Graph this data and manage this system at https://landscape.canonical.com/
136+.fam T
137+.fi
138+.TP
139+If you want to disable the temperature and Landscape plugins, you could run it like this:
140+.PP
141+.nf
142+.fam C
143+ $ landscape-sysinfo --exclude-sysinfo-plugins=Temperature,LandscapeLink
144+ System load: 1.08 Processes: 242
145+ Usage of /home: 72.0% of 27.50GB Users logged in: 1
146+ Memory usage: 31% IP address for wlan0: 10.0.1.6
147+ Swap usage: 0% IP address for virbr0: 192.168.122.1
148+
149+ => There is 1 zombie process.
150+.fam T
151+.fi
152+
153+.SH FILES
154+.TP
155+.I /etc/landscape/client.conf
156+Configuration file
157+.TP
158+.I /var/log/landscape/sysinfo.log
159+Log file for when the tool is run as root. This file will usually be empty,
160+unless something wrong happened. In that case, it will have more information
161+about the problem.
162+When a regular non-root user runs the tool, the log file is \fI~/.landscape/sysinfo.log\fP.
163+.SH SEE ALSO
164+\fBlandscape-client\fP(1),
165+\fBupdate-motd\fP(5)

Subscribers

People subscribed via source and target branches

to all changes: