Headless Linux squeak running max cpu

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Headless Linux squeak running max cpu

Rob Withers
I start the image with the following command:

setsid bin/squeak -vm-display-null -vm-sound-null echat-server.image
introducer.sq &

which runs it as a daemon, turns off display and sound, and runs a small
script that starts a listening socket.  The output from top, after running a
few minutes, is

  PID       USER      PR  NI  VIRT     RES  SHR   S  %CPU %MEM    TIME+
COMMAND
12557 vawhigso  20   0 1036m  42m 1276  S    23.4      0.3      0:28.32
squeak

There are 8 cpus, so we are getting time on more than one cpu.  Memory has
grown from 0.2 to 0.3 but doesn't seem to be growing ridiculously.  At some
point in time (several hours, I believe), squeak is no longer running.  I do
not know if this is because it runs out of memory, some other internal exit,
or the webhost kills it.   It looks like it is infinitely looping, but not
grabbing memory.   I expect it to idle at extremely low cpu.

What kinds of debugging tools can I use to see what it is doing?

Thanks,
Rob


Reply | Threaded
Open this post in threaded view
|

Re: Headless Linux squeak running max cpu

Eliot Miranda-2


On Sun, Jul 18, 2010 at 9:56 AM, Rob Withers <[hidden email]> wrote:
I start the image with the following command:

setsid bin/squeak -vm-display-null -vm-sound-null echat-server.image introducer.sq &

which runs it as a daemon, turns off display and sound, and runs a small script that starts a listening socket.  The output from top, after running a few minutes, is

 PID       USER      PR  NI  VIRT     RES  SHR   S  %CPU %MEM    TIME+ COMMAND
12557 vawhigso  20   0 1036m  42m 1276  S    23.4      0.3      0:28.32 squeak

There are 8 cpus, so we are getting time on more than one cpu.  Memory has grown from 0.2 to 0.3 but doesn't seem to be growing ridiculously.  At some point in time (several hours, I believe), squeak is no longer running.  I do not know if this is because it runs out of memory, some other internal exit, or the webhost kills it.   It looks like it is infinitely looping, but not grabbing memory.   I expect it to idle at extremely low cpu.

What kinds of debugging tools can I use to see what it is doing?

In Cog platforms/unix/vm/sqUnixMain.c you'll find code to cause SIGUSR1 to print all stacks.  This can easily be ported to the standard VM. Is the above with Cog or the standard VM?

cheers
Eliot


Thanks,
Rob




Reply | Threaded
Open this post in threaded view
|

Re: Headless Linux squeak running max cpu

Rob Withers
It is with my new Cog binary built with your help for a Linux server.  Smile emoticon
 
Are you saying I can send SIGUSR1 to squeak to make it do that?   How do I send SIGUSR1 again to a process?
 
Thanks,
Rob

Sent: Sunday, July 18, 2010 3:24 PM
Subject: Re: [squeak-dev] Headless Linux squeak running max cpu



On Sun, Jul 18, 2010 at 9:56 AM, Rob Withers <[hidden email]> wrote:
I start the image with the following command:

setsid bin/squeak -vm-display-null -vm-sound-null echat-server.image introducer.sq &

which runs it as a daemon, turns off display and sound, and runs a small script that starts a listening socket.  The output from top, after running a few minutes, is

 PID       USER      PR  NI  VIRT     RES  SHR   S  %CPU %MEM    TIME+ COMMAND
12557 vawhigso  20   0 1036m  42m 1276  S    23.4      0.3      0:28.32 squeak

There are 8 cpus, so we are getting time on more than one cpu.  Memory has grown from 0.2 to 0.3 but doesn't seem to be growing ridiculously.  At some point in time (several hours, I believe), squeak is no longer running.  I do not know if this is because it runs out of memory, some other internal exit, or the webhost kills it.   It looks like it is infinitely looping, but not grabbing memory.   I expect it to idle at extremely low cpu.

What kinds of debugging tools can I use to see what it is doing?

In Cog platforms/unix/vm/sqUnixMain.c you'll find code to cause SIGUSR1 to print all stacks.  This can easily be ported to the standard VM. Is the above with Cog or the standard VM?

cheers
Eliot


Thanks,
Rob






Reply | Threaded
Open this post in threaded view
|

Re: Headless Linux squeak running max cpu

Levente Uzonyi-2
In reply to this post by Rob Withers
On Sun, 18 Jul 2010, Rob Withers wrote:

> I start the image with the following command:
>
> setsid bin/squeak -vm-display-null -vm-sound-null echat-server.image
> introducer.sq &
>
> which runs it as a daemon, turns off display and sound, and runs a small
> script that starts a listening socket.  The output from top, after running a
> few minutes, is
>
> PID       USER      PR  NI  VIRT     RES  SHR   S  %CPU %MEM    TIME+
> COMMAND
> 12557 vawhigso  20   0 1036m  42m 1276  S    23.4      0.3      0:28.32
> squeak
>
> There are 8 cpus, so we are getting time on more than one cpu.  Memory has
> grown from 0.2 to 0.3 but doesn't seem to be growing ridiculously.  At some
> point in time (several hours, I believe), squeak is no longer running.  I do
> not know if this is because it runs out of memory, some other internal exit,
> or the webhost kills it.   It looks like it is infinitely looping, but not
> grabbing memory.   I expect it to idle at extremely low cpu.
>
> What kinds of debugging tools can I use to see what it is doing?

Install RFB (it's available on squeaksource). It will give full access to
the image. If you never used it, here are a few tips:
After installing the package, in the world menu select open..., then
RFB/VNC Server. In the connections submenu set an interactive password. It
doesn't have to be strong, since you'll tunnel your connection through
ssh. In the connections submenu disable "allow remote connections". In the
performance submenu set "allow ZRLE encoding" and disable "conserve
memory". Then start your server. Note that the tcp port is display number
+ 5900. So if you want your server to listen on 5901, then select display
number 1.

Squeak's RFB implementation is a bit picky, it won't accept connections
with certain client settings. For example it doesn't support other display
bitdepth than the image's depth. So if you're using RealVNC as a client,
then set the preferred encoding to ZRLE and select Full color (your image
probably uses 32-bits as depth). And make sure you turn off the "Render
cursor locally" option.


Levente

>
> Thanks,
> Rob
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Headless Linux squeak running max cpu

Eliot Miranda-2
In reply to this post by Rob Withers


On Sun, Jul 18, 2010 at 12:30 PM, Rob Withers <[hidden email]> wrote:
It is with my new Cog binary built with your help for a Linux server.  Smile emoticon
 
Are you saying I can send SIGUSR1 to squeak to make it do that?   How do I send SIGUSR1 again to a process?

kill -USR1 pid
 
 
Thanks,
Rob

Sent: Sunday, July 18, 2010 3:24 PM
Subject: Re: [squeak-dev] Headless Linux squeak running max cpu



On Sun, Jul 18, 2010 at 9:56 AM, Rob Withers <[hidden email]> wrote:
I start the image with the following command:

setsid bin/squeak -vm-display-null -vm-sound-null echat-server.image introducer.sq &

which runs it as a daemon, turns off display and sound, and runs a small script that starts a listening socket.  The output from top, after running a few minutes, is

 PID       USER      PR  NI  VIRT     RES  SHR   S  %CPU %MEM    TIME+ COMMAND
12557 vawhigso  20   0 1036m  42m 1276  S    23.4      0.3      0:28.32 squeak

There are 8 cpus, so we are getting time on more than one cpu.  Memory has grown from 0.2 to 0.3 but doesn't seem to be growing ridiculously.  At some point in time (several hours, I believe), squeak is no longer running.  I do not know if this is because it runs out of memory, some other internal exit, or the webhost kills it.   It looks like it is infinitely looping, but not grabbing memory.   I expect it to idle at extremely low cpu.

What kinds of debugging tools can I use to see what it is doing?

In Cog platforms/unix/vm/sqUnixMain.c you'll find code to cause SIGUSR1 to print all stacks.  This can easily be ported to the standard VM. Is the above with Cog or the standard VM?

cheers
Eliot


Thanks,
Rob










Reply | Threaded
Open this post in threaded view
|

Re: Headless Linux squeak running max cpu

Levente Uzonyi-2
In reply to this post by Rob Withers
On Sun, 18 Jul 2010, Rob Withers wrote:

> It is with my new Cog binary built with your help for a Linux server.
>
> Are you saying I can send SIGUSR1 to squeak to make it do that?   How do I send SIGUSR1 again to a process?

kill -USR1 <pid>


Levente

>
> Thanks,
> Rob
>
>
> From: Eliot Miranda
> Sent: Sunday, July 18, 2010 3:24 PM
> To: The general-purpose Squeak developers list
> Subject: Re: [squeak-dev] Headless Linux squeak running max cpu
>
>
>
>
>
> On Sun, Jul 18, 2010 at 9:56 AM, Rob Withers <[hidden email]> wrote:
>
>  I start the image with the following command:
>
>  setsid bin/squeak -vm-display-null -vm-sound-null echat-server.image introducer.sq &
>
>  which runs it as a daemon, turns off display and sound, and runs a small script that starts a listening socket.  The output from top, after running a few minutes, is
>
>   PID       USER      PR  NI  VIRT     RES  SHR   S  %CPU %MEM    TIME+ COMMAND
>  12557 vawhigso  20   0 1036m  42m 1276  S    23.4      0.3      0:28.32 squeak
>
>  There are 8 cpus, so we are getting time on more than one cpu.  Memory has grown from 0.2 to 0.3 but doesn't seem to be growing ridiculously.  At some point in time (several hours, I believe), squeak is no longer running.  I do not know if this is because it runs out of memory, some other internal exit, or the webhost kills it.   It looks like it is infinitely looping, but not grabbing memory.   I expect it to idle at extremely low cpu.
>
>  What kinds of debugging tools can I use to see what it is doing?
>
>
>
> In Cog platforms/unix/vm/sqUnixMain.c you'll find code to cause SIGUSR1 to print all stacks.  This can easily be ported to the standard VM. Is the above with Cog or the standard VM?
>
>
> cheers
> Eliot
>
>
>
>  Thanks,
>  Rob
>
>
>
>
>
>
> --------------------------------------------------------------------------------
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Headless Linux squeak running max cpu

Rob Withers
In reply to this post by Eliot Miranda-2
Much better now.  I had a stepping morph and about 8 loose processes in repeat loops that didn't terminate cleanly.  SIGUSR1 really helped me!  All cleaned up now and here's the numbers:
 
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
17683 vawhigso  20   0 1036m  43m 1284 S  2.0  0.3   0:04.39 squeak
 
2% CPU.
 
Thanks,
Rob

Sent: Sunday, July 18, 2010 3:42 PM
Subject: Re: [squeak-dev] Headless Linux squeak running max cpu



On Sun, Jul 18, 2010 at 12:30 PM, Rob Withers <[hidden email]> wrote:
It is with my new Cog binary built with your help for a Linux server.  Smile emoticon
 
Are you saying I can send SIGUSR1 to squeak to make it do that?   How do I send SIGUSR1 again to a process?

kill -USR1 pid
 
 
Thanks,
Rob

Sent: Sunday, July 18, 2010 3:24 PM
Subject: Re: [squeak-dev] Headless Linux squeak running max cpu



On Sun, Jul 18, 2010 at 9:56 AM, Rob Withers <[hidden email]> wrote:
I start the image with the following command:

setsid bin/squeak -vm-display-null -vm-sound-null echat-server.image introducer.sq &

which runs it as a daemon, turns off display and sound, and runs a small script that starts a listening socket.  The output from top, after running a few minutes, is

 PID       USER      PR  NI  VIRT     RES  SHR   S  %CPU %MEM    TIME+ COMMAND
12557 vawhigso  20   0 1036m  42m 1276  S    23.4      0.3      0:28.32 squeak

There are 8 cpus, so we are getting time on more than one cpu.  Memory has grown from 0.2 to 0.3 but doesn't seem to be growing ridiculously.  At some point in time (several hours, I believe), squeak is no longer running.  I do not know if this is because it runs out of memory, some other internal exit, or the webhost kills it.   It looks like it is infinitely looping, but not grabbing memory.   I expect it to idle at extremely low cpu.

What kinds of debugging tools can I use to see what it is doing?

In Cog platforms/unix/vm/sqUnixMain.c you'll find code to cause SIGUSR1 to print all stacks.  This can easily be ported to the standard VM. Is the above with Cog or the standard VM?

cheers
Eliot


Thanks,
Rob












Reply | Threaded
Open this post in threaded view
|

Re: Headless Linux squeak running max cpu

Rob Withers
In reply to this post by Levente Uzonyi-2


--------------------------------------------------
From: "Levente Uzonyi" <[hidden email]>
Sent: Sunday, July 18, 2010 3:42 PM
To: "The general-purpose Squeak developers list"
<[hidden email]>
Subject: Re: [squeak-dev] Headless Linux squeak running max cpu


> Install RFB (it's available on squeaksource). It will give full access to
> the image. If you never used it, here are a few tips:
> After installing the package, in the world menu select open..., then
> RFB/VNC Server. In the connections submenu set an interactive password. It
> doesn't have to be strong, since you'll tunnel your connection through
> ssh. In the connections submenu disable "allow remote connections". In the
> performance submenu set "allow ZRLE encoding" and disable "conserve
> memory". Then start your server. Note that the tcp port is display number
> + 5900. So if you want your server to listen on 5901, then select display
> number 1.
>
> Squeak's RFB implementation is a bit picky, it won't accept connections
> with certain client settings. For example it doesn't support other display
> bitdepth than the image's depth. So if you're using RealVNC as a client,
> then set the preferred encoding to ZRLE and select Full color (your image
> probably uses 32-bits as depth). And make sure you turn off the "Render
> cursor locally" option.
>

What does RFB stand for?  I intend to check this out.

Thanks,
Rob


Reply | Threaded
Open this post in threaded view
|

Re: Headless Linux squeak running max cpu

Eliot Miranda-2


On Sun, Jul 18, 2010 at 1:49 PM, Rob Withers <[hidden email]> wrote:


--------------------------------------------------
From: "Levente Uzonyi" <[hidden email]>

Sent: Sunday, July 18, 2010 3:42 PM
To: "The general-purpose Squeak developers list" <[hidden email]>

Subject: Re: [squeak-dev] Headless Linux squeak running max cpu


Install RFB (it's available on squeaksource). It will give full access to the image. If you never used it, here are a few tips:
After installing the package, in the world menu select open..., then RFB/VNC Server. In the connections submenu set an interactive password. It doesn't have to be strong, since you'll tunnel your connection through ssh. In the connections submenu disable "allow remote connections". In the performance submenu set "allow ZRLE encoding" and disable "conserve memory". Then start your server. Note that the tcp port is display number + 5900. So if you want your server to listen on 5901, then select display number 1.

Squeak's RFB implementation is a bit picky, it won't accept connections with certain client settings. For example it doesn't support other display bitdepth than the image's depth. So if you're using RealVNC as a client, then set the preferred encoding to ZRLE and select Full color (your image probably uses 32-bits as depth). And make sure you turn off the "Render cursor locally" option.


What does RFB stand for?  I intend to check this out.


e.g. & i.e. VNC
 

Thanks,
Rob




Reply | Threaded
Open this post in threaded view
|

Re: Headless Linux squeak running max cpu

Levente Uzonyi-2
In reply to this post by Rob Withers
On Sun, 18 Jul 2010, Rob Withers wrote:

>
>
> --------------------------------------------------
> From: "Levente Uzonyi" <[hidden email]>
> Sent: Sunday, July 18, 2010 3:42 PM
> To: "The general-purpose Squeak developers list"
> <[hidden email]>
> Subject: Re: [squeak-dev] Headless Linux squeak running max cpu
>
>
>> Install RFB (it's available on squeaksource). It will give full access to
>> the image. If you never used it, here are a few tips:
>> After installing the package, in the world menu select open..., then
>> RFB/VNC Server. In the connections submenu set an interactive password. It
>> doesn't have to be strong, since you'll tunnel your connection through ssh.
>> In the connections submenu disable "allow remote connections". In the
>> performance submenu set "allow ZRLE encoding" and disable "conserve
>> memory". Then start your server. Note that the tcp port is display number +
>> 5900. So if you want your server to listen on 5901, then select display
>> number 1.
>>
>> Squeak's RFB implementation is a bit picky, it won't accept connections
>> with certain client settings. For example it doesn't support other display
>> bitdepth than the image's depth. So if you're using RealVNC as a client,
>> then set the preferred encoding to ZRLE and select Full color (your image
>> probably uses 32-bits as depth). And make sure you turn off the "Render
>> cursor locally" option.
>>
>
> What does RFB stand for?  I intend to check this out.

Remote Frame Buffer. See
http://en.wikipedia.org/wiki/Virtual_Network_Computing 
and http://en.wikipedia.org/wiki/RFB_protocol .


Levente

>
> Thanks,
> Rob
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Headless Linux squeak running max cpu

Rob Withers
Ok, I am setting up.  Why disable "allow remote connections"?  I will run
this on a linux server and use RealVNC from my home machine.  Won't that
represent a remote connection to squeak's server?

Thanks,
Rob

--------------------------------------------------
From: "Levente Uzonyi" <[hidden email]>
Sent: Sunday, July 18, 2010 6:05 PM
To: "The general-purpose Squeak developers list"
<[hidden email]>
Subject: Re: [squeak-dev] Headless Linux squeak running max cpu

> On Sun, 18 Jul 2010, Rob Withers wrote:
>
>>
>>
>> --------------------------------------------------
>> From: "Levente Uzonyi" <[hidden email]>
>> Sent: Sunday, July 18, 2010 3:42 PM
>> To: "The general-purpose Squeak developers list"
>> <[hidden email]>
>> Subject: Re: [squeak-dev] Headless Linux squeak running max cpu
>>
>>
>>> Install RFB (it's available on squeaksource). It will give full access
>>> to the image. If you never used it, here are a few tips:
>>> After installing the package, in the world menu select open..., then
>>> RFB/VNC Server. In the connections submenu set an interactive password.
>>> It doesn't have to be strong, since you'll tunnel your connection
>>> through ssh. In the connections submenu disable "allow remote
>>> connections". In the performance submenu set "allow ZRLE encoding" and
>>> disable "conserve memory". Then start your server. Note that the tcp
>>> port is display number + 5900. So if you want your server to listen on
>>> 5901, then select display number 1.
>>>
>>> Squeak's RFB implementation is a bit picky, it won't accept connections
>>> with certain client settings. For example it doesn't support other
>>> display bitdepth than the image's depth. So if you're using RealVNC as a
>>> client, then set the preferred encoding to ZRLE and select Full color
>>> (your image probably uses 32-bits as depth). And make sure you turn off
>>> the "Render cursor locally" option.
>>>
>>
>> What does RFB stand for?  I intend to check this out.
>
> Remote Frame Buffer. See
> http://en.wikipedia.org/wiki/Virtual_Network_Computing and
> http://en.wikipedia.org/wiki/RFB_protocol .
>
>
> Levente
>
>>
>> Thanks,
>> Rob
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Headless Linux squeak running max cpu

Levente Uzonyi-2
On Sun, 18 Jul 2010, Rob Withers wrote:

> Ok, I am setting up.  Why disable "allow remote connections"?  I will run
> this on a linux server and use RealVNC from my home machine.  Won't that
> represent a remote connection to squeak's server?

The communication between the client and the server is not encrypted. So
you'll want to tunnel your tcp connection through ssh to encrypt it.
Therefore you don't need remote connections, because sshd will connect
from localhost.
The best is to filter out all incoming packets to the rfb's tcp port from
interfaces other than localhost with iptables or whatever you use.


Levente

>
> Thanks,
> Rob
>
> --------------------------------------------------
> From: "Levente Uzonyi" <[hidden email]>
> Sent: Sunday, July 18, 2010 6:05 PM
> To: "The general-purpose Squeak developers list"
> <[hidden email]>
> Subject: Re: [squeak-dev] Headless Linux squeak running max cpu
>
>> On Sun, 18 Jul 2010, Rob Withers wrote:
>>
>>>
>>>
>>> --------------------------------------------------
>>> From: "Levente Uzonyi" <[hidden email]>
>>> Sent: Sunday, July 18, 2010 3:42 PM
>>> To: "The general-purpose Squeak developers list"
>>> <[hidden email]>
>>> Subject: Re: [squeak-dev] Headless Linux squeak running max cpu
>>>
>>>
>>>> Install RFB (it's available on squeaksource). It will give full access to
>>>> the image. If you never used it, here are a few tips:
>>>> After installing the package, in the world menu select open..., then
>>>> RFB/VNC Server. In the connections submenu set an interactive password.
>>>> It doesn't have to be strong, since you'll tunnel your connection through
>>>> ssh. In the connections submenu disable "allow remote connections". In
>>>> the performance submenu set "allow ZRLE encoding" and disable "conserve
>>>> memory". Then start your server. Note that the tcp port is display number
>>>> + 5900. So if you want your server to listen on 5901, then select display
>>>> number 1.
>>>>
>>>> Squeak's RFB implementation is a bit picky, it won't accept connections
>>>> with certain client settings. For example it doesn't support other
>>>> display bitdepth than the image's depth. So if you're using RealVNC as a
>>>> client, then set the preferred encoding to ZRLE and select Full color
>>>> (your image probably uses 32-bits as depth). And make sure you turn off
>>>> the "Render cursor locally" option.
>>>>
>>>
>>> What does RFB stand for?  I intend to check this out.
>>
>> Remote Frame Buffer. See
>> http://en.wikipedia.org/wiki/Virtual_Network_Computing and
>> http://en.wikipedia.org/wiki/RFB_protocol .
>>
>>
>> Levente
>>
>>>
>>> Thanks,
>>> Rob
>>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Headless Linux squeak running max cpu

cdavidshaffer
In reply to this post by Rob Withers
On 07/18/10 18:40, Rob Withers wrote:
> Ok, I am setting up.  Why disable "allow remote connections"?  I will
> run this on a linux server and use RealVNC from my home machine.
> Won't that represent a remote connection to squeak's server?
>
> Thanks,
> Rob
>
IMHO it is best to ssh tunnel your VNC session.  tightvnc has -via and
-tunnel options to help or you can set the tunnel up manually with ssh
by tunneling local port 59?? to remote 59?? where ?? is the VNC display
number.  This may be why he's recommending disallowing remote connections.

David


Reply | Threaded
Open this post in threaded view
|

Re: Headless Linux squeak running max cpu

Rob Withers


--------------------------------------------------
From: "Levente Uzonyi" <[hidden email]>
Sent: Sunday, July 18, 2010 7:22 PM
To: "The general-purpose Squeak developers list"
<[hidden email]>
Subject: Re: [squeak-dev] Headless Linux squeak running max cpu

> On Sun, 18 Jul 2010, Rob Withers wrote:
>
>> Ok, I am setting up.  Why disable "allow remote connections"?  I will run
>> this on a linux server and use RealVNC from my home machine.  Won't that
>> represent a remote connection to squeak's server?
>
> The communication between the client and the server is not encrypted. So
> you'll want to tunnel your tcp connection through ssh to encrypt it.
> Therefore you don't need remote connections, because sshd will connect
> from localhost.
> The best is to filter out all incoming packets to the rfb's tcp port from
> interfaces other than localhost with iptables or whatever you use.
>

--------------------------------------------------
From: "C. David Shaffer" <[hidden email]>
Sent: Sunday, July 18, 2010 7:24 PM
To: "The general-purpose Squeak developers list"
<[hidden email]>
Subject: Re: [squeak-dev] Headless Linux squeak running max cpu

> On 07/18/10 18:40, Rob Withers wrote:
>> Ok, I am setting up.  Why disable "allow remote connections"?  I will
>> run this on a linux server and use RealVNC from my home machine.
>> Won't that represent a remote connection to squeak's server?
>>
>> Thanks,
>> Rob
>>
> IMHO it is best to ssh tunnel your VNC session.  tightvnc has -via and
> -tunnel options to help or you can set the tunnel up manually with ssh
> by tunneling local port 59?? to remote 59?? where ?? is the VNC display
> number.  This may be why he's recommending disallowing remote connections.
>

David and Levente,

How do I use -via or -tunnel with tightvnc?  I don't see those options.  I
am using the UI interface to launch the tool.   I can connect to my server,
enter my password, but then it says "Error while waiting for server
message".  This is not using ssh, or tunnel, or via.

Thanks,
Rob


Reply | Threaded
Open this post in threaded view
|

Re: Headless Linux squeak running max cpu

Levente Uzonyi-2
On Mon, 19 Jul 2010, Rob Withers wrote:

>
>
> --------------------------------------------------
> From: "Levente Uzonyi" <[hidden email]>
> Sent: Sunday, July 18, 2010 7:22 PM
> To: "The general-purpose Squeak developers list"
> <[hidden email]>
> Subject: Re: [squeak-dev] Headless Linux squeak running max cpu
>
>> On Sun, 18 Jul 2010, Rob Withers wrote:
>>
>>> Ok, I am setting up.  Why disable "allow remote connections"?  I will run
>>> this on a linux server and use RealVNC from my home machine.  Won't that
>>> represent a remote connection to squeak's server?
>>
>> The communication between the client and the server is not encrypted. So
>> you'll want to tunnel your tcp connection through ssh to encrypt it.
>> Therefore you don't need remote connections, because sshd will connect
>> from localhost.
>> The best is to filter out all incoming packets to the rfb's tcp port from
>> interfaces other than localhost with iptables or whatever you use.
>>
>
> --------------------------------------------------
> From: "C. David Shaffer" <[hidden email]>
> Sent: Sunday, July 18, 2010 7:24 PM
> To: "The general-purpose Squeak developers list"
> <[hidden email]>
> Subject: Re: [squeak-dev] Headless Linux squeak running max cpu
>
>> On 07/18/10 18:40, Rob Withers wrote:
>>> Ok, I am setting up.  Why disable "allow remote connections"?  I will
>>> run this on a linux server and use RealVNC from my home machine.
>>> Won't that represent a remote connection to squeak's server?
>>>
>>> Thanks,
>>> Rob
>>>
>> IMHO it is best to ssh tunnel your VNC session.  tightvnc has -via and
>> -tunnel options to help or you can set the tunnel up manually with ssh
>> by tunneling local port 59?? to remote 59?? where ?? is the VNC display
>> number.  This may be why he's recommending disallowing remote connections.
>>
>
> David and Levente,
>
> How do I use -via or -tunnel with tightvnc?  I don't see those options.  I am
> using the UI interface to launch the tool.   I can connect to my server,
> enter my password, but then it says "Error while waiting for server message".
> This is not using ssh, or tunnel, or via.

I don't use tightvnc, so I don't know. As I mentioned, Squeak's RFB is a
bit picky about parameters, so if you want to use tightvnc (I don't think
it's better than realvnc) you have to find the options that work with
Squeak.

About the tunneling: I don't use tightvnc, so I don't know how -via or
-tunnel works. This is how I tunnel my connections (on unix):
Let's say Squeak is running on host.com and it's RFB is listening on
5901 (display 1). On my pc I do:
ssh -p <sshserverport> -L 5901:127.0.0.1:5901 [hidden email]
Then connect with my vnc client on my pc to 127.0.0.1:5901.

If you just want to create a tunnel you can add the -N switch to ssh. If
you're using public key authentication without a passphrase you may also
find the -f switch useful.


Levente

>
> Thanks,
> Rob
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Headless Linux squeak running max cpu

cdavidshaffer
In reply to this post by Rob Withers
On 07/19/10 06:14, Rob Withers wrote:

>
> David and Levente,
>
> How do I use -via or -tunnel with tightvnc?  I don't see those
> options.  I am using the UI interface to launch the tool.   I can
> connect to my server, enter my password, but then it says "Error while
> waiting for server message".  This is not using ssh, or tunnel, or via.
>
> Thanks,
> Rob
>

Have you tried connecting to a squeak image running on your local
machine?  I'd verify that first.  I haven't found any configuration
necessary but I might be getting lucky.  I think that tightvnc
automatically chooses "tight" encoding when it is tunneled.  You might
try setting that manually.

I don't know anything about the UI interface...if you're on windows then
you might not have access to the built-in tunneling.  If you're on a
UNIX-like machine:

vncviewer -tunnel [hidden email]:display

will ssh into host.domain as user, creating a tunnel and then vnc
through that tunnel.  If you don't have direct access to the machine via
ssh (it is behind a firewall) then you need via:

vncviewer -via [hidden email] host.domain:display

which will vnc into dmzhost.dmzdomain and then through a tunnel between
your local machine and dmzhost, vnc into host.domain.

David

Reply | Threaded
Open this post in threaded view
|

Trigger printAllStacks with SIGUSR1 (was: [squeak-dev] Headless Linux squeak running max cpu)

David T. Lewis
In reply to this post by Eliot Miranda-2
On Sun, Jul 18, 2010 at 12:24:00PM -0700, Eliot Miranda wrote:

<snip>

> In Cog platforms/unix/vm/sqUnixMain.c you'll find code to cause SIGUSR1 to
> print all stacks.  This can easily be ported to the standard VM. Is the
> above with Cog or the standard VM?

It would be best not to tie printAllStacks() to a specific signal, because
SIGUSR1 is often used by third-party libraries that may be embedded in
plugins or called through FFI. Perhaps it could be to enabled via a command
line option if it is going to be part of the VM proper.

But the feature also seemed like a reasonable fit for OSProcessPlugin,
so I added it to OSPP and OSProcess (SqueakSource latest versions).
OSPP already had a mechanism for forwarding arbitrary unix signals to
Smalltalk semaphores, so the printAllStacks() hook is embedded into that
framework. The updates are:

OSProcessPlugin 4.3.4

Add #primitivePrintAllStacksOnSignal to attach the printAllStacks()
interpreter debugging function to a unix signal. Intended for debugging
support to enable SIGUSR1 to trigger a stack trace on console output.

OSProcess 4.3.13

Implement debugging stack dump methods:
  UnixOSProcessAccessor>>setPrintAllStacksOnSigUsr1
  UnixOSProcessAccessor>>clearPrintAllStacksOnSigUsr1
  UnixOSProcessAccessor>>primPrintAllStacksOnSignal:

To enable printAllStacks() on receipt of a SIGUSR1 signal:
    OSProcess accessor setPrintAllStacksOnSigUsr1

To disable printAllStacks() and restore the default SIGUSR1 handler:
    OSProcess accessor clearPrintAllStacksOnSigUsr1

Dave