aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/watchdogd
Commit message (Collapse)AuthorAgeFilesLines
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Chase malloc() change by removing lg_chunk malloc_conf settings.Xin LI2017-06-281-8/+0
| | | | | | | | | | | | | In jemalloc 5, there are no longer chunks, and as configured on FreeBSD (the "retain" option defaults to false), the mmap() requests are precisely sized for the specific needs, which means the virtual memory overhead should be lower for small applications. Reviewed by: jasone, ian Differential Revision: https://reviews.freebsd.org/D11366 Notes: svn path=/head/; revision=320431
* fix a watchdogd regression introduced in r308040Andriy Gapon2016-11-101-7/+9
| | | | | | | | | | | | | | | The code assumed that 'timeout' and 'timeout_sec' are in sync which they weren't if no '-t' option was passed to watchdogd. Reported by: Olivier Smedts <olivier@gid0.org>, Alex Deiter <alex.deiter@gmail.com> Tested by: Olivier Smedts <olivier@gid0.org>, Alex Deiter <alex.deiter@gmail.com> MFC after: 5 days X-MFC with: r308040 Notes: svn path=/head/; revision=308479
* nap time between pats is forced to be at most half of the timeoutAndriy Gapon2016-10-281-2/+5
| | | | | | | | | | | Previously, if the timeout was less than 10 seconds, for example, about 8 seconds, then the watchdog timer would be let to expire before patting the watchdog. MFC after: 2 weeks Notes: svn path=/head/; revision=308040
* Fix typo.Edward Tomasz Napierala2016-02-291-1/+1
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=296215
* Add a new exit-timeout option to watchdogd.Ian Lepore2015-08-192-8/+26
| | | | | | | | | | | | | | | | | | | | | | | | Watchdogd currently disables the watchdog when it exits, such as during rc.shutdown processing. That leaves the system vulnerable to getting hung or deadlocked during the shutdown part of a reboot. For embedded systems it's especially important that the hardware watchdog always be active. It can also be useful for servers that are administered remotely. The new -x <seconds> option tells watchdogd to program the watchdog with the given timeout just before exiting. The -x value can be longer or shorter than the -t normal time value, to allow for various exceptional conditions at shutdown such as allowing extra time for buffer flushing. The exit value is also used internally in the "failsafe" handling (which used to just disable the watchdog), on the theory that if you're using this option, "safe" means having the watchdog always running, not disabled. The default is still to disable the watchdog on exit if -x is not specified. Differential Revision: https://reviews.freebsd.org/D2556 (timed out) Notes: svn path=/head/; revision=286947
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+20
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-271-2/+1
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge from head@274682Simon J. Gerraty2014-11-193-6/+6
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * \ Merge head from 7/28Simon J. Gerraty2014-08-192-7/+7
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | | Merge headSimon J. Gerraty2014-04-281-11/+1
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * \ \ \ Merge from headSimon J. Gerraty2013-09-052-24/+279
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=255263
| * \ \ \ \ sync from headSimon J. Gerraty2013-04-122-19/+439
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=249429
| * | | | | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | | | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | | | | Sync with HEAD.David E. O'Brien2013-02-081-1/+9
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246555
| * \ \ \ \ \ \ Sync from headSimon J. Gerraty2012-11-042-3/+6
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | | | | | Convert usr.sbin to LIBADDBaptiste Daroussin2014-11-251-2/+1
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275054
* | | | | | | | Default to use 10 seconds as nap interval instead of 1.Xin LI2014-11-162-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we have a nap interval of 1 second while we have a timeout of 128 seconds by default, which could be an overkill, and for some hardware the patting action may be expensive. Note that the choice of nap interval is still arbitrary. We preferred a safe value where even when the system is very heavily loaded, the watchdog should not shoot the system down if it's not really hung. According to the manual page of Linux's watchdog daemon, the nap interval time of theirs is 10 seconds, which seems to be a reasonable value -- according to Intel documentation AP-725 (Document Number: 292273-001), ICH5's maximum timeout is about 37.5 seconds, which the ichwd(4) driver would set when we requested 128 seconds (although it should probably feed back this as an error and do not set the timeout). Since that's the shortest maximum value, 10 seconds seems to be a right choice for us too. Discussed with: alfred MFC after: 1 month Notes: svn path=/head/; revision=274583
* | | | | | | | Fix the watchdog/watchdog man pages.Rui Paulo2014-10-182-4/+4
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default timeout is 128 seconds. MFC after: 1 week Notes: svn path=/head/; revision=273247
* | | | | | | use .Mt to mark up email addresses consistently (part2)Baptiste Daroussin2014-06-202-7/+7
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco@lastsummer.de> Notes: svn path=/head/; revision=267668
* | | | | | mdoc: minor paragraph fixes.Joel Dahl2014-02-081-11/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | Notes: svn path=/head/; revision=261634
* | | | | Fix bug in r253719: fix command line watchdog disable.Alfred Perlstein2013-08-101-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r253719 disallowed watchdog(8) from disabling the watchdog by breaking the ability to pass 0 as a timeout arg. Fix this. Notes: svn path=/head/; revision=254173
* | | | | Apply a casting sledgehammer.John Baldwin2013-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submitted by: dhw Notes: svn path=/head/; revision=253808
* | | | | Fix printf of seconds for systems where time_t is 64 bits.Ian Lepore2013-07-281-2/+3
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=253744
* | | | | mdoc and language improvements.Joel Dahl2013-07-281-14/+29
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=253735
* | | | | Provide some examples for watchdogd usage.Alfred Perlstein2013-07-271-1/+76
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=253723
* | | | | Fix watchdog pretimeout.Alfred Perlstein2013-07-271-17/+179
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original API calls for pow2ns, however the new APIs from Linux call for seconds. We need to be able to convert to/from 2^Nns to seconds in both userland and kernel to fix this and properly compare units. Notes: svn path=/head/; revision=253719
* | | | Mark the act_tbl static/const.Ed Schouten2013-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This table is only used within this source file and is only accessed read-only. MFC after: 1 week Notes: svn path=/head/; revision=249245
* | | | Invert the meaning of -S (added in r247405) and document its meaning. Also,Mark Johnston2013-03-262-16/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | don't carp about the watchdog command taking too long until after the watchdog has been patted, and don't carp via warnx(3) unless -S is set since syslog(3) already logs to standard error otherwise. Discussed with: alfred Reviewed by: alfred Approved by: emaste (co-mentor) Notes: svn path=/head/; revision=248744
* | | | Remove EOL whitespace.Joel Dahl2013-02-271-4/+4
| | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=247417
* | | | mdoc: begin sentence on new line.Joel Dahl2013-02-271-6/+10
| | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=247416
* | | | watchdogd(8) and watchdog(4) enhancements.Alfred Perlstein2013-02-272-19/+418
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following support was added to watchdog(4): - Support to query the outstanding timeout. - Support to set a software pre-timeout function watchdog with an 'action' - Support to set a software only watchdog with a configurable 'action' 'action' can be a mask specifying a single operation or a combination of: log(9), printf(9), panic(9) and/or kdb_enter(9). Support the following in watchdogged: - Support to utilize the new additions to watchdog(4). - Support to warn if a watchdog script runs for too long. - Support for "dry run" where we do not actually arm the watchdog, but only report on our timing. Sponsored by: iXsystems, Inc. MFC after: 1 month Notes: svn path=/head/; revision=247405
* | | Revert accidental regression to previous misspelling.Ian Lepore2013-01-261-1/+1
| | | | | | | | | | | | | | | | | | | | | Approved by: cognet (mentor) Notes: svn path=/head/; revision=245951
* | | Reduce watchdogd's memory footprint when running daemonized.Ian Lepore2013-01-261-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses the recently-added jemalloc(3) feature of setting the lg_chunk tuning option to zero to request that memory be allocated in the smallest chunks possible. Without this option, the default is to initally map 8MB, and then the mlockall() call wires that entire allocation even though the program only uses a few Kbytes of it at runtime. PR: bin/173332 Approved by: cognet (mentor) Notes: svn path=/head/; revision=245949
* | | Spelling: exitting -> exitingAlfred Perlstein2013-01-181-1/+1
| |/ |/| | | | | | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=245584
* | Replace log(3) with flsll(3) for watchdogd(8) and drop libm dependency.Xin LI2012-11-032-3/+4
| | | | | | | | | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=242519
* | - It's also need to lock current memory.Andrey Zonov2012-08-301-1/+1
| | | | | | | | | | | | | | | | Approved by: kib (mentor) MFC after: 1 week Notes: svn path=/head/; revision=239896
* | - Don't allow watchdogd(8) to be swapped out.Andrey Zonov2012-08-281-0/+2
|/ | | | | | | | | | | | On machines with huge amount of swap and high IO activity, watchdogd(8) may wait for a swap memory longer than timeout and sometimes fires. Approved by: kib (mentor) MFC after: 1 week Notes: svn path=/head/; revision=239769
* Protect the watchdog daemon against swap OOM killer. This is similar toEd Maste2010-09-261-0/+3
| | | | | | | SVN r199804 which added protection to sshd, cron, syslogd, and inetd. Notes: svn path=/head/; revision=213181
* Staticify local variables.Xin LI2010-07-201-13/+11
| | | | | | | | | | | While I'm there also add a 'static' keyword for a function to make it consistent with prototype. Reviewed by: phk MFC after: 3 months Notes: svn path=/head/; revision=210300
* The last big commit: let usr.sbin/ use WARNS=6 by default.Ed Schouten2010-01-021-1/+0
| | | | Notes: svn path=/head/; revision=201390
* ANSIfy almost all applications that use WARNS=6.Ed Schouten2009-12-291-2/+2
| | | | | | | | | | I was considering committing all these patches one by one, but as discussed with brooks@, there is no need to do this. If we ever need/want to merge these changes back, it is still possible to do this per application. Notes: svn path=/head/; revision=201227
* Don't hide an error if the initial attempt to program a watchdog fromRuslan Ermilov2009-12-211-1/+1
| | | | | | | within watchdogd(8) fails. This is also consistent with watchdog(8). Notes: svn path=/head/; revision=200778
* Don't exit from watchdogd on receiving a signal if we cannot stop the watchdog.Nick Hibma2006-12-151-11/+18
| | | | | | | | That'll require -KILL. This avoids resetting your system on one of the watchdogs that you cannot disable. Notes: svn path=/head/; revision=165263