View Single Post
Posts: 197 | Thanked: 101 times | Joined on Dec 2009 @ Netherlands
#30
I loggedd into the n900 via the network and left the n900 screen locked.
The in the ssh sessiin I run top. When the systems is idel and running ok (e.g. no battery drain) this is the sort of process list you might expect.
A few kernel processes doing some work every now and then and the top and ssh processes.

Note that all the hildon- xxx processes use 0.0% CPU.

Code:
Mem: 230684K used, 14664K free, 0K shrd, 9408K buff, 67884K cached
CPU:  0.3% usr  3.2% sys  0.0% nice 95.9% idle  0.0% io  0.0% irq  0.3% softirq
Load average: 0.00 0.00 0.00
  PID  PPID USER     STAT   RSS %MEM %CPU COMMAND
   27     2 root     RW       0  0.0  1.1 [kondemand/0]
 2327  2318 user     R      740  0.3  0.9 top 
   10     2 root     SW       0  0.0  0.9 [omap2_mcspi]
 2317  2315 user     S     1356  0.5  0.7 sshd: user@pts/0   
  469     2 root     SW       0  0.0  0.1 [wl12xx]
 1778  1275 user     S    18124  7.3  0.0 /opt/BatteryGraph/bin/BatteryGraph 
 1272  1174 user     S    17892  7.2  0.0 /usr/bin/hildon-home                                                       
 1008   682 root     S <  14888  6.0  0.0 /usr/bin/Xorg -logfile /tmp/Xorg.0.log -logverbose 1 -nolisten tcp -noreset -s 0 -core 
 1681  1315 user     S    12524  5.0  0.0 /usr/sbin/browserd -s 1681 -n RTComMessagingServer 
 1672  1174 user     S    11496  4.6  0.0 /usr/bin/rtcom-call-ui                                                     
 1275  1174 user     S    10704  4.3  0.0 /usr/bin/hildon-desktop                                                    
 1705  1174 user     S    10400  4.2  0.0 /usr/bin/image-viewer                                                      
 1266  1174 user     S    10376  4.2  0.0 /usr/bin/hildon-status-menu                                                
  682     1 root     S <   9552  3.8  0.0 /sbin/dsme -p /usr/lib/dsme/libstartup.so 
 1714  1174 user     S     8924  3.6  0.0 /usr/bin/modest                                                            
                                                        
 1699  1315 user     S     8748  3.5  0.0 /usr/sbin/browserd -s 1699 -n browserui 
 1677  1174 user     S     7540  3.0  0.0 /usr/bin/rtcom-messaging-ui                                                
 1668  1174 user     S     7328  2.9  0.0 /usr/bin/osso-addressbook
Now when hildon-desktop starts behaving badly you might see something like below. Hildon-desktop will be up in the top list constantly using cpu. At this time you will experience battery drain.

Code:
Mem: 230684K used, 14664K free, 0K shrd, 9408K buff, 67884K cached
CPU:  4.3% usr  3.2% sys  0.0% nice 91.9% idle  0.0% io  0.0% irq  0.3% softirq
Load average: 0.00 0.00 0.00
  PID  PPID USER     STAT   RSS %MEM %CPU COMMAND
 1275  1174 user     S    10704  4.3  3.9 /usr/bin/hildon-desktop 
   27     2 root     RW       0  0.0  1.1 [kondemand/0]
 2327  2318 user     R      740  0.3  0.9 top 
   10     2 root     SW       0  0.0  0.9 [omap2_mcspi]
 2317  2315 user     S     1356  0.5  0.7 sshd: user@pts/0   
  469     2 root     SW       0  0.0  0.1 [wl12xx]
 1778  1275 user     S    18124  7.3  0.0 /opt/BatteryGraph/bin/BatteryGraph 
 1272  1174 user     S    17892  7.2  0.0 /usr/bin/hildon-home                                                       
 1008   682 root     S <  14888  6.0  0.0 /usr/bin/Xorg -logfile /tmp/Xorg.0.log -logverbose 1 -nolisten tcp -noreset -s 0 -core 
 1681  1315 user     S    12524  5.0  0.0 /usr/sbin/browserd -s 1681 -n RTComMessagingServer 
 1672  1174 user     S    11496  4.6  0.0 /usr/bin/rtcom-call-ui                                                     
 1705  1174 user     S    10400  4.2  0.0 /usr/bin/image-viewer                                                      
 1266  1174 user     S    10376  4.2  0.0 /usr/bin/hildon-status-menu                                                
  682     1 root     S <   9552  3.8  0.0 /sbin/dsme -p /usr/lib/dsme/libstartup.so 
 1714  1174 user     S     8924  3.6  0.0 /usr/bin/modest
From the same remote login session I can trace hildon-desktop to see what it is doing.
Install the strace package: apt-get install strace

From above top output I get the process id from the hildon-desktop process. In this case process id 1275 and use that to run strace (you need to be root):

strace -t -tt -p 1275

In the first case you get hardly any output. But when you unlock the n900 screen and play around you will get output (note that your device may be a little bit less responsive). When you lock the screen again strcae output will stop (after a short while)

In the second case you will constantly get strace output like:

1276114986.251678 poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=19, events=POLLIN}, {fd=13, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}], 11, 0) = 0 (Timeout)