[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Saving screen sessions state
From: |
Gerald Young |
Subject: |
Saving screen sessions state |
Date: |
Sat, 6 Jun 2009 14:10:19 -0500 |
User-agent: |
KMail/1.9.9 |
I use screen a lot. For running shells, vim, irssi, ssh, etc.
I love having the quick copy/paste capability between all of those. But more
importantly, I love keeping the state of those processes, for example bash's
history, the scrollback buffer itself, vim's opened tabs, etc.
The problem is that keeping that state is becoming costly, memory-wise. I have
66 bash instances running, taking 86MB of memory (as reported by ps, the real
memory usage is probably lower. Also keep in mind I some of these screen
sessions have been running since Apr 16).
Still, I don't just want to close all of those, and lose all that
precious "state". =)
So my solution for the moment is to (manually) write scripts to save/restore
the important aspects of the state. For each bash instance, for example, I
save the scrollback buffer, the bash history and the working directory to
files. Then I can restore them with other scripts.
For now I have managed to save/restore screen's sessions/windows, the
scrollback buffer and bash history/working dir. Hopefully I will be able to
do something similar with vim instances (no scrollback saving though, and use
vim scripts instead). Most other things either run under bash or it's enough
just to run the process in a screen window.
Any ideas to improve a system like this?
Note: I have just found out (on the archive of this list) about CryoPID.
Sounds interesting for processes that don't have an easy way to store the
important parts of state they have. No support for multiple processes like
screen has. It would certainly be easier, but it would consume a lot more HD
space than necessary.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Saving screen sessions state,
Gerald Young <=