Jeff Dike wrote:
> I see it counting cpu<n> lines in /proc/stat, which is what I'm
> seeing. It will also look at /proc/cpuinfo. Can you strace your
> version and see if it's looking there at all?
No.. looks like they changed the method:
open("/sys/devices/system/cpu", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|0x80
000) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
fcntl64(3, F_GETFD) = 0x1 (flags FD_CLOEXEC)
getdents64(3, /* 5 entries */, 4096) = 144
getdents64(3, /* 0 entries */, 4096) = 0
close(3) = 0
No reference to /proc/stat nor /proc/cpuinfo.
# ls -l /sys/devices/system/cpu
-r--r--r-- 1 root root 4096 2008-08-04 23:51 online
-r--r--r-- 1 root root 4096 2008-08-04 23:51 possible
-r--r--r-- 1 root root 4096 2008-08-04 23:51 present
# cat /sys/devices/system/cpu/online
0
# cat /sys/devices/system/cpu/possible
0
# cat /sys/devices/system/cpu/present
0
On another Linux (real, 2.6.18) this looks completely
different:
$ ls -l /sys/devices/system/cpu
total 0
drwxr-xr-x 4 root root 0 2008-08-04 23:53 cpu0
$ ls -l /sys/devices/system/cpu/cpu0/
total 0
drwxr-xr-x 5 root root 0 2007-06-11 09:30 cache
-r-------- 1 root root 4096 2008-08-04 23:53 crash_notes
drwxr-xr-x 2 root root 0 2007-06-11 09:30 topology
Well.. so this is an interface definition problem.. now who has
changet something and did not tell the others..
--
Stano
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel