rpyc daemon

205 views
Skip to first unread message

marcin.cieslik

unread,
May 30, 2009, 5:47:40 PM5/30/09
to rpyc
Hello,

I've just put together a very simple daemon around classic_server.py
using the python-daemon and ConfigParser modules.

http://pypi.python.org/pypi/python-daemon

grab it at: http://code.google.com/p/papy/source/browse/trunk/src/papy/utils/rpycd/

Yours,
Marcin

tomer filiba

unread,
May 31, 2009, 5:58:55 AM5/31/09
to rp...@googlegroups.com, marcin....@gmail.com
very nice!

it would be great if you could add printing the daemon's status or something similar, i.e., listening port, host, mode, how many current connections, etc.

this would be useful for sysadmins and the like, that might want to write a tool to monitor the rpyc server. e.g., every 60 seconds poll the daemon and plot a graph of the stats.

i'll link to your utility from the rpyc's download page.

-tomer
--
An NCO and a Gentleman

marcin....@gmail.com

unread,
May 31, 2009, 9:08:13 AM5/31/09
to tomer filiba, rp...@googlegroups.com
Hello,

I agree that this functionality is desired, but I do not really have an idea on how to do this. python-daemon makes rpyc classic _server detach from the terminal and the current process (it runs under a different pid than the interpreter which started the script).

I do not know how to properly communicate unix processes these are my ideas:

1) connect to the server from python and rely on some kind of introspection (but I have not discovered anything like conn.get_uptime() in the API)
2) make rpyc listen to signals via the "signal" module from python (this would probably involve coding inside rpyc)
3) make rpyc write a temporary state file every n-seconds, status in rpycd would be just 'check pid is running' cat state file

Yours,
Marcin
Reply all
Reply to author
Forward
0 new messages