On Thu, 4 Oct 2012, Patrick Steranka wrote:

I would start by nicing the Xvnc it's only allowed to eat the CPU when other things do not need to run. It's not a fix but it's a technique I've used to help fix a box that has a run-away process.

That's a good idea when there is a single CPU and it's hard to run any commands because Xvnc is in the way. In my case there are two quad-core chips so I have 8 CPUs and only one was at 100%, I believe. Anyway, it was easy to ssh in and do things -- it wasn't slow.

In the end I decided to kill Xvnc, but before I did it I used reptyr to attach to running ssh jobs and bash shells and exit them properly, saving the bash command histories. That was great -- I'd never heard of reptyr until a couple of days ago.

I used ssh to attach to the Ubuntu box with Xvnc running and I ran this command:

ps aux | grep ssh

That showed me these ssh processes and a few extraneous things:

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
mbmiller  3520  0.0  0.0  46944  4668 pts/5    S+   Jul25   0:23 ssh -X Server
mbmiller  4602  0.0  0.0  47720  5544 pts/9    S+   Aug09   1:07 ssh -X Server
mbmiller 25614  0.0  0.0  45584  3344 pts/11   S+   Sep24   0:00 ssh -X Server

I launched an xterm from which I would try to recapture those ssh sessions. I was missing the reptyr binary, so I installed it like so:

sudo apt-get install reptyr

The reptyr man page told me that I had to do this to allow reptyr to work (I could change the 0 back to 1 after finishing):

$ sudo su
root# echo 0 > /proc/sys/kernel/yama/ptrace_scope
root# exit

After that I just ran reptyr for each process, for example:

reptyr 3520

A few lines of text would appear (the last saying "Set the controlling tty"), I'd hit "enter" and it would give me my command prompt from my old shell. I was then able to save command histories, etc.

Mike


________________________________
From: Mike Miller <mbmille...@gmail.com>
To: VNC List <vnc-list@realvnc.com> Sent: Tuesday, October 2, 2012 4:11 AM
Subject: CPU at 100%, no refresh, known bug, but what to do?

Here's the bug...

https://bugs.launchpad.net/ubuntu/+source/vnc4/+bug/819473

...and I assume that is what has happened to me.  I'm running Xvnc at 100% CPU 
and I can connect to it, but the screen won't refresh.  I have a lot of stuff 
running there and I don't want to kill all of it, so I'm hoping there's some 
trick to make it refresh again.

Any ideas?

Do I just have to give up and kill Xvnc?

Thanks in advance.

Mike

--
Michael B. Miller, Ph.D.
Minnesota Center for Twin and Family Research
Department of Psychology
University of Minnesota
_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list

Reply via email to