From: Balwinder S Dheeman on 25 Jun 2010 07:36 On 06/25/2010 03:53 PM, Gilles Ganault wrote: > Hello > > As a work-around to solve an occasional application lock-up, I'd like > to gracefully reboot a FreeBSD 6.3 x86 host every night at midnight. > > Is adding this line to crontab the right way? > > 0 0 * * * root /etc/rc.shutdown > > OR > > 0 0 * * * root shutdown -r now I don't think so. In a Unix/right way, all you need to do is write a script to watch the said application and, or its PID and kill, terminate or (re)start the only the culprit application when needed. -- Balwinder S "bdheeman" Dheeman Registered Linux User: #229709 Anu'z Linux(a)HOME (Unix Shoppe) Machines: #168573, 170593, 259192 Chandigarh, UT, 160062, India Plan9, T2, Arch/Debian/FreeBSD/XP Home: http://werc.homelinux.net/ Visit: http://counter.li.org/
From: Gilles Ganault on 25 Jun 2010 09:02 On Fri, 25 Jun 2010 17:06:01 +0530, Balwinder S Dheeman <bsd.SANSPAM(a)anu.homelinux.net> wrote: >In a Unix/right way, all you need to do is write a script to watch the >said application and, or its PID and kill, terminate or (re)start the >only the culprit application when needed. Right, but I'm actually not positive which application is causing the problem. Is what I typed above the right way to gracefully reboot a FreeBSD host? Thank you.
From: Lowell Gilbert on 25 Jun 2010 10:56 Gilles Ganault <nospam(a)nospam.com> writes: > Hello > > As a work-around to solve an occasional application lock-up, I'd like > to gracefully reboot a FreeBSD 6.3 x86 host every night at midnight. > > Is adding this line to crontab the right way? > > 0 0 * * * root /etc/rc.shutdown > > OR > > 0 0 * * * root shutdown -r now The latter. [For values of "the right way" that include rebooting the kernel to solve a problem in userspace at all...] -- Lowell Gilbert, embedded/networking software engineer http://be-well.ilk.org/~lowell/
From: Mike Scott on 25 Jun 2010 12:26 Lowell Gilbert wrote: > Gilles Ganault <nospam(a)nospam.com> writes: > >> Hello >> >> As a work-around to solve an occasional application lock-up, I'd like >> to gracefully reboot a FreeBSD 6.3 x86 host every night at midnight. >> >> Is adding this line to crontab the right way? >> >> 0 0 * * * root /etc/rc.shutdown >> >> OR >> >> 0 0 * * * root shutdown -r now > > The latter. > > [For values of "the right way" that include rebooting the kernel to > solve a problem in userspace at all...] > Papering over the cracks in the wall. Makes you feel better for a while :-) I don't get the "but I'm actually not positive which application is causing the problem." statement though. If the OP knows there's been a locked-up application, I can't see how he cannot know which. I'll grant intermittent faults are the very devil to locate, but a full reboot, well....... Oh, I might also suggest 'killall -9 xyzzy' or whatever as another sledgehammer-type possibility, always assuming the application will actually exit. -- Mike Scott (unet2 <at> [deletethis] scottsonline.org.uk) Harlow Essex England
From: Gilles Ganault on 25 Jun 2010 12:51 On Fri, 25 Jun 2010 17:26:29 +0100, Mike Scott <usenet.12(a)spam.stopper.scottsonline.org.uk> wrote: >I don't get the "but I'm actually not positive which application is >causing the problem." statement though. If the OP knows there's been a >locked-up application, I can't see how he cannot know which. I'll grant >intermittent faults are the very devil to locate, but a full reboot, >well....... In the absolute, I agree it's overkill but it's just a SOHO telephony server, and since I'm not sure whether it's Asterisk or Zaptel acting funny after several weeks, I figured it didn't matter if I rebooted the host every night. Thanks for the tip.
|
Pages: 1 Prev: [6.3] Right way to reboot host from CRON? Next: laptop Horizsync and Vertrefresh unkown |