All of lore.kernel.org
 help / color / mirror / Atom feed
* /proc/{diskstats,schedstat,vmstat} documentation
@ 2015-05-13  9:50 Marko Myllynen
       [not found] ` <55531E5F.2090803-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Marko Myllynen @ 2015-05-13  9:50 UTC (permalink / raw)
  To: Michael Kerrisk (man-pages); +Cc: linux-man

Hi Michael,

it seems that /proc/vmstat is undocumented in proc(5), is it just
because nobody has written the documentation yet or are some files
considered out of scope for proc(5)? Other such "interesting" file which
would be nice to have documented in-line is IMHO /proc/diskstats.

FWIW, for /proc/vmstat first search hit is
http://www.linuxinsight.com/proc_vmstat.html which looks decent.

I also see that /proc/schedstat and /proc/<pid>/schedstat are missing,
some information about them can be found at
http://eaglet.rain.com/rick/linux/schedstat/v15/format-15.html and
https://www.kernel.org/doc/Documentation/scheduler/sched-stats.txt.

Lastly, /proc/<pid>/{loginuid,sessionid} are missing.

PS. Yes, I think I try to provide patches at least for a couple of these
cases if time permits.

Thanks,

-- 
Marko Myllynen
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: /proc/{diskstats,schedstat,vmstat} documentation
       [not found] ` <55531E5F.2090803-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2015-05-13 13:03   ` Michael Kerrisk (man-pages)
       [not found]     ` <55534B8B.8010400-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Kerrisk (man-pages) @ 2015-05-13 13:03 UTC (permalink / raw)
  To: myllynen-H+wXaHxf7aLQT0dZR+AlfA
  Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w, linux-man

Hi Marko,

On 05/13/2015 11:50 AM, Marko Myllynen wrote:
> Hi Michael,
> 
> it seems that /proc/vmstat is undocumented in proc(5), is it just
> because nobody has written the documentation yet or are some files
> considered out of scope for proc(5)? Other such "interesting" file which
> would be nice to have documented in-line is IMHO /proc/diskstats.

It's just because no one has taken the time... There are in fact many holes
in proc(5) :-(.

> FWIW, for /proc/vmstat first search hit is
> http://www.linuxinsight.com/proc_vmstat.html which looks decent.

Well, it has some of the needed info, but there's many more entries in
the file than are listed there.

> I also see that /proc/schedstat and /proc/<pid>/schedstat are missing,
> some information about them can be found at
> http://eaglet.rain.com/rick/linux/schedstat/v15/format-15.html and
> https://www.kernel.org/doc/Documentation/scheduler/sched-stats.txt.
> 
> Lastly, /proc/<pid>/{loginuid,sessionid} are missing.
> 
> PS. Yes, I think I try to provide patches at least for a couple of these
> cases if time permits.

That would be great.

Thanks,

Michael



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: /proc/{diskstats,schedstat,vmstat} documentation
       [not found]     ` <55534B8B.8010400-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2015-05-13 15:08       ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Kerrisk (man-pages) @ 2015-05-13 15:08 UTC (permalink / raw)
  To: Marko Myllynen; +Cc: Michael Kerrisk, linux-man

Hi Marko,

On 13 May 2015 at 15:03, Michael Kerrisk (man-pages)
<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi Marko,
>
> On 05/13/2015 11:50 AM, Marko Myllynen wrote:
>> Hi Michael,
>>
>> it seems that /proc/vmstat is undocumented in proc(5), is it just
>> because nobody has written the documentation yet or are some files
>> considered out of scope for proc(5)? Other such "interesting" file which
>> would be nice to have documented in-line is IMHO /proc/diskstats.
>
> It's just because no one has taken the time... There are in fact many holes
> in proc(5) :-(.
>
>> FWIW, for /proc/vmstat first search hit is
>> http://www.linuxinsight.com/proc_vmstat.html which looks decent.
>
> Well, it has some of the needed info, but there's many more entries in
> the file than are listed there.
>
>> I also see that /proc/schedstat and /proc/<pid>/schedstat are missing,
>> some information about them can be found at
>> http://eaglet.rain.com/rick/linux/schedstat/v15/format-15.html and
>> https://www.kernel.org/doc/Documentation/scheduler/sched-stats.txt.
>>
>> Lastly, /proc/<pid>/{loginuid,sessionid} are missing.
>>
>> PS. Yes, I think I try to provide patches at least for a couple of these
>> cases if time permits.
>
> That would be great.

So, in case you decide to pursue this, here's a little script I
whipped up that tells you about version changes in /proc/vmstat since
Linux 2.6.12 (git start).

Clone yourself a fresh git tree; chdir into the tree, and run the script.

Knowing the kernel version umber then let's you find the corresponding
commit more easily, and there for each file you might find some info
in the commit message explaining what the file is about.

Cheers,

Michael

#! /bin/sh
# Generate a history /proc/vmstat changes
#
# 1. Clone a fresh "linux" git repo
# 2. chdir to the root directory
# 3. Run this script
#
lfunc() {
FILE=$(git grep -l vmstat_text $1)
cat $FILE | sed '1,/^[cs].*vmstat_text/d' | sed '/^}/,$d' |
        sed 's%\/\*.*\*\/%%' | sed '/^[         ]*$/d' | sed 's/[",]//g' |
        awk '
                {
                    if ($1 == "#ifdef") {
                        lname[lev] = $2
                        lev++;
                    } else if ($1 == "#endif") {
                        lev--;
                    } else {
                        printf "%s", $0
                        for (l = 0; l < lev; l++)
                            printf "\t%s", lname[l]
                        print ""
                    }

                }
        ' | sed 's/^[   ]*//'

}

VERSIONS=$(git tag -l|grep -v -- '-'|grep '^v'| grep -v 'v2.6.11')

for v in $VERSIONS; do
     echo "======== $v"
     git checkout -fq $v
     lfunc mm > vmstat-$v;
done

c=0
for v in $VERSIONS; do
        if test $c -gt 0; then
                echo "================ $v"
                diff -u vmstat-$prev vmstat-$v
        fi
        c=$(expr $c + 1)
        prev=$v;
done | less
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2015-05-13 15:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-13  9:50 /proc/{diskstats,schedstat,vmstat} documentation Marko Myllynen
     [not found] ` <55531E5F.2090803-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-05-13 13:03   ` Michael Kerrisk (man-pages)
     [not found]     ` <55534B8B.8010400-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-13 15:08       ` Michael Kerrisk (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.