Codebase list debian-goodies / aa0411a
Document --terse option and adjust example for --machine output to the real output shown Javier Fernandez-Sanguino 6 years ago
1 changed file(s) with 20 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
1111 .SH NAME
1212 checkrestart \- check which processes need to be restarted after an upgrade
1313 .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 ]
1515 .SH DESCRIPTION
1616 The
1717 .B checkrestart
106106 .B lsof(8)
107107 installed.
108108
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
109115 .SH EXIT STATUS
110116
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,
112118 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
113124
114125 .SH EXAMPLE
115126
169180 This is another example to show the machine-readable output:
170181
171182 # 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
176190
177191 .SH BUGS
178192 This program might fail if the output of the \fBlsof(8)\fP utility changes since it