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

Subscribers

People subscribed via source and target branches

to all changes: