Am 24.07.2016 um 18:06 schrieb Dr. Trigon:
> Sorry for interrupting here: Can you elaborate why owshell should be
> preferred over owfs?
> 
In short: the fuse binding enables user programs to do read() and
write() on properties. Both read() and write() aren't atomic for
anything else but bytes. But most Onewire properties aren't bytes. For
example, when you do

$ cat /mnt/ow/10.6B1289000000/temperature

this does a read() for an arbitrary buffer length "cat" uses, but it is
sufficient to "cat" when owfs returns one byte. "cat" will retry. Okay.

But then the scheduler barges in, suspending "cat" for a moment. In the
meantime, OWFS's cache for /10.6B1289000000/temperature is invalidated.

The next read "cat" triggers a new conversion (or another program
triggered a new conversion in the meantime). Let's say the cached value
before that conversion was

" 21.3125"

Now it is

"    21.5"

Let's say "cat" returned 3 bytes before it was suspended. So the result is

" 21.21.5"


This doesn't happen too often, as there have to be the  special
conditions above met. But when it happens, it breaks everything. The
response to this would be file locking. But "cat" doesn't use file
locking, and if a user is forced to use a special tool, he could use the
owshell ones.


So. Use. the. owshell. tools.

Kind regards

        Jan






------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to