Commit 79569bfe authored by Robert Love's avatar Robert Love Committed by Linus Torvalds

[PATCH] real-time info in /proc/<pid>/stats

Attached patch adds output of rt_priority and policy to
/proc/<pid>/stats.

This will not break compatibility with existing applications and will
allow ps(1) and friends to display pertinent scheduling information.
parent 3e7e1382
......@@ -346,7 +346,7 @@ int proc_pid_stat(struct task_struct *task, char * buffer)
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,
......@@ -389,7 +389,9 @@ int proc_pid_stat(struct task_struct *task, char * buffer)
task->nswap,
task->cnswap,
task->exit_signal,
task->thread_info->cpu);
task->thread_info->cpu,
task->rt_priority,
task->policy);
if(mm)
mmput(mm);
return res;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment