On Sat, 07 Nov 2015 08:47:31 +0100, "Martin Patzak (GMX)" martin.pat...@gmx.de wrote:
> mnm@razmaban:~/owfs/owfs_151104$ sudo owserver --link=/dev/1-wire-link > --debug --error_level=3 > [sudo] password for mnm: > DEBUG MODE > libow version: > 2.9p8 > > > *and that's all she wrote!* Jan Kandziora replied: >> You are using a build without debugging support. Please take the owfs >> sources and configure/compile for yourself. Curious if my owserver would display debug info, and whether it would include timestamps, I tried this. First issue was to stop the running owserver: --- ubuntu@arm:~$ /etc/init.d/owserver status * owserver is running ubuntu@arm:~$ /etc/init.d/owserver stop * Stopping 1-Wire TCP Server owserver ubuntu@arm:~$ /etc/init.d/owserver status * owserver is running ubuntu@arm:~$ sudo /etc/init.d/owserver stop * Stopping 1-Wire TCP Server owserver ubuntu@arm:~$ /etc/init.d/owserver status * owserver is not running ubuntu@arm:~$ --- I concluded sudo must be required. But later I decided "/etc/init.d/owserver status" displays a random result that may or may not match what ps shows. I restarted owserver with the debug parameter, and received the same brief display as Martin (except my version is older): --- ubuntu@arm:~$ sudo /usr/bin/owserver -c /etc/owfs.conf --debug DEBUG MODE libow version: 2.8p15 --- But I tried one more thing... And saw what must be debug information! --- ubuntu@arm:~$ sudo /usr/bin/owserver -c /etc/owfs.conf --error_print=2 --error_level=9 --foreground DEBUG MODE libow version: 2.8p15 NLMSGHDR: len=48 type=3 (NLMSG_DONE) flags=5 seq=0|1 pid=673 CN_MSG: idx/val=3/1 (CN_W1_IDX) seq=0|1 ack=1 len=12 flags=0 W1_NETLINK_MSG: type=6 (W1_LIST_MASTERS) len=0 id=0 W1_NETLINK_CMD: NULL w1c field NULL data NLMSGHDR: len=52 type=3 (NLMSG_DONE) flags=0 seq=0|1 pid=0 CN_MSG: idx/val=3/1 (CN_W1_IDX) seq=0|1 ack=0 len=16 flags=12341 W1_NETLINK_MSG: type=6 (W1_LIST_MASTERS) len=4 id=172124960 W1_NETLINK_CMD: NULL w1c field Byte buffer Data, length=4 --000: 01 00 00 00 <....> NLMSGHDR: len=48 type=3 (NLMSG_DONE) flags=0 seq=0|1 pid=0 CN_MSG: idx/val=3/1 (CN_W1_IDX) seq=0|1 ack=1 len=12 flags=0 W1_NETLINK_MSG: type=6 (W1_LIST_MASTERS) len=0 id=0 W1_NETLINK_CMD: NULL w1c field NULL data ^Cubuntu@arm:~$ --- I ran the pyownet timing test in that mode, and saw hundreds of lines of debug - so much it backed up my terminal and drastically slowed the results: --- C:\Users\Loren\Documents\Projects\Computing\BeagleBone Black\BBB Projects\1-Wire\OWFS Python logging>python StefanoTimingTest.py3 owserver://10.1.1.4:4304 ... ** non persistent : 60.00 ms, 62.35 ms, 68.43 ms, 117.83 ms, 510.34 ms, ** persistent : 61.94 ms, 63.65 ms, 68.79 ms, 260.94 ms, 359.64 ms, --- Unfortunately there don't appear to be timestamps on any of the messages, so I have no new clues about my slow response. I stopped that owserver instance, and tried the plain --debug command again - now it works! Apparently something is remembered somewhere, it is still in foreground: --- ubuntu@arm:~$ sudo /usr/bin/owserver -c /etc/owfs.conf --debug DEBUG MODE libow version: 2.8p15 NLMSGHDR: len=48 type=3 (NLMSG_DONE) flags=5 seq=0|1 pid=673 CN_MSG: idx/val=3/1 (CN_W1_IDX) seq=0|1 ack=1 len=12 flags=0 W1_NETLINK_MSG: type=6 (W1_LIST_MASTERS) len=0 id=0 W1_NETLINK_CMD: NULL w1c field NULL data ... ^Cubuntu@arm:~$ --- This is the verbatim log of me trying to figure out what is going on (with "<--" notes added): --- ^Cubuntu@arm:~$ ubuntu@arm:~$ /etc/init.d/owserver status * owserver is not running ubuntu@arm:~$ sudo /usr/bin/owserver -c /etc/owfs.conf --error_print=2 --error_level=9 --background <-- explicit --background is honored ubuntu@arm:~$ /etc/init.d/owserver status * owserver is not running ubuntu@arm:~$ ps aux |grep owser root 691 0.0 0.1 29164 952 ? Ssl 13:06 0:00 /usr/bin/owserver -c /etc/owfs.conf --error_print=2 --error_level=9 --background ubuntu 706 0.0 0.1 3292 688 pts/4 S+ 13:07 0:00 grep --color=auto ows ubuntu@arm:~$ /etc/init.d/owserver status * owserver is not running ubuntu@arm:~$ sudo /usr/bin/owserver -c /etc/owfs.conf <-- command ignored, already running ubuntu@arm:~$ /etc/init.d/owserver status * owserver is not running ubuntu@arm:~$ ps aux |grep owser root 691 0.0 0.1 29164 956 ? Ssl 13:06 0:00 /usr/bin/owserver -c /etc/owfs.conf --error_print=2 --error_level=9 --background ubuntu 757 0.0 0.1 3292 688 pts/4 S+ 13:09 0:00 grep --color=auto owser ubuntu@arm:~$ sudo /etc/init.d/owserver stop * Stopping 1-Wire TCP Server owserver [ OK ] ubuntu@arm:~$ /etc/init.d/owserver status * owserver is not running ubuntu@arm:~$ ps aux |grep owser ubuntu 786 0.0 0.1 3292 688 pts/4 S+ 13:10 0:00 grep --color=auto owser ubuntu@arm:~$ sudo /usr/bin/owserver -c /etc/owfs.conf --debug <-- starts in foreground! DEBUG MODE libow version: 2.8p15 NLMSGHDR: len=48 type=3 (NLMSG_DONE) flags=5 seq=0|1 pid=790 CN_MSG: idx/val=3/1 (CN_W1_IDX) seq=0|1 ack=1 len=12 flags=0 W1_NETLINK_MSG: type=6 (W1_LIST_MASTERS) len=0 id=0 W1_NETLINK_CMD: NULL w1c field NULL data NLMSGHDR: len=52 type=3 (NLMSG_DONE) flags=0 seq=0|1 pid=0 CN_MSG: idx/val=3/1 (CN_W1_IDX) seq=0|1 ack=0 len=16 flags=12341 W1_NETLINK_MSG: type=6 (W1_LIST_MASTERS) len=4 id=172124960 W1_NETLINK_CMD: NULL w1c field Byte buffer Data, length=4 --000: 01 00 00 00 <....> NLMSGHDR: len=48 type=3 (NLMSG_DONE) flags=0 seq=0|1 pid=0 CN_MSG: idx/val=3/1 (CN_W1_IDX) seq=0|1 ack=1 len=12 flags=0 W1_NETLINK_MSG: type=6 (W1_LIST_MASTERS) len=0 id=0 W1_NETLINK_CMD: NULL w1c field NULL data ^Cubuntu@arm:~$ sudo /usr/bin/owserver -c /etc/owfs.conf --debug --background <-- Ctrl+C, then explicit background is honored DEBUG MODE libow version: 2.8p15 ubuntu@arm:~$ /etc/init.d/owserver status * owserver is not running ubuntu@arm:~$ ps aux |grep owser root 802 0.0 0.1 29164 944 ? Ssl 13:12 0:00 /usr/bin/owserver -c /etc/owfs.conf --debug --background ubuntu 817 0.0 0.1 3292 688 pts/4 S+ 13:13 0:00 grep --color=auto owser ubuntu@arm:~$ /etc/init.d/owserver status * owserver is not running ubuntu@arm:~$ sudo /etc/init.d/owserver stop <-- stop background * Stopping 1-Wire TCP Server owserver [ OK ] ubuntu@arm:~$ ps aux |grep owser ubuntu 921 0.0 0.1 3292 688 pts/4 S+ 13:28 0:00 grep --color=auto owser ubuntu@arm:~$ /etc/init.d/owserver status * owserver is not running ubuntu@arm:~$ sudo /usr/bin/owserver -c /etc/owfs.conf --error_print=1 --error_level=3 <-- --error_print=1 allows default background ubuntu@arm:~$ /etc/init.d/owserver status * owserver is not running ubuntu@arm:~$ ps aux |grep owser root 933 0.0 0.1 29164 952 ? Ssl 13:28 0:00 /usr/bin/owserver -c /etc/owfs.conf --error_print=1 --error_level=3 ubuntu 949 0.0 0.1 3292 688 pts/4 S+ 13:28 0:00 grep --color=auto owser ubuntu@arm:~$ --- So... The "/etc/init.d/owserver status" command seems useless. If forced to --error_print=2 my repo version of owserver prints debug info. Once that has been set, it is remembered somewhere, until it is explicitly set back to 1. Setting explicit --background temporarily overrules --error_print=2. And to get back to my fantasy of figuring out why my BBB is so incredibly slow at the timing test, is there any way to add timestamps to those debug lines? I tried to get the debug to print to syslog, where I assume it would get serious timestamps, but nothing at all ever appeared there. Maybe that part of debug really isn't included in my build... Loren | Loren Amelang | lo...@pacific.net | ------------------------------------------------------------------------------ Presto, an open source distributed SQL query engine for big data, initially developed by Facebook, enables you to easily query your data on Hadoop in a more interactive manner. Teradata is also now providing full enterprise support for Presto. Download a free open source copy now. http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140 _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers