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
On May 31, 2009 5:58am, tomer filiba <tomerfil...@gmail.com> wrote:
> very nice!
> it would be great if you could add printing the daemon's status or
> something similar, ie, 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. eg, 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
> On Sat, May 30, 2009 at 23:47, marcin.cieslik marcin.cies
...@gmail.com>
> wrote:
> 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
> --
> An NCO and a Gentleman