This file is indexed.

/usr/share/doc/python-medusa-doc/txt/debugging.txt is in python-medusa-doc 1:0.5.4-7build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
===========================================================================
			  The Monitor Server
===========================================================================
The monitor server gives the developer a way to get into a server while
it's running.  Here's a quick demonstration of how to get to your server
objects while in the monitor:

[rushing@gnome medusa]$ python monitor_client.py 127.0.0.1 9999
Enter Password: 
Python 1.5 (#47, Jul 27 1998, 00:59:35)  [GCC egcs-2.90.29 980515 (egcs-1.0.3 release)]
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
Welcome to <secure_monitor_channel connected 127.0.0.1:10775 at 81dbdd8>
>>> from __main__ import *
>>> dir()
['CHAT_PORT', 'FTP_PORT', 'HOSTNAME', 'HTTP_PORT', 'IP_ADDRESS', 'MONITOR_PORT', 'PUBLISHING_ROOT', '__builtins__', 'asyncore', 'chat_server', 'cs', 'debug_mode', 'default_handler', 'dh', 'filesys', 'fs', 'ftp', 'ftp_server', 'hs', 'http_server', 'lg', 'logger', 'monitor', 'ms', 'os', 'resolver', 'rs', 'sh', 'status_handler', 'status_objects', 'sys', 'uh', 'unix_user_handler']
>>> ms
<secure_monitor_server listening :9999 at 812a6f8>
>>> rs
<caching_resolver  at 8133890>
>>> hs
<http_server listening :8080 at 81237a0>
>>> dir(hs)
['_fileno', 'accept', 'accepting', 'addr', 'bind', 'bytes_in', 'bytes_out', 'close', 'connect', 'connect_ex', 'dup', 'exceptions', 'family_and_type', 'fileno', 'getpeername', 'getsockname', 'getsockopt', 'handlers', 'ip', 'listen', 'logger', 'makefile', 'port', 'recv', 'recvfrom', 'send', 'sendto', 'server_name', 'server_port', 'setblocking', 'setsockopt', 'shutdown', 'socket', 'total_clients', 'total_requests']
>>> hs.total_clients
<counter value=0 at 8122468>
>>> cs
<chat_server listening :8888 at 8125bf0>
>>> cs.close()
log: closing channel 9:<chat_server listening :8888 at 8125bf0>
>>> 

Use 'exit' or 'Ctrl-D' to close a monitor session.

===========================================================================
			 Emergency Debug Mode
===========================================================================

Bugs and memory leaks in long-running servers may take weeks to show
up.  A useful debugging technique is to leave a crippled or bloated
server running, but to move the servers' sockets to different ports so
that you can start up another fresh copy in the meanwhile.

This allows you to debug the servers without forcing you to leave your
site broken while you do it.

Here's how:

Uncomment the support for '/status/emergency_debug' in <status_handler.py>

When your server goes ballistic, simply hit this URL.  This will shut
down the servers, and restart them on new ports.  Add 10000 to the old
port number, so if you were running a web server on port 80, it will
be moved to 10080.

Start up another copy of your system, which will run on the original
ports.

Now you can debug the errant servers in isolation.  Beats using GDB!