[mythtv-users] How do I measure the processor load?

John Johnson johnatl at mac.com
Sun Jul 16 20:45:31 UTC 2006


Wim Fokkens wrote:
> I am running Knoppmyth R5C7 and I would like to know the processor load
> under various tasks. How do I measure this.
>   

You can use the uptime command:

dell ~ 16:37 john $ uptime
 16:37:22 up 15 days,  4:53,  5 users,  load average: 1.22, 1.15, 1.10
dell ~ 16:37 john $

The numbers (1.22, 1.15, 1.10) are the loads for the last 1, 5, and 15 
minutes.

If you want a dynamic display, try top:

dell ~ 16:39 john $ top

(screen clears)

top - 16:39:15 up 15 days,  4:55,  5 users,  load average: 1.12, 1.14, 1.09
Tasks: 171 total,   5 running, 165 sleeping,   0 stopped,   1 zombie
Cpu(s):  4.9% us,  1.6% sy,  7.8% ni, 84.1% id,  1.5% wa,  0.1% hi,  0.1% si
Mem:   1034556k total,   964624k used,    69932k free,   282596k buffers
Swap:  1052248k total,    85468k used,   966780k free,   224204k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  
COMMAND                                      10663 john      15   0  
1952  912  668 R  3.9  0.1   0:00.02 
top                                           1843 root       5 -10     
0    0    0 S  1.9  0.0  10:55.84 
ivtv-enc                                      6265 root      15   0 
83692  54m 5228 S  1.9  5.4 197:47.64 
X                                            28197 mysql     16   0 
43952  28m 1880 S  1.9  2.9   4:57.44 
mysqld                                           1 root      16   0  
1708  560  484 S  0.0  0.1   0:06.73 
init                                        


Sorry, the list just looks like a bunch of crap in the email, but in 
real-life, it updates every second, and you can see who's hogging the 
CPU in the %CPU column, and memory in the %MEM column.
If you're using a Mac (or, I suppose, BSD), you have to tell it sort by 
the CPU usage, like this:
top -o cpu

If you look in the MythFrontend in Information Center | System Status | 
Machine Status, you'll see the load averages for the frontend machine, 
as well as the backend.


Regards,
  JJ



More information about the mythtv-users mailing list