tcpconsole is an network emergency console for Linux (as it uses lowlevel Linux specific systemcalls). When your system no longer responds to ssh/telnet logins, you can still connect to tcpconsole (using standard telnet) and get a screendump of the physical console, the process-list, do 'sysrq'-calls (for system debugging and crash recovery) and list the contents of the Linux kernel message buffer (dmesg). The program does not do any fork()ing and as little as possible other resource-allocation.
Please note that this is intended to be used on a management-lan as the password is transmitted in clear-text accross the network (as using SSL would require all kinds of resources).
How it works
It uses the following techniques to become as much available as possible:
it locks all memory-pages in physical RAM so that if one or more processes are claiming all memory, tcpconsole won't be swapped out
it gives itself (for that it must run as root) maximum priority (by setting its nice-value to -20 and by setting the schedule-priority to realtime (if available)) in case one or more processes is using all CPU-time
it does not fork any child-processes (in case the process-table is full)
if possible it opens all required files and allocates all required memory at startup-time (again for when physical memory gets scarce)