Originally Posted by anhtu234
can u show me how to solve the problem...i'm a beginner for Linux
You can solve the problem of monitoring your system by using one of the many existing monitors.
I'm not sure why you think a beginner to Linux would be able to do a good job of writing your own monitor, but you may be able to get some hints by looking at existing monitors.
The undeclared problem of what to hand in as your homework is not necessarily solved by this approach, though.