From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mike Broderick Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: setting clock back a couple weeks temporarily Date: Mon, 09 Feb 2004 18:12:49 -0500 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <402813F1.5080200@mit.edu> References: <401E9D49.2080100@mit.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1076368710 23629 80.91.224.253 (9 Feb 2004 23:18:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 9 Feb 2004 23:18:30 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Tue Feb 10 00:18:21 2004 Return-path: Original-Received: from sws1.ornl.gov ([160.91.1.101]) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1AqKfU-0008IC-00 for ; Tue, 10 Feb 2004 00:18:21 +0100 Original-Received: (qmail 28905 invoked by uid 5); 9 Feb 2004 23:18:03 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 28879 invoked by uid 49493); 9 Feb 2004 23:18:03 -0000 Original-Received: from broderic@MIT.EDU by sws1 by uid 49491 with qmail-scanner-1.16 (iscan: v3.1/v5.600-1011/622/49252. clamscan: 20030605. spamassassin: 2.55. Clear:SA:0(-6.7/5.0):. Processed in 10.029297 secs); 09 Feb 2004 23:18:03 -0000 Original-Received: from unknown (HELO emroute3.ornl.gov) (160.91.4.110) by 0 with SMTP; 9 Feb 2004 23:17:52 -0000 Original-Received: from emroute3.ornl.gov (localhost [127.0.0.1]) by emroute3.ornl.gov (PMDF V6.2-X17 #30669) with ESMTP id <0HSU009XXBDSMX@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Mon, 09 Feb 2004 18:17:52 -0500 (EST) Original-Received: from fort-point-station.mit.edu (FORT-POINT-STATION.MIT.EDU [18.7.7.76]) by emroute3.ornl.gov (PMDF V6.2-X17 #30669) with ESMTPS id <0HSU00BIQBDNAA@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Mon, 09 Feb 2004 18:17:49 -0500 (EST) Original-Received: from grand-central-station.mit.edu (GRAND-CENTRAL-STATION.MIT.EDU [18.7.21.82]) by fort-point-station.mit.edu (8.12.4/8.9.2) with ESMTP id i19NHjV1011107 for ; Mon, 09 Feb 2004 18:17:47 -0500 (EST) Original-Received: from melbourne-city-street.mit.edu (MELBOURNE-CITY-STREET.MIT.EDU [18.7.21.86]) by grand-central-station.mit.edu (8.12.4/8.9.2) with ESMTP id i19NDSSF016974 for ; Mon, 09 Feb 2004 18:13:28 -0500 (EST) Original-Received: from mit.edu (VBALL.MIT.EDU [18.94.0.87]) ) by melbourne-city-street.mit.edu (8.12.4/8.12.4) with ESMTP id i19NDS8H008180 for ; Mon, 09 Feb 2004 18:13:28 -0500 (EST) In-reply-to: <401E9D49.2080100@mit.edu> Original-To: tru64-unix-managers X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031016 Xref: main.gmane.org gmane.os.tru64.managers:6381 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:6381 We ended uip finding another workaround and not having to do this but the consensus is that is it generally safe to turn the clock back temorarily with the following caveats: - make sure ntp is not running - running in level 2 (no nwtwork) is safer - be wary of running tools that depend on time (make, find, etc - a reboot is not necessary, but safer - be wary of cron entries (best with in not running) - log files will look strange (non-chronological entries) - "touch"ing files to an older date may screw up incremental backups etc Full responses are below (w/ authors initials). Thanks to Dr Tom Blinn, Alan Rollow, Dave Massaro _Mike Mike Broderick wrote: > We are missing an important application report from a day a couple > weeks ago. > We can't figure out how to get the app to regenerate the old report. > What's the risk of turning the system clock back a couple weeks (w/ a > reboot) to rerun the report, then set the clock forward (and reboot > again) when done. > (I was under the impression that turning the clock back is a bad idea > but maybe not so bad if rebooted?) We might even be able to run the > app in single user mode after mounting file systems. > > _Mike DM: It depends on what you're running on the machine... Databases don't like the time messed with because they have all kinds of redo logs, etc that are time dependant. Same with accounting software and other transaction based programs. But I've never had any problems doing it. We used to do it when a license would expire and no one could get in. If you have any machines that don't update daylight savings automatically, you have the same problem. I've never seen anything break tho. My Tru64 machine will sometimes have a screwy date/time for some unknown reason, but it just keeps on truckin.... -------------------------------------- AR: There is a risk when you make significant changes to the system time while the system is running multi-user that time sensitive applications will not gracefully cope with the sudden change in time. There are old horror stories of versions of cron and update that tried to run everything that should have happened in the intervening period (more so for setting the time forward). If you change the time running single user, this isn't an issue, because the relevant programs have no continunity from the previous time period. Error logs and other timestamps that get reported in syslog or messages will be offset by the period. As long as nothing interesting happens during the period that shouldn't any more than a curiosity. Files that get modified will have the older time, which might have down stream affects (especially on incremental backups). If another system is using this system's clock (such as from rdate), there could be affects from that. ------------------------------------------------ TB: If you are running a network time synch daemon such as ntpd you will not be very successful if the network starts; as long as your app does not need the network, you can probably boot to run level 2 and get most system services working. There are many things in a UNIX system that get confused when you set the clock back, including anything that bases decisions on the time stamps on files in the file system. Things like "make" do this ALL the time, you might have uses of "find" that depend on time stamps, and so on. But if you keep "general" users off the system, and the application doesn't have date dependencies (other than wanting the system date to be the report date or whatever it has as a dependency that's making it impossisble to re-run it as if it were a couple of weeks ago), you may be successful. Doing the reboot isn't even the critical part (although you do want to get the system down to single user mode and make sure the network is turned off, so a reboot may be the right approach).