Bug ID: There is a Server (Solaris 5.8), using TOP test, found that the IDEL's CPU is 0% each time, but the percentage of CPU time used by each process is high!
What is going on? Best, and later, using VMSTAT 2 (general, the first line output is useless, wrong), found that US percentage is 30%, and the percentage of SY is 60%, which means that CPU time It is depleted in system space. (We also have two movies that eat CPU very powerful, but we are all normal; the percentage of US US is 60%, while the percentage of SY is 30%).
Use the command prstat -cvm to see, discover the reason for this: Almost every time the system is running such a command such a LS Date FTP, then
These commands take up almost 60% of CPU time in system space. These programs are called by additional programs, and they are flashing, so the PID of these commands is almost every moment, so Catch does not reach them, and they are all running in system space.
Things are the same, some people wrote a shell (user request), monitor if there is a file in a directory, and the existence will ftp to another Server. This shell is a loop of statement, every moment is in an observation, so on LS, Date, FTP. CPU causing system space is high! !
Stop the shell program, the CPU's IDEL turns 99%; and one open this program? The CPU usage is 100% again.
How to solve this problem? I have never thought about it for a long time.
Our Leader tells me that adding Sleep 2 or Sleep 3 in a circular statement. Sure enough, the CPU's IDEL turned 90%, huh, huh, never know that the power of Sleep 2 is so big! ! ! Ginger is still the old spicy, our Leader is really powerful!
(This process cannot be reproduced in Solaris 2.6 because the pRSTAT command does not support pulling)
Wen, in order to come!