How to count the cpu usage of a process
Sometimes we want to collect the cpu usage of the process, and usually use a script to make simple statistics. Under Linux, the cpu time slice of the process can be obtained through the stat provided