1.编写一守护进程,每隔30秒,将系统当前进程总数、休眠进程数、运行进程数、僵死进程数、终止进程数等信息按照如下格式写入到procinfo.log文件中。
格式可类似为:
2013-11-10 20:50:2029 processes: 28 sleeping, 1 running, 0 zombie, 0 stopped
2013-11-10 20:50:50
29 processes: 28 sleeping, 1 running, 0 zombie, 0 stopped
/*
Exp 9_1 :Create finger daemonfinger
Main.c
<span style="white-space:pre"> </span>Written By Namer_Mega .Thanks For Sharing Your Knowledge
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <sys/param.h>
#include <sys/types