linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/5] Introduce /proc/all/ to gather stats from all processes
@ 2020-08-10 14:58 Eugene Lubarsky
  2020-08-10 14:58 ` [RFC PATCH 1/5] fs/proc: Introduce /proc/all/stat Eugene Lubarsky
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Eugene Lubarsky @ 2020-08-10 14:58 UTC (permalink / raw)
  To: linux-api, linux-fsdevel; +Cc: linux-kernel, adobriyan, avagin, dsahern

This is an idea for substantially reducing the number of syscalls needed
by monitoring tools whilst mostly re-using the existing API.

The proposed files in this proof-of-concept patch set are:

* /proc/all/stat
      A stat line for each process in the existing format.

* /proc/all/statm
      statm lines but starting with a PID column.

* /proc/all/status
      status info for all processes in the existing format.

* /proc/all/io
      The existing /proc/pid/io data but formatted as a single line for
      each process, similarly to stat/statm, with a PID column added.

* /proc/all/statx
      Gathers info from stat, statm and io; the purpose is actually
      not so much to reduce syscalls but to help userspace be more
      efficient by not having to store data in e.g. hashtables in order
      to gather it from separate /proc/all/ files.

      The format proposed here starts with the unchanged stat line
      and begins the other info with a few characters, repeating for
      each process:

      ...
      25 (cat) R 1 1 0 0 -1 4194304 185 0 16 0 2 0 0 0 20 ...
      m 662 188 167 5 0 112 0
      io 4292 0 12 0 0 0 0
      ...


There has been a proposal with some overlapping goals: /proc/task-diag
(https://github.com/avagin/linux-task-diag), but I'm not sure about
its current status.



Best Wishes,

Eugene


Eugene Lubarsky (5):
  fs/proc: Introduce /proc/all/stat
  fs/proc: Introduce /proc/all/statm
  fs/proc: Introduce /proc/all/status
  fs/proc: Introduce /proc/all/io
  fs/proc: Introduce /proc/all/statx

 fs/proc/base.c     | 215 +++++++++++++++++++++++++++++++++++++++++++--
 fs/proc/internal.h |   1 +
 fs/proc/root.c     |   1 +
 3 files changed, 210 insertions(+), 7 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-08-25 10:00 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-10 14:58 [RFC PATCH 0/5] Introduce /proc/all/ to gather stats from all processes Eugene Lubarsky
2020-08-10 14:58 ` [RFC PATCH 1/5] fs/proc: Introduce /proc/all/stat Eugene Lubarsky
2020-08-10 14:58 ` [RFC PATCH 2/5] fs/proc: Introduce /proc/all/statm Eugene Lubarsky
2020-08-10 14:58 ` [RFC PATCH 3/5] fs/proc: Introduce /proc/all/status Eugene Lubarsky
2020-08-10 14:58 ` [RFC PATCH 4/5] fs/proc: Introduce /proc/all/io Eugene Lubarsky
2020-08-10 14:58 ` [RFC PATCH 5/5] fs/proc: Introduce /proc/all/statx Eugene Lubarsky
2020-08-10 15:04 ` [RFC PATCH 0/5] Introduce /proc/all/ to gather stats from all processes Greg KH
2020-08-10 15:27   ` Eugene Lubarsky
2020-08-10 15:41     ` Greg KH
2020-08-25  9:59       ` Eugene Lubarsky
2020-08-12  7:51 ` Andrei Vagin
2020-08-13  4:47   ` David Ahern
2020-08-13  8:03     ` Andrei Vagin
2020-08-13 15:01   ` Eugene Lubarsky
2020-08-20 17:41     ` Andrei Vagin
2020-08-25 10:00       ` Eugene Lubarsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).