views:

125

answers:

2

I am developing a twisted server. I need to control the memory usage. It is not a good idea to modify code, insert some memory logging command and restart the server. I think it is better to use a "remote console", so that I can type heapy command and see the response from the server directly. All I need is a remote console, I can build one by myself, but I don't like to rebuild a wheel. My question is: is there already any remote console for twisted?

Thanks.

+6  A: 

Take a look at twisted.manhole

truppo
+8  A: 

twisted.manhole.telnet uses the deprecated module twisted.protocols.telnet. It is recommended to use twisted.conch.manhole instead.

Here are some tutorials of how to use it:

MizardX
http://twistedmatrix.com/trac/browser/trunk/doc/conch/examples/demo_manhole.tac is also probably worth looking at.
Jean-Paul Calderone