-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vzlogger should have a --one-time CLI switch #389
Comments
if you want to confuse yourself with the full history of this, read #40 #93 #94 . |
@r00t- yeah I've skimmed over this before I posted. I don't think a |
@dmesser: i'm only trying to point out that the issue arises because vzlogger gives a different meaning to "daemon" - which may very well be a bug. |
imho, it would make more sense to have a single ticket to fix the whole thing to conform to usual conventions, instead of single tickets demanding new features. this would probably mean:
(i wonder if anybody actually ever uses daemon:false mode.) |
Darf ich mich in deutsch dazugesellen? Ich fürchte mich sonst falsch auszudrücken. Soweit ich mich erinnere ist der Umstand das vzlogger bei daemon:false nur einen Durchgang macht eigentlich ein Bug. Nebeneffekt ist dabei auch das keine Daten an die Middleware geschickt werden weil der Prozess zu früh abgebrochen wird. Gut möglich das ich was durcheinander bringe oder nicht ganz verstehe, also bitte nicht all zu viel Gewicht auf meine Schlussfolgerungen legen. |
@r00t- I'd use |
Wofür brauchen wir egtl. foreground? Singleshot würde ja reichen um zu beweisen dass die Config funktioniert. Bliebe nur Singleshot („once“) als Option übrig. |
Oder wir lassen das Daemon Verhalten einfach komplett weg- mache ich bei mbmd auch ohne dass es bisher jemand vermisst hätte... |
Ich würde so eine "one-time"-Option gern nutzen, weil ich den Stromverbrauch nur 1x am Tag auslesen und loggen möchte. |
Hast du mal mit entsprechend großer aggtime oder interval versucht? |
Anstatt das per cron zu machen? Ich hab das vzlogger-beendet-sich-nicht-Problem gelöst, indem ich ihn einfach bitte zu sterben: In
|
Find ich jetzt nicht schlimm, aber ich frag mich wofür die 2% anfallen. Um was für einen Zähler geht es eigentlich? Sml? Den sollte man ja auch per interval auslesen können und dann egtl. agr keine Rechenleistung brauchen? |
Ja, ist ein SML-Zähler. |
Würde einen One-Shot mode auch begrüßen Außerdem peilt vzlogger es nicht wenn der ESP offline ist und somit die Telnet Verbindung wegbricht. Meine Idee war daher das der ESP selber den read Vorgang per MQTT triggert. |
The readme file still tells me that there are two modes available: „can run as a daemon or via cron“. Obviously it’s not working at the moment. |
@juergen4mueller: as you can see if you read the discussion, this issue is kind of deadlocked, with no developer picking it up for years. |
(the trivial part of ditching "daemon" and adding foreground mode is now in #450 .) single-shot mode is actually quite a bit more complex. as pointed out in #389 (comment) , if we exit the reading thread(s), also, |
for anybody feeling extremely adventurous, #450 has an implementation of single-shot mode now,
|
Related to #378 the behavior of
daemon: false
is highly unintuitive. A users normal expectation towards software that reads metering data and forwards this somewhere else is that it does this continuously under normal conditions. A user is usually interested in continuous metering, not a single value.Therefore I suggest that the default behavior of vzlogger without setting
daemon: true
explicitly is that it runs in the foreground, printing all output to the attached terminal. Withdaemon: true
set, the process should detach from the terminal and forward all output to the log file.The one-time mode can be obtained via CLI switch
--one-time
that should work independently of daemon mode.This aids debugging and conformance with regular UNIX daemons.
The text was updated successfully, but these errors were encountered: