Re: cgroup.procs versus tasks (cgroups)

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

 



On Tue, 02 Apr 2013 16:46:24 +0300, Kevin Wilson said:
> Hi,
> Thanks  a lot Vlad. This explains it.
> - Does anybody know of a ps command (or a filter to  ps command)
> which will display only multithreaded
> processes (list processes by TGID) ?  (I know now about the option of
> displaying cgroup.procs , but is something parallel can be done with ps ? )

Have you tried 'ps -m' and friends?  Though it doesn't do exactly
what you wanted and *only* display multithreaded, you need to do some
post-processing:

$ ps max
...
   928 ?        -      0:00 /sbin/auditd -n
     - -        S<sl   0:00 -
     - -        S<sl   0:00 -
   940 ?        -      0:00 /sbin/audispd
     - -        S<sl   0:00 -
     - -        S<sl   0:00 -
   951 ?        -      0:00 /usr/sbin/abrtd -d -s
     - -        Ss     0:00 -
   960 ?        -      0:00 /usr/bin/abrt-watch-log -F Backtrace /var/log/Xorg.0.log -- /usr/bin/abrt-dump-xorg -xD
     - -        Ss     0:00 -

If there's 2 or more '- -' after the process entry, it's multi=threaded.

Note however that as far as the kernel is concerned, a single-threaded
process is handled by the code as a multi-threaded that happens to have
only one thread at the moment.  In other words, thinking that single and
multi threaded is different in some mystical way will probably end up
causing trouble for  you...

Attachment: pgprtcplU1LL5.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux