Changes

262 bytes added ,  22:03, 24 September 2018
→‎Proposed solution: + few missing fields to TASK_DIAG_BASE
Line 59: Line 59:     
* Ability to specify a set of processes to get info about
 
* Ability to specify a set of processes to get info about
** TASK_DIAG_DUMP_ALL: dump all processes
+
{| class="wikitable"
** TASK_DIAG_DUMP_ALL_THREAD: dump all threads
+
|| TASK_DIAG_DUMP_ALL || dump all processes
** TASK_DIAG_DUMP_CHILDREN: dump children of a specified task
+
|-
** TASK_DIAG_DUMP_THREAD: dump threads of a specified task
+
|| TASK_DIAG_DUMP_ALL_THREAD || dump all threads
** TASK_DIAG_DUMP_ONE: Dump one task
+
|-
 +
|| TASK_DIAG_DUMP_CHILDREN || dump children of a specified task
 +
|-
 +
|| TASK_DIAG_DUMP_THREAD || dump threads of a specified task
 +
|-
 +
|| TASK_DIAG_DUMP_ONE || Dump one task
 +
|}
    
* Optimal grouping of attributes  
 
* Optimal grouping of attributes  
Line 69: Line 75:     
The following groups are proposed:  
 
The following groups are proposed:  
* TASK_DIAG_BASE
+
 
: PID, PGID, SID, TID, comm
+
{| class="wikitable"
* TASK_DIAG_CRED
+
|| TASK_DIAG_BASE || PID, PPID, PGID, SID, TID, state, comm
: UID, GID, groups, capabilities
+
|-
* TASK_DIAG_STAT
+
|| TASK_DIAG_CRED || UID, GID, groups, capabilities
: per-task and per-process statistics (same as taskstats, not avail in /proc)
+
|-
* TASK_DIAG_VMA
+
|| TASK_DIAG_STAT || per-task and per-process statistics (same as taskstats, not avail in /proc)
: mapped memory regions and their access permissions (same as maps)
+
|-
* TASK_DIAG_VMA_STAT
+
|| TASK_DIAG_VMA || mapped memory regions and their access permissions (same as maps)
: memory consumption for each mapping (same as smaps)
+
|-
 +
|| TASK_DIAG_VMA_STAT || memory consumption for each mapping (same as smaps)
 +
|-
 +
|}
    
=== Performance measurements ===
 
=== Performance measurements ===
   −
==== Get pid, tid, pgid and comm for 50000 processes ====
+
==== ps (emulation) ====
 +
 
 +
Get pid, tid, pgid and comm for 50000 processes. The code used is available [https://github.com/avagin/linux-task-diag/tree/task-diag-proc/tools/testing/selftests/task_diag from here].
    
Existing interface:
 
Existing interface: