si_meminfo(&info);
total_ram = PAGE_TO_KB(info.totalram);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
seq_put_decimal_ull(m, "", uptime);
seq_put_decimal_ull(m, " ", total_ram);
+#else
+ seq_put_decimal_ull(m, 0, uptime);
+ seq_put_decimal_ull(m, ' ', total_ram);
+#endif
seq_printf(m, "\n");
for_each_process(task) {
task_unlock(task);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
seq_put_decimal_ll(m, "", task->pid);
seq_put_decimal_ll(m, " ", ppid);
seq_put_decimal_ull(m, " ", cputime_to_usecs(utime + stime));
#else
seq_put_decimal_ull(m, " ", 0);
#endif
+#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) */
+ seq_put_decimal_ll(m, 0, task->pid);
+ seq_put_decimal_ll(m, ' ', ppid);
+ seq_put_decimal_ull(m, ' ', cputime_to_usecs(utime + stime));
+ seq_put_decimal_ull(m, ' ', PAGE_TO_KB(vm_rss));
+ seq_put_decimal_ll(m, ' ', open_fds);
+#ifdef CONFIG_TASK_IO_ACCOUNTING
+ seq_put_decimal_ull(m, ' ', task_ioac.read_bytes + task_ioac.write_bytes);
+#else
+ seq_put_decimal_ull(m, ' ', 0);
+#endif
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) */
seq_printf(m, "\n");
}