public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Privilege(s) needed to run top command
Date: Tue, 12 Mar 2019 20:28:00 -0000	[thread overview]
Message-ID: <20190312202802.GP3785@calimero.vinschen.de> (raw)
In-Reply-To: <20190312173901.GN3785@calimero.vinschen.de>

[-- Attachment #1: Type: text/plain, Size: 2392 bytes --]

On Mar 12 18:39, Corinna Vinschen wrote:
> On Mar 12 18:13, Corinna Vinschen wrote:
> > On Mar 12 10:00, jwang wrote:
> > > Sir,
> > 
> > Nope.
> > 
> > > I download, this morning:
> > > 3132 -rw-r--r--  1 james None 3207004 Mar 12 10:50 cygwin-20190312.tar.xz
> > > 
> > > tar -xvf cygwin-20190312.tar.xz
> > 
> > Where to?  You have to install cygwin1.dll in place of the other
> > cygwin1.dll while having stopped all Cygwin processes.  Just unpacking
> > with tar won't do anything useful.
> > 
> > > then I did: 
> > > 
> > > usr/bin/ps -W|grep httpd
> > 
> > This is really not helpful as far as bug reports go.  Drop the
> > grep, drop the -W.  Just call `ps -e' or `procps -e' or `top'
> > and see what's visible.  Do you see all CYgwin processes?  If so, fine.
> > If not, please report details.  Just don't expect top's load average
> > values to make any sense if you're running under a non-privileged
> > user account.  They will be always 0.
> 
> Btw., `ps -W' only shows non-Cygwin processes visible inside the
> current user session.  This session isolation has been introduced with
> Windows 2003 and since Vista even the console interactive session is
> running in its own session distinct from session 0.
> 
> Task Manager doesn't suffer this problem, but it's not clear to me why.
> Perhaps it connects to a broker service which gives task manager access
> to all processes.

This was complete nonsense.

Actually, the problem was entirely in Cygwin's ps.exe, and it's a
long-standing problem at that.

While the Cygwin DLL collected the complete process list for ps, ps then
didn't print any process it failed to call OpenProcess on.  These are a
*lot* of processes and the result looked a lot like the list of
processes in or connected to the current session.

The reason for this behaviour was that the image path of a process could
only be fetched when opening the process.  Today I found new
functionality since Vista which allows to fetch the image path without
having to open the process, so `ps -W' will print all processes again,
just as in the good old XP times :}

Please try the latest snapshot from https://cygwin.com/snapshots/

Make sure to use ps.exe from that snapshot since this time the ps
executable is affected, not the Cygwin DLL itself.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-03-12 20:28 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11 16:56 jwang
2019-03-11 20:29 ` L A Walsh
2019-03-11 20:41 ` Achim Gratz
2019-03-11 21:28   ` Corinna Vinschen
2019-03-11 21:40     ` Achim Gratz
2019-03-12  0:20       ` Andrey Repin
2019-03-12  8:58       ` Corinna Vinschen
2019-03-12  9:48   ` jwang
2019-03-12 11:14     ` Corinna Vinschen
2019-03-12 12:01       ` jwang
2019-03-12 12:39         ` Houder
2019-03-12 15:51           ` jwang
2019-03-12 16:47             ` Corinna Vinschen
2019-03-12 17:06               ` jwang
2019-03-12 17:13                 ` Corinna Vinschen
2019-03-12 17:19                   ` jwang
2019-03-12 17:40                     ` Corinna Vinschen
2019-03-12 17:39                   ` Corinna Vinschen
2019-03-12 20:28                     ` Corinna Vinschen [this message]
2019-03-12 20:50                       ` Andrey Repin
2019-03-12 20:59                         ` Corinna Vinschen
2019-03-12 21:50                           ` Andrey Repin
2019-03-12 18:10                   ` Houder
2019-03-12 19:27                 ` Achim Gratz
2019-03-13  9:17                   ` jwang
2019-03-15 10:20                     ` jwang
2019-03-15 11:28                       ` Corinna Vinschen
2019-03-15 12:34                         ` jwang
2019-03-15 13:38                           ` Corinna Vinschen
2019-03-15 13:50                             ` jwang
2019-03-15 14:11                             ` jwang
2019-03-15 14:53                               ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190312202802.GP3785@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).