[vz-users] vzlogger

Heiko W. luckyheiko at hotmail.com
Sat Feb 9 11:37:51 CET 2013


Hallo 

nun klappts O.o 

der Daemon war der Grund .. 
war mir aber fast sicher das ich da nichts geändert habe .. 

aber naja so kanns gehn :( 

VIELEN DANK



Mit freundlichen Grüßen
Heiko W.


From: luckyheiko at hotmail.com
To: volkszaehler-users at lists.volkszaehler.org
Date: Sat, 9 Feb 2013 11:32:36 +0100
Subject: Re: [vz-users] vzlogger





Hallo 

danke erst mal die Config geändert ..

"retry" : 30,                 /* how long to sleep between failed requests, in seconds */
"daemon": true,               /* run periodically */
"foreground" : true,          /* dont run in background (prevents forking) */
"verbosity" : 15,              /* between 0 and 15 */ 

daemon von false auf true
verbosity von 1 auf 15

nun kommt das (sorry für die länge)

pi at raspberrypi ~ $ vzlogger-c
[Feb 09 11:30:23][mtr0] New meter initialized (protocol=sml)
[Feb 09 11:30:23][ch0]  New channel initialized (uuid=...b92d66 middleware=http://localhost/middleware.php id=1-0:16.7.0)
[Feb 09 11:30:23][ch1]  New channel initialized (uuid=...7a9fd6 middleware=http://localhost/middleware.php id=1-0:2.8.0)
[Feb 09 11:30:23][ch2]  New channel initialized (uuid=...1fbdf1 middleware=http://localhost/middleware.php id=1-0:1.8.2)
[Feb 09 11:30:23][ch3]  New channel initialized (uuid=...8bc4f7 middleware=http://localhost/middleware.php id=1-0:1.8.1)
[Feb 09 11:30:23][mtr1] New meter initialized (protocol=sml)
[Feb 09 11:30:23][ch4]  New channel initialized (uuid=...3e342c middleware=http://localhost/middleware.php id=1-0:2.8.0)
[Feb 09 11:30:23][ch5]  New channel initialized (uuid=...0a13ef middleware=http://localhost/middleware.php id=1-0:16.7.0)
[Feb 09 11:30:23][mtr0] Meter connection established
[Feb 09 11:30:23][mtr0] Meter thread started
[Feb 09 11:30:23][ch0]  Logging thread started
[Feb 09 11:30:23][ch1]  Logging thread started
[Feb 09 11:30:23][ch2]  Logging thread started
[Feb 09 11:30:23][ch3]  Logging thread started
[Feb 09 11:30:23][mtr1] Meter connection established
[Feb 09 11:30:23][mtr1] Meter thread started
[Feb 09 11:30:23][ch4]  Logging thread started
[Feb 09 11:30:23][ch5]  Logging thread started
[Feb 09 11:30:23][http] Starting local interface HTTPd on port 8080
error: unknown type in sml_value_to_double
error: unknown type in sml_value_to_double
error: unknown type in sml_value_to_double
[Feb 09 11:30:24][mtr1] Got 8 new readings from meter:
[Feb 09 11:30:24][mtr1] Reading: id=129-129:199.130.3*255 value=0.00 ts=1360405824.180
[Feb 09 11:30:24][mtr1] Reading: id=1-0:0.0.9*255 value=0.00 ts=1360405824.180
[Feb 09 11:30:24][mtr1] Reading: id=1-0:2.8.0*255 value=1317716.10 ts=1360405824.180
[Feb 09 11:30:24][mtr1] Reading: id=1-0:2.8.1*255 value=1317716.10 ts=1360405824.180
[Feb 09 11:30:24][mtr1] Reading: id=1-0:2.8.2*255 value=0.00 ts=1360405824.180
[Feb 09 11:30:24][mtr1] Reading: id=1-0:16.7.0*255 value=-1361.10 ts=1360405824.180
[Feb 09 11:30:24][mtr1] Reading: id=129-129:199.130.5*255 value=0.00 ts=9949724.000
[Feb 09 11:30:24][mtr1] Reading: id=0-0:0.0.0*0 value=0.00 ts=0.000
[Feb 09 11:30:24][mtr1] Updating interval to 1
[Feb 09 11:30:24][ch4]  Adding reading to queue (value=1317716.10 ts=1360405824.180)
[Feb 09 11:30:24][ch4]  JSON request body: [ [ 1360405824180.340088, 1317716.100000 ] ]
[Feb 09 11:30:24][ch4]  Buffer dump (size=1 keep=600): {1317716.10!}
[Feb 09 11:30:24][ch5]  Adding reading to queue (value=-1361.10 ts=1360405824.180)
[Feb 09 11:30:24][ch5]  JSON request body: [ [ 1360405824180.346924, -1361.100000 ] ]
[Feb 09 11:30:24][ch5]  Buffer dump (size=1 keep=600): {-1361.10!}
[Feb 09 11:30:24][ch4]  CURL: About to connect() to localhost port 80 (#0)
[Feb 09 11:30:24][ch5]  CURL: About to connect() to localhost port 80 (#0)
[Feb 09 11:30:24][ch5]  CURL:   Trying 127.0.0.1...
[Feb 09 11:30:24][ch5]  CURL: connected
[Feb 09 11:30:24][ch5]  CURL: Connected to localhost (127.0.0.1) port 80 (#0)
[Feb 09 11:30:24][ch4]  CURL:   Trying 127.0.0.1...
[Feb 09 11:30:24][ch4]  CURL: connected
[Feb 09 11:30:24][ch4]  CURL: Connected to localhost (127.0.0.1) port 80 (#0)
[Feb 09 11:30:24][ch5]  CURL: Sent 42 bytes..
[Feb 09 11:30:24][ch5]  CURL: upload completely sent off: 42 out of 42 bytes
[Feb 09 11:30:24][ch5]  CURL: additional stuff not fine transfer.c:1037: 0 0
[Feb 09 11:30:24][ch4]  CURL: Sent 44 bytes..
[Feb 09 11:30:24][ch4]  CURL: upload completely sent off: 44 out of 44 bytes
[Feb 09 11:30:24][ch4]  CURL: additional stuff not fine transfer.c:1037: 0 0
[Feb 09 11:30:24][ch5]  CURL: HTTP 1.1 or later with persistent connection, pipelining supported
[Feb 09 11:30:24][ch5]  CURL: Received 28 bytes
[Feb 09 11:30:24][ch5]  CURL: Connection #0 to host localhost left intact
[Feb 09 11:30:24][ch5]  Request succeeded with code: 200
[Feb 09 11:30:24][ch4]  CURL: HTTP 1.1 or later with persistent connection, pipelining supported
[Feb 09 11:30:24][ch4]  CURL: Received 28 bytes
[Feb 09 11:30:24][ch4]  CURL: Connection #0 to host localhost left intact
[Feb 09 11:30:24][ch4]  Request succeeded with code: 200
error: unknown type in sml_value_to_double
error: unknown type in sml_value_to_double
error: unknown type in sml_value_to_double
[Feb 09 11:30:24][mtr0] Got 11 new readings from meter:
[Feb 09 11:30:24][mtr0] Reading: id=129-129:199.130.3*255 value=0.00 ts=1360405824.939
[Feb 09 11:30:24][mtr0] Reading: id=1-0:0.0.9*255 value=0.00 ts=1360405824.939
[Feb 09 11:30:24][mtr0] Reading: id=1-0:1.8.0*255 value=1967860.60 ts=1360405824.939
[Feb 09 11:30:24][mtr0] Reading: id=1-0:2.8.0*255 value=892320.50 ts=1360405824.939
[Feb 09 11:30:24][mtr0] Reading: id=1-0:1.8.1*255 value=985040.80 ts=1360405824.939
[Feb 09 11:30:24][mtr0] Reading: id=1-0:2.8.1*255 value=892320.50 ts=1360405824.939
[Feb 09 11:30:24][mtr0] Reading: id=1-0:1.8.2*255 value=982819.80 ts=1360405824.939
[Feb 09 11:30:24][mtr0] Reading: id=1-0:2.8.2*255 value=0.00 ts=1360405824.939
[Feb 09 11:30:24][mtr0] Reading: id=1-0:16.7.0*255 value=-1140.20 ts=1360405824.939
[Feb 09 11:30:24][mtr0] Reading: id=129-129:199.130.5*255 value=0.00 ts=9950686.000
[Feb 09 11:30:24][mtr0] Reading: id=0-0:0.0.0*0 value=0.00 ts=0.000
[Feb 09 11:30:24][mtr0] Updating interval to 1
[Feb 09 11:30:24][ch0]  Adding reading to queue (value=-1140.20 ts=1360405824.939)
[Feb 09 11:30:24][ch0]  JSON request body: [ [ 1360405824939.244873, -1140.200000 ] ]
[Feb 09 11:30:24][ch0]  CURL: About to connect() to localhost port 80 (#0)
[Feb 09 11:30:24][ch0]  CURL:   Trying 127.0.0.1...
[Feb 09 11:30:24][ch0]  Buffer dump (size=1 keep=600): {-1140.20!}
[Feb 09 11:30:24][ch1]  Adding reading to queue (value=892320.50 ts=1360405824.939)
[Feb 09 11:30:24][ch0]  CURL: connected
[Feb 09 11:30:24][ch0]  CURL: Connected to localhost (127.0.0.1) port 80 (#0)
[Feb 09 11:30:24][ch1]  JSON request body: [ [ 1360405824939.232178, 892320.500000 ] ]
[Feb 09 11:30:24][ch1]  CURL: About to connect() to localhost port 80 (#0)
[Feb 09 11:30:24][ch1]  CURL:   Trying 127.0.0.1...
[Feb 09 11:30:24][ch1]  Buffer dump (size=1 keep=600): {892320.50!}
[Feb 09 11:30:24][ch2]  Adding reading to queue (value=982819.80 ts=1360405824.939)
[Feb 09 11:30:24][ch0]  CURL: Sent 42 bytes..
[Feb 09 11:30:24][ch2]  JSON request body: [ [ 1360405824939.239990, 982819.800000 ] ]
[Feb 09 11:30:24][ch2]  CURL: About to connect() to localhost port 80 (#0)
[Feb 09 11:30:24][ch2]  CURL:   Trying 127.0.0.1...
[Feb 09 11:30:24][ch1]  CURL: connected
[Feb 09 11:30:24][ch1]  CURL: Connected to localhost (127.0.0.1) port 80 (#0)
[Feb 09 11:30:24][ch2]  Buffer dump (size=1 keep=600): {982819.80!}
[Feb 09 11:30:24][ch3]  Adding reading to queue (value=985040.80 ts=1360405824.939)
[Feb 09 11:30:24][ch0]  CURL: upload completely sent off: 42 out of 42 bytes
[Feb 09 11:30:25][ch0]  CURL: additional stuff not fine transfer.c:1037: 0 0
[Feb 09 11:30:25][ch3]  JSON request body: [ [ 1360405824939.234131, 985040.800000 ] ]
[Feb 09 11:30:25][ch3]  CURL: About to connect() to localhost port 80 (#0)
[Feb 09 11:30:25][ch3]  CURL:   Trying 127.0.0.1...
[Feb 09 11:30:24][ch2]  CURL: connected
[Feb 09 11:30:25][ch2]  CURL: Connected to localhost (127.0.0.1) port 80 (#0)
[Feb 09 11:30:25][ch3]  Buffer dump (size=1 keep=600): {985040.80!}
[Feb 09 11:30:25][ch1]  CURL: Sent 43 bytes..
[Feb 09 11:30:25][ch1]  CURL: upload completely sent off: 43 out of 43 bytes
[Feb 09 11:30:25][ch1]  CURL: additional stuff not fine transfer.c:1037: 0 0
[Feb 09 11:30:25][ch2]  CURL: Sent 43 bytes..
[Feb 09 11:30:25][ch2]  CURL: upload completely sent off: 43 out of 43 bytes
[Feb 09 11:30:25][ch3]  CURL: connected
[Feb 09 11:30:25][ch3]  CURL: Connected to localhost (127.0.0.1) port 80 (#0)
[Feb 09 11:30:25][ch3]  CURL: Sent 43 bytes..
[Feb 09 11:30:25][ch3]  CURL: upload completely sent off: 43 out of 43 bytes
[Feb 09 11:30:25][ch3]  CURL: additional stuff not fine transfer.c:1037: 0 0
[Feb 09 11:30:25][ch2]  CURL: additional stuff not fine transfer.c:1037: 0 0
^C[Feb 09 11:30:25]       Closing connections to terminate
[Feb 09 11:30:25][ch5]  CURL: Closing connection #0
[Feb 09 11:30:25][ch4]  CURL: Closing connection #0
pi at raspberrypi ~ $





hab 

Mit freundlichen Grüßen
Heiko W.


> Date: Sat, 9 Feb 2013 11:27:43 +0100
> From: r00t at constancy.org
> To: volkszaehler-users at lists.volkszaehler.org
> Subject: Re: [vz-users] vzlogger
> 
> On Sat, 9 Feb 2013 11:10:24 +0100 Daniel Lauckner <mailing at jahp.de> wrote:
> > Deine angehängte Konfiguration sagt:
> > "daemon": false,               /* run periodically */
> > 
> > Aber dein
> > # vzlogger-c
> > von vorhin:
> > [Feb 09 09:52:10]       Daemonize process...
> > 
> > Da passt was nicht zusammen.
> 
> das liegt wieder nur an verwirrenden bezeichungen...
> 
> "daemon": false,
> hat nichts damit zu tun, on vzlogger sich vom terminal in dem er gestartet
> wurde abhaengt ("daemonize"),
> sondern gibt an, dass vzlogger nur EIN datentelegramm vom zaehler liest,
> uebermittelt, und sich dann beendet...
> der modus ist nutzbar, wenn man vzlogger zB von cron aus aufruft.
> 
> wenn daemon=false ist, beendet vzlogger sich nach einer "messung",
> sollte immer true sein, ausser bei regelmaessigem aufruf aus cron!
> 
> das koennte auch schon der fehler sein...
> mir fiel auf, das die logs etwas kurz erscheinen, und fragte mich ob/warum
> die abgeschnitten wurden...
> 
> (was mich AUCH stoert: ich sehe in den logs keine ausgaben von CURL,
>  d.h. keine requests an die middleware...
>  entweder ist der debug-level nicht hoch genug,
>  oder es werden garkeine daten an die middleware uebermittelt...)
> 
> und:
> das "daemonize" kommt von:
> "foreground" : false,
> zum testen wuerde ich IMMER foreground auf true setzen,
> oder vzlogger mit -f starten,
> dann laeuft vzlogger einfach im terminal, und man kann dort sehen wenn
> er abbricht, ohne mit ps zu suchen,
> und bekommst insbesondere auch die "Segmentation Fault" o.ae. meldung von
> der shell, wenn er wegen einem bug abstuerzt.
> (ggfs in einer screen-session starten)
> 
> > mfg Daniel
> 
> - Thorben
 		 	   		   		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://volkszaehler.org/pipermail/volkszaehler-users/attachments/20130209/789e587e/attachment.html>


More information about the volkszaehler-users mailing list