Document --terse option and adjust example for --machine output to the real output shown
Javier Fernandez-Sanguino
6 years ago
11 | 11 | .SH NAME |
12 | 12 | checkrestart \- check which processes need to be restarted after an upgrade |
13 | 13 | .SH SYNOPSIS |
14 | .B checkrestart [ -hvpanm ] [ -b blacklist_file ] [ -i package_name ] [ -e pid ] | |
14 | .B checkrestart [ -hvpanmt ] [ -b blacklist_file ] [ -i package_name ] [ -e pid ] | |
15 | 15 | .SH DESCRIPTION |
16 | 16 | The |
17 | 17 | .B checkrestart |
106 | 106 | .B lsof(8) |
107 | 107 | installed. |
108 | 108 | |
109 | .TP | |
110 | .BI -t, --terse | |
111 | Terse output, just print the number of open deleted files and exit with a code | |
112 | suitable for use by Nagios and similar monitoring tools (see Exit Status). | |
113 | ||
114 | ||
109 | 115 | .SH EXIT STATUS |
110 | 116 | |
111 | The program will exit with error (1) if a non-root user tries to run it. Otherwise, | |
117 | Normally, the program will exit with error (1) if a non-root user tries to run it. Otherwise, | |
112 | 118 | it will always exit with error status 0. |
119 | ||
120 | If the \fI\-\-terse\fP switch is given, the exit code is 1 when there are deleted | |
121 | open files and 0 when there are none. This is intended for consumption by Nagios and | |
122 | similar automated monitoring tools. | |
123 | ||
113 | 124 | |
114 | 125 | .SH EXAMPLE |
115 | 126 | |
169 | 180 | This is another example to show the machine-readable output: |
170 | 181 | |
171 | 182 | # checkrestart --machine |
172 | init bcfg2-server 6974 /usr/sbin/bcfg2-server | |
173 | init exim4-daemon-light 857 /usr/sbin/exim4 | |
174 | no-init aptitude 11679 /usr/bin/aptitude-curses | |
175 | no-init xscreensaver 6562 /usr/bin/xscreensaver | |
183 | PROCESSES: 4 | |
184 | PROGRAMS: 4 | |
185 | PACKAGES: 2 | |
186 | INIT:bcfg2-server,6974,/usr/sbin/bcfg2-server | |
187 | INIT:exim4-daemon-light,857,/usr/sbin/exim4 | |
188 | OTHER:aptitude,11679,/usr/bin/aptitude-curses | |
189 | OTHER:xscreensaver,6562,/usr/bin/xscreensaver | |
176 | 190 | |
177 | 191 | .SH BUGS |
178 | 192 | This program might fail if the output of the \fBlsof(8)\fP utility changes since it |