Windows equivalent of kill -s SIGUSR1?

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

Windows equivalent of kill -s SIGUSR1?

alistairgrant
Hi All,

The subject pretty much says it all: Is there an equivalent on Windows
to the linux

kill -s SIGUSR1 <pid>

that gets the VM to dump its current status?

Thanks,
Alistair


Reply | Threaded
Open this post in threaded view
|

Re: Windows equivalent of kill -s SIGUSR1?

Henrik-Nergaard

 

Windows do not have Unix-style signals such as SIGUSR1.

 

To kill a process you can use Windows PowerShell:

 

$ Stop-Process -Name Pharo

Or by pid:

$ Get-Process -Name Pharo

$ Stop-Process -Id 42

 

Best regards,

Henrik

 

Sent from Mail for Windows 10

 

From: [hidden email]
Sent: 14 May 2017 23:18
To: [hidden email]
Subject: [Pharo-users] Windows equivalent of kill -s SIGUSR1?

 

Hi All,

The subject pretty much says it all: Is there an equivalent on Windows
to the linux

kill -s SIGUSR1 <pid>

that gets the VM to dump its current status?

Thanks,
Alistair

 

Reply | Threaded
Open this post in threaded view
|

Re: Windows equivalent of kill -s SIGUSR1?

alistairgrant
Hi Henrik,

On Sun, May 14, 2017 at 09:58:12PM +0000, Henrik Nergaard wrote:

>  
> Windows do not have Unix-style signals such as SIGUSR1.
>
> To kill a process you can use Windows PowerShell:
>
> $ Stop-Process -Name Pharo
>
> Or by pid:
>
> $ Get-Process -Name Pharo
>
> $ Stop-Process -Id 42

Thanks for your reply.

The kill command on Unix is somewhat misnamed, it actually just sends
one of a number of signals to the process.  For some of those signals,
it is up to the process to decide how it will respond.  For the USR1
signal, the VM responds by printing out information about its internal
state, including:

- version information
- C stack backtrace & registers
- All Smalltalk process stacks
- Most recent primitives

What I'm hoping is that the same thing can be done on Windows.

My understanding is that stop-process can only be used for terminating a
process.

Cheers,
Alistair


> From: Alistair Grant
> Sent: 14 May 2017 23:18
> To: [hidden email]
> Subject: [Pharo-users] Windows equivalent of kill -s SIGUSR1?
>
>  
>
> Hi All,
>
> The subject pretty much says it all: Is there an equivalent on Windows
> to the linux
>
> kill -s SIGUSR1 <pid>
>
> that gets the VM to dump its current status?
>
> Thanks,
> Alistair

Reply | Threaded
Open this post in threaded view
|

Re: Windows equivalent of kill -s SIGUSR1?

K K Subbu
In reply to this post by alistairgrant
On Monday 15 May 2017 02:47 AM, Alistair Grant wrote:
> The subject pretty much says it all: Is there an equivalent on Windows
> to the linux
>
> kill -s SIGUSR1 <pid>
>
> that gets the VM to dump its current status?

signals is unix-specific IPC. On Windows, you should be able to "create
dump file" from right-click menu on Task Manager's process list (if you
have the perms, of course!).

If you do a lot of system work on windows, sysinternals suite could be
very useful. It has many utilities for advanced operations (Procdump?)
on processes and files.

HTH .. Subbu

Reply | Threaded
Open this post in threaded view
|

Re: Windows equivalent of kill -s SIGUSR1?

alistairgrant
Hi Subbu,

On Mon, May 15, 2017 at 11:16:45AM +0530, K K Subbu wrote:

> On Monday 15 May 2017 02:47 AM, Alistair Grant wrote:
> >The subject pretty much says it all: Is there an equivalent on Windows
> >to the linux
> >
> >kill -s SIGUSR1 <pid>
> >
> >that gets the VM to dump its current status?
>
> signals is unix-specific IPC. On Windows, you should be able to "create dump
> file" from right-click menu on Task Manager's process list (if you have the
> perms, of course!).
>
> If you do a lot of system work on windows, sysinternals suite could be very
> useful. It has many utilities for advanced operations (Procdump?) on
> processes and files.

It looks like "dump" was a poor choice of words, as I expanded on in my
reply to Henrik, it's about requesting the VM to print out its internal
information.  The VM continues to function "normally" after the request
has been processed.

Thanks,
Alistair