--- memoryo.c Thu Feb 13 17:35:20 2003 +++ memory.c Wed Oct 8 08:53:30 2003 @@ -49,6 +49,7 @@ #include #include #include +#include unsigned long max_mapnr; unsigned long num_physpages; @@ -1504,3 +1505,28 @@ } return page; } + +int show_swap_usage(void) +{ + struct task_struct *p = NULL; + + for_each_task(p) + { + if(p != NULL) + { + if(p->pid != 1) + { + if(p->mm != NULL) + { + if(p->nswap > 0) + { + printk(KERN_CRIT"Process name: %s pid %d\n",p->comm,p->pid); + printk(KERN_CRIT"Nswap: %lu Totalvm %lu Cswap %lu\n",p->nswap,p->mm->total_vm,p->cnswap); + return 0; + } + } + } + } + } + return 0; +}