TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: THE NATURAL PHILOSOPHER
from: DRUCK
date: 2019-11-30 21:11:00
subject: Re: One I2C bus, two prog

On 30/11/2019 19:34, The Natural Philosopher wrote:
> On 30/11/2019 16:38, druck wrote:
>> For example, to get a running average of the CPU temperature over a 
>> period of 15 minutes, I wrote a python program which runs as a daemon
>> at start up, reading the CPU temperature every second calculating the
>> running average, min and max values. The values are read by running 
>> another instance of the program which communicates with the daemon 
>> instance via a named pipe.
>>
> 
> I actually did something simuilar to get data from a sound deamon back
> to a contrilling web browser, but I didn't use a pipe. I created a 
> ramdiosk of a few K  and mounted that and wrote a file in it. Daemon 
> writes: browser reads.
> 
> Very simple.
> 
> Cant ever fill up. It just gets overwritten by 'current state' every so 
> often...

The only problem being if someone tries reading while it being 
re-written. Did you use advisory locking, or a write and replace strategy?

---druck

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.