Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Save kernel panic logs between multiple reboots' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Save kernel panic logs between multiple reboots
Authored by: mks on Feb 16, '04 01:08:08PM

Why the three sync commands? Shouldn't one be enough?



[ Reply to This | # ]
Save kernel panic logs between multiple reboots
Authored by: the1truestripes on Feb 16, '04 01:45:10PM

There are three theories about the multiple sync thing.

  1. In extremely old versions of Unix (like V7 Unix, early 1970s) reboot wouldn't sync the disk blocks, and the first sync would return after asking for the blocks to be written, but the second sync would wait for the first set of blocks to finish being written. NOTE: for more then a decade a normal reboot causes the dirty disk blocks to be written, so any sync for this reason is unneeded.
  2. Doing sync RETURN, sync RETURN, sync RETURN, reboot RETURN gives the sync time to finish even if the second sync doesn't cause the first to finish (I have to admit, I read the V7 source code, but I don't remember which way it works)
  3. Doing sync RETURN, sync RETURN, sync RETURN, reboot RETURN gives the person doing the reboot time to realize "oh dear, that's the wrong box!" or "oh my, I forgot to schedule the downtime!" or whatever other reason there might be to not reboot.

I don't see any real reason to do "sync;sync;sync;reboot" rather then just the reboot. I don't see any way it'll hurt though.

[ Reply to This | # ]