in reply to Re^3: Capture Console Results?
in thread Capture Console Results?
I notice you still have the space between the dash (-) and the "auwwx". My test code refuses to find "inder" when I leave the space between the dash and the auwwx (and I know for CERTAIN that I'm currently running the Finder), but seems to find it just fine with a standard width (80 chars) window, again when I've shrank my window to 35 chars wide, all the while the output of the command in Terminal is clearly beyond that width:
My-Computer()$ ps -auwwx | grep inder chargrill 255 0.0 2.2 228420 23320 ?? S 16Feb06 1:44.33 + /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder -psn_0 +_917505 chargrill 23153 0.0 0.0 27820 4 p2 R+ 12:08PM 0:00.00 + grep inder My-Computer()$ ps - auwwx | grep inder 23155 p2 R+ 0:00.00 grep inder My-Computer()$
When I type "ps - auwwx", I get nothing like what I expect to see, which is an extra wide listing of all processes from all users running on the computer, instead I see (apparently) only the login (interactive) processes currently running as my user:
My-Computer()$ ps - auwwx PID TT STAT TIME COMMAND 12006 p1 S 0:00.10 -bash 18744 p1 S+ 0:00.22 /usr/bin/perl /usr/bin/perldoc perlop 18753 p1 S+ 0:00.02 /usr/bin/less /tmp/Zf90IVbUVV 12073 p2 S 0:00.69 -bash 3319 p3 Ss+ 0:00.09 -bash 15497 p4 S 0:00.14 -bash 20550 p4 S+ 0:00.21 /usr/bin/perl /usr/bin/perldoc perlvar 20559 p4 S+ 0:00.06 /usr/bin/less /tmp/rTkTg152OS
Vs.
ls-Computer()$ ps -auwwx | more USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME C +OMMAND chargrill 936 6.6 1.6 222620 17208 ?? S 16Feb06 21:48.75 + /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal -psn_0_ +5898241 chargrill 18190 4.1 15.4 477220 161736 ?? S Tue03PM 129:48.52 + /Applications/Safari.app/Contents/MacOS/Safari -psn_0_71303169 windowse 103 3.6 4.0 257112 41960 ?? Ss 16Feb06 352:48.88 +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/C +oreGraphics.framework/Resources/WindowServer -daemon ---<SNIP>---
Please try it getting rid of the space, I beg of you! :-) I've never seen that particular incarnation of command line options to ps. Either with the dash immediately preceeding the options, or leaving the dash out (Linux will complain about a superfluous dash). But not ps_-_auwwx.
$/ = q#(\w)# ; sub sig { print scalar reverse join ' ', @_ } + sig map { s$\$/\$/$\$2\$1$g && $_ } split( ' ', ",erckha rlPe erthnoa stJu +" );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Capture Console Results?
by ecuguru (Monk) on Mar 14, 2006 at 00:10 UTC |