Re: Owfs-developers Digest, Vol 122, Issue 15

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Owfs-developers Digest, Vol 122, Issue 15

Dr. Trigon
Sorry for interrupting here: Can you elaborate why owshell should be preferred over owfs?

Thanks and Greetings


>But I recommend to skip the fuse binding (and owfs binary) completely
>and fix your scripts to use the owshell programs instead.
>
>e.g. instead of
>
>cat /mnt/ow/10.6B1289000000/temperature
>
>do
>
>owread /10.6B1289000000/temperature
>

Dr. Trigon

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Owfs-developers Digest, Vol 122, Issue 15

Jan Kandziora
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Owfs-developers Digest, Vol 122, Issue 15

Dr. Trigon
In reply to this post by Dr. Trigon
>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

That makes perfect sense. Thanks for the nicely worked out example!

Ok switching to owshell... to do so I just have to figure out a new collectd setup... ;)
Dr. Trigon
------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers