Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Unknown Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi Subject: Re: Keeping 'order' without RTC. Date: Sat, 25 Apr 2015 23:09:12 +0000 (UTC) Organization: A noiseless patient Spider Lines: 94 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 25 Apr 2015 23:09:12 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="145ebe76d8008d3be5ad154a782e4ee9"; logging-data="9594"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18NtE4GWLvFP/zs7jMaftrluqse+xa1mFc=" User-Agent: Pan/0.133 (House of Butterflies) Cancel-Lock: sha1:CROFMDlCBjp42GYYduzd9kAUW88= Xref: csiph.com comp.os.linux.misc:14629 On Wed, 15 Apr 2015 22:37:00 +0200, Morten Reistad wrote: > In article , Gordon Levi > wrote: >>The Natural Philosopher wrote: >> >>>On 13/04/15 14:14, Joe Beanfish wrote: >>> >>> >>>> Please, just butt out of you have nothing to offer. You're worse than >>>> the so-called troll. Same for the rest of ya, there's more blather by >>>> you folk whining or being super-superior about the "troll" than >>>> actual technical discussion about anything. Just shut up already. You >>>> think you're so superior when you're just feeding the fire to get >>>> your own names up in lights. >>>> >>>> >>>If you want time and date to be meaningful - which may or may not be >>>the case you have to ensure that they are accurate. >> >>The OP said, specifically, that he only wanted to keep "order". For that >>purpose the time and date don't have to be meaningful. > > In which case he needs to set a time that is higher than the last access > time on any file in the file system. If he uses ext3, 4, xfs or jfs then > there is journalling, and the file system is in a consistent state when > you get tl execute something late in the boot process, like rc.local. > > The find/awk/ls/sort script to do this is left as an exercise to the > reader. (find most recently accessed file, do a stat on it, and set the > system time to 30 sec in the future from that.) > > If the OP _really_ needs this I can see what I can dig up. I used to do > this on an altos machine way back before NTP. > > -- mrr > >>>- a battery backed clock that keeps time when the 'puter is off. - use >>>of some internet accessible clock that you trust to set time on boot >>>and keep time after boot >>>- manually or magically setting the clock to the correct time on boot. > > There is a fourth way, if all he wants is a montonically increasing > time, not necessarily connected with time in other parts of the > universe. > > Which is what I interpret him to want. > That is correct. > -- mrr How can a file become ? Only by being written, when the rPi's time is less than the time-mark of some other existing file/s. JB's idea of marking each written file with the next available , would achieve the effect. But using the Files' ID for this is problematic; besides apparently the rPi . The only problem is that when it's powered-down. AFAICS, provided each rPi-file-write updates the rPi's clock to not be less than the newest file, before it writes; the time-stamps will remain in valid sequence/order. The only writes that the particular rPi 'job' does is like: mv $1.ogg $1.ogx so if cp was replaced by: Cp ; cp; wouldn't this 'keep order'? Looking at the big-picture of the system: rPi + PC 1. RTC-ed:PC ==Puts dataFiles to => rPi, with RealTime stamps; 2. rPi uses the dataFiles and marks their use-status by marking-their- ID; depending on the RealTimeStage of their usage. eg. if power is cut while $1.ogg is playing, it becomes marked as z$1.ogg and if power is cut during the short prompt after playing, it becomes $1.ogx So when rPi goes back to HQ/PC for , we need the old & new *.og* not to be mixed i.t.o. their time stamps. PS. isn't the rPi an educational project? Who remembers: when UK brought out the mini-car, US advertisers spoke about a 'proper sizes car' [we can use a 2-ton V8 to go to the shop to buy 20 LuckyStrike, cos we've go the infinite frontier...then came toyota....] WDYS?