Skip to content
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

stdout.txt starts with 292K of NULL bytes after first output #18

Open
elcojacobs opened this issue Oct 26, 2013 · 0 comments
Open

stdout.txt starts with 292K of NULL bytes after first output #18

elcojacobs opened this issue Oct 26, 2013 · 0 comments

Comments

@elcojacobs
Copy link
Member

Steps to reproduce:

  1. Let brewpi start with the default CRON command from brewpi.cron:
* * * * * brewpi python /home/brewpi/brewpi.py --checkstartuponly --dontrunfile; [ $? != 0 ] && python -u /home/brewpi/brewpi.py 1>/home/brewpi/logs/stdout.txt 2>>/home/brewpi/logs/stderr.txt &
  1. Erase the logs with the button in the web interface.
  2. Check file size of log files, stdout.txt should be 0 bytes.
  3. Wait for first data point to be logged.
  4. Check file size again: 292K
  5. Check content of stdout.txt with cat -A stdout.txt
...
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@Oct 26 2013 16:44:33  {"BeerTemp": 23.31,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 23.25,"FridgeSet":null,"FridgeAnn":null,"State":0}^M$

This might be caused by python -u (unbuffered). It might not even be bad, but it is weird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant