All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 2.4: export scheduling information from /proc
@ 2002-10-06 19:45 Robert Love
  0 siblings, 0 replies; only message in thread
From: Robert Love @ 2002-10-06 19:45 UTC (permalink / raw)
  To: marcelo; +Cc: linux-kernel

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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-06 19:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-06 19:45 [PATCH] 2.4: export scheduling information from /proc Robert Love

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.