Re: Unable to execute a script , Permission denied

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Les Mikesell wrote:
> On 5/25/2010 9:55 AM, m.roth@xxxxxxxxx wrote:
>   
>>> m.roth@xxxxxxxxx wrote:
>>>       
>>>> Bowie wrote:
>>>>
>>>>         
>>>>> ps -C java -o thcount | awk ' { total += $1 } END { print total } '
>>>>>
>>>>>           
>>>> Now, as dearly as I love awk,
>>>> ps -C java --no-heading | wc -l
>>>>
>>>>         
>>> You are counting processes, the original is counting threads.
>>>
>>> $ ps -C java -o thcount | awk ' { total += $1 } END { print total } '
>>> 29
>>>
>>> $ ps -C java --no-heading | wc -l
>>> 1
>>>       
>> Oh, I take that back - I see what's going on, a and yeah, you're right.
>>
>>     
>
> How about:
> ps H -C java |wc -l

Almost, but you're off by one...  :)

ps H -C java --no-headers | wc -l

-- 
Bowie
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux