Prev: A tool that suggests optimized logic for a piece of code/module/function
Next: A tool that suggests optimized logic for a piece of code/module/function
From: neilsolent on 17 Jan 2010 02:21 On 16 Jan, 22:26, David Schwartz <dav...(a)webmaster.com> wrote: > On Jan 16, 7:52 am, neilsolent <n...(a)solenttechnology.co.uk> wrote: > > > To recap. > > We don't think there is any C function call that will do a clean > > reboot on UNIX. > > We need to call a shell command. > > So we want a shell script that will check the version of UNIX and do a > > clean reboot. > > Cannot be done. The proper way to do a clean reboot is critically > system dependent. You must ask a human being for permission and for > instruction. > > There is no "one right way" to do a clean reboot. On some machines, it > requires arranging load migration to other machines in the cluster. On > some machines, it can only be done intentionally during a maintenance > window. > > > On Solaris, I find /usr/bin/shutdown does not seem to SIGTERM all the > > processes (I guess - it assumes every process has a shutdown script if > > it needs it). I find the reboot command does send a SIGTERM to the > > processes. Ideally - the shutdown scripts are run, and remaining > > processes are signalled. > > Thoughts / experiences anyone? > > What's a standard script for rebooting UNIX? > > There is no standard script. Every system is different, and rightfully > and necessarily so. > > Why are you rebooting the machine from a script anyway? > > DS Why write a script to do anything? We could all just do a lot of typing - it's fun :-)
From: neilsolent on 17 Jan 2010 02:23 On 16 Jan, 22:22, pac...(a)kosh.dhis.org (Alan Curry) wrote: > In article <81648a97-e547-452b-8f4f-b386af42a...(a)v25g2000yqk.googlegroups..com>, > > neilsolent <n...(a)solenttechnology.co.uk> wrote: > >To recap. > >We don't think there is any C function call that will do a clean > >reboot on UNIX. > > Maybe this is because a reboot is a major event in unix, and if it needs to > be done, it deserves to be supervised by an administrator familiar with the > system (who knows the commands, and can decide how many minutes, hours, or > days ahead of time the downtime should be announced to the users), not by > some third-party shell script hacked together with fragments gathered from > Usenet. > > "Reboots are for kernel upgrades", the saying goes... > > -- > Alan Curry So you check every running process before you reboot a system and plan out how it would like to shutdown?
From: Gary R. Schmidt on 17 Jan 2010 06:19 neilsolent wrote: > On 16 Jan, 22:22, pac...(a)kosh.dhis.org (Alan Curry) wrote: >> In article <81648a97-e547-452b-8f4f-b386af42a...(a)v25g2000yqk.googlegroups.com>, >> >> neilsolent <n...(a)solenttechnology.co.uk> wrote: >>> To recap. >>> We don't think there is any C function call that will do a clean >>> reboot on UNIX. >> Maybe this is because a reboot is a major event in unix, and if it needs to >> be done, it deserves to be supervised by an administrator familiar with the >> system (who knows the commands, and can decide how many minutes, hours, or >> days ahead of time the downtime should be announced to the users), not by >> some third-party shell script hacked together with fragments gathered from >> Usenet. >> >> "Reboots are for kernel upgrades", the saying goes... >> >> -- >> Alan Curry > > So you check every running process before you reboot a system and plan > out how it would like to shutdown? > Yes. How *else* can you be sure you aren't going to cause a failure of a critical (business) process? Cheers, Gary B-)
From: neilsolent on 17 Jan 2010 08:58 On 17 Jan, 11:19, "Gary R. Schmidt" <grschm...(a)acm.org> wrote: > neilsolent wrote: > > On 16 Jan, 22:22, pac...(a)kosh.dhis.org (Alan Curry) wrote: > >> In article <81648a97-e547-452b-8f4f-b386af42a...(a)v25g2000yqk.googlegroups.com>, > > >> neilsolent <n...(a)solenttechnology.co.uk> wrote: > >>> To recap. > >>> We don't think there is any C function call that will do a clean > >>> reboot on UNIX. > >> Maybe this is because a reboot is a major event in unix, and if it needs to > >> be done, it deserves to be supervised by an administrator familiar with the > >> system (who knows the commands, and can decide how many minutes, hours, or > >> days ahead of time the downtime should be announced to the users), not by > >> some third-party shell script hacked together with fragments gathered from > >> Usenet. > > >> "Reboots are for kernel upgrades", the saying goes... > > >> -- > >> Alan Curry > > > So you check every running process before you reboot a system and plan > > out how it would like to shutdown? > > Yes. > > How *else* can you be sure you aren't going to cause a failure of a > critical (business) process? > > Cheers, > Gary B-)- Hide quoted text - > > - Show quoted text - Can you be sure you won't cause a failure even if you can spend all week planning your reboot?
From: Gary R. Schmidt on 17 Jan 2010 09:26
neilsolent wrote: > On 17 Jan, 11:19, "Gary R. Schmidt" <grschm...(a)acm.org> wrote: >> neilsolent wrote: >>> On 16 Jan, 22:22, pac...(a)kosh.dhis.org (Alan Curry) wrote: >>>> In article <81648a97-e547-452b-8f4f-b386af42a...(a)v25g2000yqk.googlegroups.com>, >>>> neilsolent <n...(a)solenttechnology.co.uk> wrote: >>>>> To recap. >>>>> We don't think there is any C function call that will do a clean >>>>> reboot on UNIX. >>>> Maybe this is because a reboot is a major event in unix, and if it needs to >>>> be done, it deserves to be supervised by an administrator familiar with the >>>> system (who knows the commands, and can decide how many minutes, hours, or >>>> days ahead of time the downtime should be announced to the users), not by >>>> some third-party shell script hacked together with fragments gathered from >>>> Usenet. >>>> "Reboots are for kernel upgrades", the saying goes... >>>> -- >>>> Alan Curry >>> So you check every running process before you reboot a system and plan >>> out how it would like to shutdown? >> Yes. >> >> How *else* can you be sure you aren't going to cause a failure of a >> critical (business) process? >> >> Cheers, >> Gary B-)- Hide quoted text - >> >> - Show quoted text - > > Can you be sure you won't cause a failure even if you can spend all > week planning your reboot? Yes. But then, I've been doing this sort of stuff for a while, it all gets automatic after a time. Cheers, Gary B-) |