On Tue, 2009-02-03 at 15:41 -0700, Alejandro Weinstein wrote: > Estoy un poco confundido con el significado de %CPU reportado por top. > La siguiente es la definicion del manual: > k: %CPU -- CPU usage > The task's share of the elapsed CPU time since the last screen > update, expressed as a percentage of total CPU time. In a true SMP > environment, if 'Irix mode' is Off, top will operate in 'Solaris > mode' where a task's cpu usage will be divided by the total number > of CPUs. You toggle 'Irix/Solaris' modes with the 'I' interactive > command.
En castellano: El % de CPU indica el porcentaje de uso de un proceso _por CPU_. Si tienes un programa multi-thread ocupando el 100% de 3 CPU's, entonces su % de CPU es 300%. Si te cambias al modo Slowlaris, se divide por la cantidad de CPU asi obtienes el porcentaje de CPU relativo al sistema global. Si tienes 4 cpu's y el proceso consume el 100% de 3 CPU's, entonces veras 75%. > Y esta es una captura de top > Tasks: 128 total, 2 running, 126 sleeping, 0 stopped, 0 zombie > Cpu(s): 13.5%us, 1.8%sy, 0.0%ni, 84.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st > Mem: 2062952k total, 934044k used, 1128908k free, 29032k buffers > Swap: 2008084k total, 0k used, 2008084k free, 335764k cached Presiona 1 y arriba te dara el detalle de cada CPU... > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > 10030 ajw 20 0 67632 23m 7360 S 22 1.2 0:09.54 python Tu programa es multithread y ocupa ~ el 13% del sistema global... Presiona I y veras lo que quieres. -- Aldrin Martoq <amar...@dcc.uchile.cl> http://aldrin.martoq.cl/videopodcast/ http://aldrin.martoq.cl/techblog/
signature.asc
Description: This is a digitally signed message part