summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2012-05-16 14:27:13 -0700
committerRyan Wong <ryanw@nvidia.com>2012-06-11 22:02:02 -0700
commit6ba21f5c089ab79e10a82f653ff66f965d744d17 (patch)
treea27c26130d4c0cb3faec3007a1905a54dcf5a202
parent6e60215d760c5e9da94173909b703326cae6b793 (diff)
proc: Add time-average nr_running to loadavg printout
Change-Id: I39a97308050fd36bbcf4e9b909e3087172438f8b Signed-off-by: Alex Frid <afrid@nvidia.com> Reviewed-on: http://git-master/r/108071 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Ryan Wong <ryanw@nvidia.com> Tested-by: Ryan Wong <ryanw@nvidia.com>
-rw-r--r--fs/proc/loadavg.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/proc/loadavg.c b/fs/proc/loadavg.c
index 1afa4dd4cae2..8d95888b22cd 100644
--- a/fs/proc/loadavg.c
+++ b/fs/proc/loadavg.c
@@ -13,15 +13,17 @@
static int loadavg_proc_show(struct seq_file *m, void *v)
{
unsigned long avnrun[3];
+ unsigned long time_avnrun = avg_nr_running();
get_avenrun(avnrun, FIXED_1/200, 0);
- seq_printf(m, "%lu.%02lu %lu.%02lu %lu.%02lu %ld/%d %d\n",
+ seq_printf(m, "%lu.%02lu %lu.%02lu %lu.%02lu %ld/%d %d %lu.%02lu\n",
LOAD_INT(avnrun[0]), LOAD_FRAC(avnrun[0]),
LOAD_INT(avnrun[1]), LOAD_FRAC(avnrun[1]),
LOAD_INT(avnrun[2]), LOAD_FRAC(avnrun[2]),
nr_running(), nr_threads,
- task_active_pid_ns(current)->last_pid);
+ task_active_pid_ns(current)->last_pid,
+ LOAD_INT(time_avnrun), LOAD_FRAC(time_avnrun));
return 0;
}