mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robert Love <rml@tech9.net>
To: marcelo@conectiva.com.br
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] 2.4: export scheduling information from /proc
Date: 06 Oct 2002 15:45:17 -0400	[thread overview]
Message-ID: <1033933518.742.4470.camel@phantasy> (raw)

Menacing Marcelo,

Attached patch exports scheduling policy and real-time priority from
/proc/<pid>/stats.

This code is in 2.4-ac and 2.5.

This does _not_ break previous versions of procps -- there is no harm
and it is fully backward compatible.  New versions, starting with 2.0.8,
can parse this information.

Patch is against 2.4.20-pre9.  Please, apply.

	Robert Love

diff -urN linux-2.4.20-pre9/fs/proc/array.c linux/fs/proc/array.c
--- linux-2.4.20-pre9/fs/proc/array.c	2002-10-06 14:57:17.000000000 -0400
+++ linux/fs/proc/array.c	2002-10-06 15:02:53.000000000 -0400
@@ -347,7 +347,7 @@
 	read_unlock(&tasklist_lock);
 	res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \
 %lu %lu %lu %lu %lu %ld %ld %ld %ld %ld %ld %lu %lu %ld %lu %lu %lu %lu %lu \
-%lu %lu %lu %lu %lu %lu %lu %lu %d %d\n",
+%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n",
 		task->pid,
 		task->comm,
 		state,
@@ -390,7 +390,9 @@
 		task->nswap,
 		task->cnswap,
 		task->exit_signal,
-		task->processor);
+		task->processor,
+		task->rt_priority,
+		task->policy);
 	if(mm)
 		mmput(mm);
 	return res;


                 reply	other threads:[~2002-10-06 19:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1033933518.742.4470.camel@phantasy \
    --to=rml@tech9.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®