[R] R process must die - can I save history?

Michael Weylandt michael.weylandt at gmail.com
Wed Oct 3 01:43:09 CEST 2012


Agreed -- very cool trick. Thanks Prof Ripley

Michael

On Oct 2, 2012, at 9:59 PM, steven mosher <moshersteven at gmail.com> wrote:

> thanks Dr. R. this will come in handy in the future as I have a knack for
> hanging R.
> On Oct 2, 2012 12:01 PM, "Prof Brian Ripley" <ripley at stats.ox.ac.uk> wrote:
> 
>> On 02/10/2012 18:29, Bert Gunter wrote:
>> 
>>> ?history
>>> 
>>> in a fresh R session, to see what might be possible. I'll bet the
>>> answer is, "No, you're screwed," though. Nevertheless, maybe Linux
>>> experts can save you.
>> 
>> Maybe not.  On a Unix-alike see ?Signals.  If you can find the pid of the
>> R process and it is still running (and not e.g. suspended),
>> 
>> kill -USR1 <pid>
>> 
>> will save the workspace and history.
>> 
>> 
>>> May the Force be with you.
>>> 
>>> -- Bert
>>> 
>>> On Tue, Oct 2, 2012 at 10:17 AM, Mike Miller <mbmiller+l at gmail.com>
>>> wrote:
>>> 
>>>> I connected from my desktop Linux box to a Linux server using ssh in an
>>>> xterm, but that xterm was running in Xvnc.  I'm running R on the server
>>>> in
>>>> that xterm (over ssh).  Something went wrong with Xvnc that has caused
>>>> it to
>>>> hang, probably this bug:
>>>> 
>>>> https://bugs.launchpad.net/**ubuntu/+source/vnc4/+bug/**819473<https://bugs.launchpad.net/ubuntu/+source/vnc4/+bug/819473>
>>>> 
>>>> So I can't get back to that ssh session or to R.  I had done a bunch of
>>>> work
>>>> in R but the command history hasn't been written out.  If I kill R, I
>>>> assume
>>>> the command history is gone.  I wish I could somehow cause R to dump the
>>>> command history.  Is there any way to tell the running R process to write
>>>> the history somewhere?
>>>> 
>>>> Thanks in advance.
>>>> 
>>>> Mike
>>>> 
>>>> --
>>>> Michael B. Miller, Ph.D.
>>>> Minnesota Center for Twin and Family Research
>>>> Department of Psychology
>>>> University of Minnesota
>>>> 
>>>> ______________________________**________________
>>>> R-help at r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
>>>> PLEASE do read the posting guide http://www.R-project.org/**
>>>> posting-guide.html <http://www.R-project.org/posting-guide.html>
>>>> and provide commented, minimal, self-contained, reproducible code.
>> 
>> --
>> Brian D. Ripley,                  ripley at stats.ox.ac.uk
>> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~**ripley/<http://www.stats.ox.ac.uk/~ripley/>
>> University of Oxford,             Tel:  +44 1865 272861 (self)
>> 1 South Parks Road,                     +44 1865 272866 (PA)
>> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>> 
>> ______________________________**________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
>> PLEASE do read the posting guide http://www.R-project.org/**
>> posting-guide.html <http://www.R-project.org/posting-guide.html>
>> and provide commented, minimal, self-contained, reproducible code.
> 
>    [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list