public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: ps, test, /dev/null questions
@ 1997-09-21 12:29 Ken Cantrell
  0 siblings, 0 replies; 12+ messages in thread
From: Ken Cantrell @ 1997-09-21 12:29 UTC (permalink / raw)
  To: Sergey Okhapkin, gnu-win32, 'Khosla, Deepak'

Sergey (and others who may be interested),

>NT's built-in task manager will show you all the running processes. Do you
>know a _documented_ way to enumerate running processes on Windows NT?-)
>

There are actually a couple of different, documented, ways to do this.  You
can use EnumProcess (in PSAPI.DLL), or you can pull a list of all the running
processes out of the registry.  Using the registry is more difficult, but if
you do go that route, you can also get a list of all the threads as well,
which, to my knowledge, you can't get by using the PSAPI.DLL stuff.

If you have the MSDN, here are some links to look at for finding out more:

The Registry Interface to Performance Data in NT:
mk:@ivt:pdwbase/native/sdk/win32/pdh/src/perf1cf9.htm


How to use EnumProcess (source code example):
mk:@ivt:pdwbase/native/sdk/win32/sys/src/psap9cmr.htm

The MSDN is online ( http://www.microsoft.com/msdn ), you should be able to
figure out the online URLs from those above.   If not, let me know, and I can
find them for you.



********************************************************************
Ken Cantrell
DG Performance Modeling
x5879
kcantrel@dg.rtp.com
*** Don't forget to smile...that's why God gave us Fangs ***



-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: ps, test, /dev/null questions
@ 1997-09-18 23:50 Sergey Okhapkin
  1997-09-19  3:22 ` Gunther Ebert
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Sergey Okhapkin @ 1997-09-18 23:50 UTC (permalink / raw)
  To: 'gnu-win32@cygnus.com', 'Khosla, Deepak'

Khosla, Deepak wrote:
> Thanks for all the ideas. I tried a few:
> -	ps -eAf or any other option does not work. I guess as someone

ps command ignores any command line arguments and uses hard-coded output 
format.

> explained, you can only see cygnus processes - not a good port IMHO.
> Also pview is a grpahical utility AND you have to have the reosurce
> kit! Anyway, if you have the resource kit, you can use the TLIST
> command.

NT's built-in task manager will show you all the running processes. Do you 
know a _documented_ way to enumerate running processes on Windows NT?-)

--
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia
Looking for a job

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: ps, test, /dev/null questions
@ 1997-09-18 16:47 Larry Hall
  1997-09-19  8:41 ` Pete Jordan
  0 siblings, 1 reply; 12+ messages in thread
From: Larry Hall @ 1997-09-18 16:47 UTC (permalink / raw)
  To: Khosla, Deepak, 'gnu-win32@cygnus.com'

At 02:06 PM 9/18/97 -0500, Khosla, Deepak wrote:
>-	Sending anything to /dev/null does create a file that size (not 
>good), however if you input from it, you don't get anything (strange 
>but good)

I've made /dev/null a directory.  This works nicely since it never grows
and nothing ends up in the directory.  It has worked real well for me and 
seems to be a better alternative than using a file called null in the
/dev directory, IMHO.

Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      (781) 239-1053
8 Grove Street                          (781) 239-1655 - FAX
Wellesley, MA  02181                             

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: ps, test, /dev/null questions
@ 1997-09-18 12:23 Khosla, Deepak
  1997-09-20  7:22 ` Michael Hirmke
  0 siblings, 1 reply; 12+ messages in thread
From: Khosla, Deepak @ 1997-09-18 12:23 UTC (permalink / raw)
  To: 'gnu-win32@cygnus.com'

Thanks for all the ideas. I tried a few:
-	ps -eAf or any other option does not work. I guess as someone 
explained, you can only see cygnus processes - not a good port IMHO. 
Also pview is a grpahical utility AND you have to have the reosurce 
kit! Anyway, if you have the resource kit, you can use the TLIST 
command.
-	Nul: works on NT, I'm not sure why, but if it is a intentional 
feature and it plans on staying, it would be a good idea to document 
it.
-	Sending anything to /dev/null does create a file that size (not 
good), however if you input from it, you don't get anything (strange 
but good)
-	test -w ./DIR/. does just the same - returns false when it 
shouldn't

Regards

Deepak Khosla
281-514-9234
Deepak.Khosla@compaq.com


-----Original Message-----
From:	jeffdbREMOVETHIS@netzone.com 
[SMTP:jeffdbREMOVETHIS@netzone.com]
Sent:	Wednesday, September 17, 1997 11:44 PM
To:	Khosla, Deepak; gnu-win32@cygnus.com
Subject:	Re: ps, test, /dev/null questions

use pview (NT resource kit)
pview95 (Platform SDK sample applications)
wintop (95 only? MS kerneltoys)

cygnus ps only shows procs for cygnus processes. (reasonable I think 
:).

/dev/null exists only in the mind of the cygwin.dll (and not always 
there)

try diff -ubB /dev/null file.c (use echo|diff -ubB - file.c or diff 
-urBbN ../emptydir . )

.\\NUL (./NUL) exists in every directory on FAT VFAT or NTFS
(it's a system device however it's not recognized by cygwin.dll)
(see any good dos book whoops I mean dosshell95/NT, er win32? book :)

try test -w ./DIR/. && echo itshere  (the ending slash messes up stat 
I think)

On Wed, 17 Sep 1997 13:36:33 -0500, you wrote:

>Hi,
>
>Can anyone answer these for me - I've looked through the docs but no 
>man on ps :-(
>
>1)	ps -ef does not return all the jobs on the system. Is there a way 
I
>can look at all the jobs and not just the children of my session?
>2)	test -w Dir returns FALSE even though I can write to the directory 
>DIR
>3)	I have found through some emails that people use nul: as the
>equivalent of /dev/null (in Unix). Is that accurate and corect? Is
>that dcumented anywhere?
>
>Regards
>
>Deepak Khosla
>281-514-9234
>Deepak.Khosla@compaq.com
>
>
>-
>For help on using this list (especially unsubscribing), send a 
message to
>"gnu-win32-request@cygnus.com" with one line of text: "help".
>

(jeffdbREMOVETHIS@netzone.com)
delete REMOVETHIS from the above to reply
         Mikey

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 12+ messages in thread
* ps, test, /dev/null questions
@ 1997-09-17 11:41 Khosla, Deepak
  1997-09-17 21:44 ` Mikey
  0 siblings, 1 reply; 12+ messages in thread
From: Khosla, Deepak @ 1997-09-17 11:41 UTC (permalink / raw)
  To: 'gnu-win32@cygnus.com'

Hi,

Can anyone answer these for me - I've looked through the docs but no 
man on ps :-(

1)	ps -ef does not return all the jobs on the system. Is there a way I 
can look at all the jobs and not just the children of my session?
2)	test -w Dir returns FALSE even though I can write to the directory 
DIR
3)	I have found through some emails that people use nul: as the 
equivalent of /dev/null (in Unix). Is that accurate and corect? Is 
that dcumented anywhere?

Regards

Deepak Khosla
281-514-9234
Deepak.Khosla@compaq.com


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~1997-09-21 12:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-09-21 12:29 ps, test, /dev/null questions Ken Cantrell
  -- strict thread matches above, loose matches on Subject: below --
1997-09-18 23:50 Sergey Okhapkin
1997-09-19  3:22 ` Gunther Ebert
1997-09-19 12:39 ` Lassi A. Tuura
1997-09-19 19:29 ` Hilton Fernandes
1997-09-19 20:10 ` Alex
1997-09-18 16:47 Larry Hall
1997-09-19  8:41 ` Pete Jordan
1997-09-18 12:23 Khosla, Deepak
1997-09-20  7:22 ` Michael Hirmke
1997-09-17 11:41 Khosla, Deepak
1997-09-17 21:44 ` Mikey

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).