[R] Pausing R

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Mon Oct 19 15:21:11 CEST 2009


On Mon, Oct 19, 2009 at 2:01 PM, Karl Ove Hufthammer <karl at huftis.org> wrote:

> If you start the application using the command line, just press
> 'Ctrl + Z' to pause/suspend it. Then type 'fg' when you want to
> resume it.

 If you can't get to the command line where you started R, then you
can send the process the 'STOP' and 'CONT' signals using the 'kill'
command. You need to get the process ID (see "man ps" for this) and
then use "kill -STOP 12345" and "kill -CONT 12345" where 12345 is the
process ID.

 Quite what happens if you are running multiple R threads via the
multicore package or any of the other multiple process packages... I
don't know...

 Of course the real answer is to run long processes on a server -
preferably one with an uninterruptible power supply and a diesel
generator - or make your process checkpointable so you can kill it and
restart it again.

Barry




More information about the R-help mailing list