lxtask 0.1.4 displays -1% in CPU column

Bug #1128012 reported by Sevilla, Larry
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Raspbian
Fix Released
Undecided
Unassigned

Bug Description

In LXTask v. 0.1.4, the CPU column always displays -1% on all running tasks.

Revision history for this message
Richard Bullington-McGuire (rbulling) wrote :

The root of this bug is that lxtask is miscounting the number of CPUs in xfce-taskmanager-linux.c (in get_system_status() at line 355), it is making an assumption that for each processor that there will be a line starting with the case sensitive string 'processor' but on Rasbian the architecture-dependent /proc/cpuinfo only has a line starting with 'Processor'.

To work around this, assume that the number of processors will always be at least one, as the attached patch 02-numcpu.patch does.

This illustrates the underlying difference in data between an i386 kernel and the arm6l kernel's procinfo entries related to processor:

pi@raspberrypi ~/lxtask-0.1.4 $ uname -a
Linux raspberrypi 3.6.11+ #371 PREEMPT Thu Feb 7 16:31:35 GMT 2013 armv6l GNU/Linux
pi@raspberrypi ~/lxtask-0.1.4 $ grep -i processor /proc/cpuinfo
Processor : ARMv6-compatible processor rev 7 (v6l)

[rbulling@foobar ~]$ uname -a
Linux foobar.example.com 2.6.18-274.7.1.el5xen #1 SMP Mon Oct 17 12:14:02 EDT 2011 i686 i686 i386 GNU/Linux
[rbulling@foobar ~]$ grep -i processor /proc/cpuinfo
processor : 0
processor : 1
processor : 2

Revision history for this message
peter green (plugwash) wrote :

The real root of this bug seems to have nothing to do with arm vs x86 but instead seems to be caused by uniprocessor vs multiprocessor kernels. Uniprocessor kernels don't seem to output "processor" lines.

The "Processor" line always seems to appear (in a multiprocessor kernel it appears in addition to the "processor" lines) so it should not be counted.

Revision history for this message
peter green (plugwash) wrote :

Ok seems the situation is more complex than I thought.

My datapoints so far.

1: raspberry pi running raspbian 3.6 kernel, no "processor" lines
2: imx53 quickstart board with debian 3.2 kernel, no "processor" lines
3: odriod u2 with vendor kernel: varying number of processor lines (cores being switched off at low CPU load?!)
4: debian wheezy i386 with 3.6 486 kernel in a dual processor virtualbox vm: one "processor" line
5: debian wheezy i386 with 3.6 686-pae kernel in a dual processor virtualbox vm: two "processor" lines

Revision history for this message
peter green (plugwash) wrote :

And I just found the following on smetana.debian.org

plugwash@smetana:~$ cat /proc/cpuinfo
cpu : TI UltraSparc IIIi (Jalapeno)
fpu : UltraSparc IIIi integrated FPU
pmu : ultra3i
prom : OBP 4.13.2 2004/03/29 10:11
type : sun4u
ncpus probed : 2
ncpus active : 2
D$ parity tl1 : 0
I$ parity tl1 : 0
Cpu0ClkTck : 000000003bb94e80
Cpu1ClkTck : 000000003bb94e80
MMU Type : Cheetah+
State:
CPU0: online
CPU1: online
plugwash@smetana:~$

Revision history for this message
peter green (plugwash) wrote :

Looks like get_nprocs is a better soloution.

Revision history for this message
peter green (plugwash) wrote :

seems like I fixed this but forgot to update the bug report.

Changed in raspbian:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.