PDA

View Full Version : How to get total cpu usage of a thread on linux(fedora)?



Manu123
26th October 2007, 05:29 PM
I have been using "top" to get the cpu usage of each process & I need the cpu usage information at thread level, since one of the thread goes wild & needs a fix.
Please help!!!

SlowJet
26th October 2007, 06:15 PM
start top and then press
Cap H

Tasks: 216 total, 1 running, 215 sleeping, 0 stopped, 0 zombie
Cpu(s): 9.4%us, 1.3%sy, 0.0%ni, 89.2%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1017868k total, 991136k used, 26732k free, 133468k buffers
Swap: 8388592k total, 0k used, 8388592k free, 478388k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5257 darwinhw 20 0 183m 63m 21m S 0 6.4 2:24.59 firefox-bin
5258 darwinhw 20 0 183m 63m 21m S 0 6.4 0:01.38 firefox-bin
5259 darwinhw 20 0 183m 63m 21m S 0 6.4 0:02.46 firefox-bin
5261 darwinhw 20 0 183m 63m 21m S 0 6.4 0:00.21 firefox-bin
5264 darwinhw 20 0 183m 63m 21m S 0 6.4 0:00.00 firefox-bin
5265 darwinhw 20 0 183m 63m 21m S 0 6.4 0:00.00 firefox-bin
5267 darwinhw 20 0 183m 63m 21m S 0 6.4 0:00.10 firefox-bin
2630 darwinhw 20 0 102m 43m 12m S 18 4.3 3:28.25 nautilus
2618 darwinhw 20 0 65924 27m 8628 S 0 2.8 0:02.35 gnome-settings-
2620 darwinhw 20 0 65924 27m 8628 S 0 2.8 0:00.00 gnome-settings-
2727 darwinhw 20 0 64640 27m 15m S 0 2.7 0:01.49 tomboy
2733 darwinhw 20 0 64640 27m 15m S 0 2.7 0:00.29 mono
2734 darwinhw 20 0 64640 27m 15m S 0 2.7 0:00.01 mono
2692 darwinhw 20 0 54400 25m 14m S 0 2.6 0:01.41 /usr/bin/sealer
6037 darwinhw 20 0 84624 19m 11m S 1 2.0 0:01.66 gnome-terminal
6042 darwinhw 20 0 84624 19m 11m S 0 2.0 0:00.00 gnome-terminal
2628 darwinhw 20 0 40816 15m 11m S 0 1.5 0:07.92 gnome-panel
2456 root 20 0 220m 13m 7644 S 1 1.3 2:39.94 X
2744 darwinhw 20 0 60588 12m 9.9m S 0 1.3 0:00.23 mixer_applet2
2748 darwinhw 20 0 60588 12m 9.9m S 0 1.3 0:00.00 mixer_applet2
2679 darwinhw 20 0 38620 12m 9376 S 0 1.2 0:02.53 wnck-applet
2668 darwinhw 20 0 27836 12m 7424 S 0 1.2 0:00.37 python
2067 root 20 0 42928 11m 4976 S 0 1.2 0:20.81 setroubleshootd
2269 root 20 0 42928 11m 4976 S 0 1.2 0:00.04 setroubleshootd
2270 root 20 0 42928 11m 4976 S 0 1.2 0:00.02 setroubleshootd
2725 darwinhw 20 0 32300 11m 9072 S 0 1.1 0:01.07 clock-applet
2696 darwinhw 20 0 37388 10m 8344 S 0 1.0 0:39.79 gnome-netstatus
5930 darwinhw 20 0 29064 9900 6808 S 0 1.0 0:00.30 notification-da
2627 darwinhw 20 0 20896 9856 7608 S 0 1.0 0:04.59 metacity
2681 darwinhw 20 0 68088 9552 7900 S 0 0.9 0:00.22 trashapplet
1896 root 20 0 11008 9496 244 S 0 0.9 0:00.00 restorecond
2677 darwinhw 20 0 26244 9044 7716 S 0 0.9 0:00.18 nm-applet
2723 darwinhw 20 0 26128 8624 7388 S 0 0.8 0:00.14 notification-ar
2683 darwinhw 20 0 28604 7696 5856 S 0 0.8 0:02.34 gnome-power-man
2511 darwinhw 20 0 33584 7372 6220 S 0 0.7 0:00.20 gnome-session
2623 darwinhw 20 0 33584 7372 6220 S 0 0.7 0:00.00 gnome-session
2648 darwinhw 20 0 17884 5992 5164 S 0 0.6 0:00.08 bluetooth-apple
2634 darwinhw 20 0 25856 4832 3684 S 0 0.5 0:00.03 gnome-volume-ma
2622 darwinhw 20 0 32504 4712 3108 S 0 0.5 0:21.11 exe
2624 darwinhw 20 0 32504 4712 3108 S 0 0.5 0:00.02 exe
2625 darwinhw 20 0 32504 4712 3108 S 0 0.5 0:00.00 exe
2682 darwinhw 20 0 16616 4244 3668 S 0 0.4 0:00.04 pam-panel-icon
2614 darwinhw 20 0 7760 3940 1720 S 0 0.4 0:01.77 gconfd-2
2384 root 20 0 16668 3836 3140 S 0 0.4 0:00.06 gdm-binary
2454 root 20 0 16896 3492 2692 S 0 0.3 0:00.05 gdm-binary
2651 darwinhw 20 0 11376 3448 2912 S 0 0.3 0:00.05 gnome-vfs-daemo
2280 haldaemo 20 0 5740 3308 2568 S 0 0.3 0:01.16 hald
2638 darwinhw 20 0 39744 2700 1984 S 0 0.3 0:00.17 bonobo-activati
2641 darwinhw 20 0 39744 2700 1984 S 0 0.3 0:00.00 bonobo-activati
2717 darwinhw 20 0 16756 2584 1800 S 1 0.3 0:09.56 gnome-screensav
2271 root 20 0 9812 2544 1876 S 0 0.2 0:00.01 cupsd
2156 root 20 0 7784 2240 1536 S 0 0.2 0:00.04 console-kit-dae
2160 root 20 0 7784 2240 1536 S 0 0.2 0:00.00 console-kit-dae
2161 root 20 0 7784 2240 1536 S 0 0.2 0:00.00 console-kit-dae
2162 root 20 0 7784 2240 1536 S 0 0.2 0:00.00 console-kit-dae
2163 root 20 0 7784 2240 1536 S 0 0.2 0:00.00 console-kit-dae
2164 root 20 0 7784 2240 1536 S 0 0.2 0:00.00 console-kit-dae
2166 root 20 0 7784 2240 1536 S 0 0.2 0:00.00 console-kit-dae

Manu123
26th October 2007, 11:21 PM
It was great & work on one of my boxes but now am stuck with another block.
One of my box support Cap H option but the other one don't.
Funny thing is this cap H option is the only that is not available in the top help list.

Is there any other tool/ command that can help?