aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/stat.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/stat.c')
-rw-r--r--fs/proc/stat.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/proc/stat.c b/fs/proc/stat.c
index 510413eb25b8..7907e456ac4f 100644
--- a/fs/proc/stat.c
+++ b/fs/proc/stat.c
@@ -80,19 +80,17 @@ static u64 get_iowait_time(int cpu)
80static int show_stat(struct seq_file *p, void *v) 80static int show_stat(struct seq_file *p, void *v)
81{ 81{
82 int i, j; 82 int i, j;
83 unsigned long jif;
84 u64 user, nice, system, idle, iowait, irq, softirq, steal; 83 u64 user, nice, system, idle, iowait, irq, softirq, steal;
85 u64 guest, guest_nice; 84 u64 guest, guest_nice;
86 u64 sum = 0; 85 u64 sum = 0;
87 u64 sum_softirq = 0; 86 u64 sum_softirq = 0;
88 unsigned int per_softirq_sums[NR_SOFTIRQS] = {0}; 87 unsigned int per_softirq_sums[NR_SOFTIRQS] = {0};
89 struct timespec boottime; 88 struct timespec64 boottime;
90 89
91 user = nice = system = idle = iowait = 90 user = nice = system = idle = iowait =
92 irq = softirq = steal = 0; 91 irq = softirq = steal = 0;
93 guest = guest_nice = 0; 92 guest = guest_nice = 0;
94 getboottime(&boottime); 93 getboottime64(&boottime);
95 jif = boottime.tv_sec;
96 94
97 for_each_possible_cpu(i) { 95 for_each_possible_cpu(i) {
98 user += kcpustat_cpu(i).cpustat[CPUTIME_USER]; 96 user += kcpustat_cpu(i).cpustat[CPUTIME_USER];
@@ -163,12 +161,12 @@ static int show_stat(struct seq_file *p, void *v)
163 161
164 seq_printf(p, 162 seq_printf(p,
165 "\nctxt %llu\n" 163 "\nctxt %llu\n"
166 "btime %lu\n" 164 "btime %llu\n"
167 "processes %lu\n" 165 "processes %lu\n"
168 "procs_running %lu\n" 166 "procs_running %lu\n"
169 "procs_blocked %lu\n", 167 "procs_blocked %lu\n",
170 nr_context_switches(), 168 nr_context_switches(),
171 (unsigned long)jif, 169 (unsigned long long)boottime.tv_sec,
172 total_forks, 170 total_forks,
173 nr_running(), 171 nr_running(),
174 nr_iowait()); 172 nr_iowait());