-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello,
I have been using phoenix and cron to keep my IRC bots alive for some time, however I never previously needed to see their output.
The bots are written in python, and use print(), which sends data to stdout. When running in terminal or screen for example, this is the screen. However, when using phoenix, the claim is that stdout is redirected to be appended to a .out file. However, it seems not to actually be doing that, and the outfile contains only phoenix's output (useless, can we have a --quiet option?), and not the output of the bot (useful).
I've also become a tad confused with the crontab entries. Currently, they have >/dev/null so emails aren't sent ten thousand times a day or whatever - would this also redirect the output of the actual python script?
An answer here, or on https://wiki.toolserver.org/view/Phoenix would be most welcome.
Thanks, - -Mike.lifeguard
Heh, that's the exact opposite of my situation. :P
My situation is that all my stdout is going to the .out file, and because of that, it's filling up to several hundred megabytes in a matter of days.
On Wed, 2009-08-05 at 01:12 -0300, Mike.lifeguard wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello,
I have been using phoenix and cron to keep my IRC bots alive for some time, however I never previously needed to see their output.
The bots are written in python, and use print(), which sends data to stdout. When running in terminal or screen for example, this is the screen. However, when using phoenix, the claim is that stdout is redirected to be appended to a .out file. However, it seems not to actually be doing that, and the outfile contains only phoenix's output (useless, can we have a --quiet option?), and not the output of the bot (useful).
I've also become a tad confused with the crontab entries. Currently, they have >/dev/null so emails aren't sent ten thousand times a day or whatever - would this also redirect the output of the actual python script?
An answer here, or on https://wiki.toolserver.org/view/Phoenix would be most welcome.
Thanks,
- -Mike.lifeguard
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkp5BqoACgkQst0AR/DaKHvaugCbBGpbsd4CPiuzFFpSjCF2d18O iRgAoJY7jquVnY3AWigSZPPY2Sa5C0f+ =GASa -----END PGP SIGNATURE-----
Toolserver-l mailing list Toolserver-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/toolserver-l
I have been using phoenix and cron to keep my IRC bots alive for some time, however I never previously needed to see their output.
I actually wrote my own implementation of phoenix, before it was written.
http://svn.toolserver.org/svnroot/stwalkerster/trunk/helpmebot.sh
it's not the best script, but it seems to work well enough. I just hit it with cron every 5 minutes with the restart command, and it seems to work well enough
If they are written in Python, why not simply rewrite the parts being directed to stdout?
- Jason
On Tue, Aug 4, 2009 at 9:12 PM, Mike.lifeguard mike.lifeguard@gmail.comwrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello,
I have been using phoenix and cron to keep my IRC bots alive for some time, however I never previously needed to see their output.
The bots are written in python, and use print(), which sends data to stdout. When running in terminal or screen for example, this is the screen. However, when using phoenix, the claim is that stdout is redirected to be appended to a .out file. However, it seems not to actually be doing that, and the outfile contains only phoenix's output (useless, can we have a --quiet option?), and not the output of the bot (useful).
I've also become a tad confused with the crontab entries. Currently, they have >/dev/null so emails aren't sent ten thousand times a day or whatever - would this also redirect the output of the actual python script?
An answer here, or on https://wiki.toolserver.org/view/Phoenix would be most welcome.
Thanks,
- -Mike.lifeguard
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkp5BqoACgkQst0AR/DaKHvaugCbBGpbsd4CPiuzFFpSjCF2d18O iRgAoJY7jquVnY3AWigSZPPY2Sa5C0f+ =GASa -----END PGP SIGNATURE-----
Toolserver-l mailing list Toolserver-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/toolserver-l
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Jason wrote:
If they are written in Python, why not simply rewrite the parts being directed to stdout?
- Jason
Because it was apparently as easy as calling it like "python -u /path/to/script.py" instead of "python /path/to/script.py" -- many thanks to Erwin for fixing this up for us.
Next on the docket: trimming the .out file :D
- -Mike
toolserver-l@lists.wikimedia.org