[Cialug] Cygwin process control

Matthew Nuzum newz at bearfruit.org
Thu Feb 23 13:30:17 CST 2012


How about if you add w to your ps? On some OSs ps aw or ps aww shows you
wide output which includes extra command line information.

On Thu, Feb 23, 2012 at 10:03 AM, L. V. Lammert <lvl at omnitec.net> wrote:

> On Thu, 23 Feb 2012, moteyalpha wrote:
>
> > ps -Alf?
> >
> No -A, .. even with all of the options, cannot get any command line
> information:
>
> $ ps -aefl
>     UID     PID    PPID  TTY        STIME COMMAND
> Administ    2512       1 ?          Feb 21 /usr/bin/mintty
> cyg_serv    3252    2060 ?        07:43:47 /usr/sbin/sshd
> cyg_serv    1724    2060 ?        07:57:18 /usr/sbin/sshd
> Administ     292    1724 pty3     07:57:19 /usr/bin/bash
> Administ    1616    2100 pty0     12:05:18 /usr/bin/bash
> Administ    2592    2512 pty2       Feb 21 /usr/bin/bash
> Administ    2860       1 ?        21:36:25 /usr/bin/ssh
> Administ    3316    1616 pty0     21:48:10 /usr/bin/vim-nox
> Administ    2100       1 ?        12:05:17 /usr/bin/mintty
> Administ    3700    3252 pty1     07:43:49 /usr/bin/bash
> Administ    3284     292 pty3     08:03:08 /usr/bin/ps
> cyg_serv    2060    2112 ?          Feb 15 /usr/sbin/sshd
>
> $ ps -alpf
>      PID    PPID    PGID     WINPID   TTY     UID    STIME COMMAND
>     1308    3396    1308       4032  pty1     500 08:56:01 /usr/bin/ps
>      276    1884     276       3940  ?       1000 08:55:37 /usr/sbin/sshd
> I    3228    2696    3228       3380  pty0     500 10:27:00 /usr/bin/bash
>     3396     276    3396       3408  pty1     500 08:55:38 /usr/bin/bash
>     2696       1    2696       2696  ?        500 10:27:00 /usr/bin/mintty
>     2836       1    2836       2836  ?        500 08:44:28 /usr/bin/ssh
>     1884    1868    1884       1960  ?       1000 10:01:11 /usr/sbin/sshd
>
> There appears to be no way to retrieve the command line info required to
> match a specific ssh session; the closest I can get is finding an ssh
> pid with pgrep:
>
> $ pgrep -l ssh
> 3252 sshd
> 1724 sshd
> 2860 ssh
>
> Without any command info for a ssh PID [the should be only one, but I hate
> to make that assumption], it appears the only option is to kill them all..
>
>        Lee
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>



-- 
Matthew Nuzum
newz2000 on freenode, skype, linkedin and twitter

♫ You're never fully dressed without a smile! ♫


More information about the Cialug mailing list