Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 5822 - app-admin/gentoo-stats doesn't know powerpcs
Summary: app-admin/gentoo-stats doesn't know powerpcs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: High normal (vote)
Assignee: Maik Schreiber
URL: http://gentoo.iq-computing.de/statist...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-31 12:56 UTC by Nicolas Kaiser
Modified: 2002-10-25 22:23 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Kaiser 2002-07-31 12:56:41 UTC
gentoo-stats appears to have problems with /proc/cpuinfo on ppc
Here comes the culprit:

nick $ cat /proc/cpuinfo
cpu             : 750FX
temperature     : 39 C (uncalibrated)
clock           : 700MHz
revision        : 1.18 (pvr 7000 0112)
bogomips        : 1389.36
machine         : PowerBook4,3
motherboard     : PowerBook4,3 MacRISC2 MacRISC Power Macintosh
detected as     : 257 (iBook 2 with 14" LCD)
pmac flags      : 00000003
L2 cache        : 512K unified
memory          : 128MB
pmac-generation : NewWorld
Comment 1 Nicolas Kaiser 2002-08-02 06:10:45 UTC
I'd like to propose these modifications for PPC. So the output would look like

Vendor: PowerBook4,3
Model:  750FX
MHz:    700
Flags:  PowerBook4,3 MacRISC2 MacRISC Power Macintosh


diff -u /usr/sbin/gentoo-stats /usr/sbin/gentoo-stats.modified
--- /usr/sbin/gentoo-stats      Fri Aug  2 12:57:49 2002
+++ /usr/sbin/gentoo-stats.modified     Fri Aug  2 12:56:59 2002
@@ -63,7 +63,7 @@
        {
                s/[\r\n]//g;

-               if (/^vendor_id/)
+               if (/^machine/)
                {
                        if (length($vendor) > 0)
                        {
@@ -77,7 +77,7 @@
                        $vendor =~ s/^[ \t]*//;
                }

-               if (/^model name/)
+               if (/^cpu/)
                {
                        if (length($modelname) > 0)
                        {
@@ -91,7 +91,7 @@
                        $modelname =~ s/^[ \t]*//;
                }

-               if (/^cpu MHz/)
+               if (/^clock/)
                {
                        if (length($mhz) > 0)
                        {
@@ -103,9 +103,10 @@

                        ($x, $mhz) = split(/:/);
                        $mhz =~ s/^[ \t]*//;
+                       $mhz =~ s/MHz//;
                }

-               if (/^flags/)
+               if (/^motherboard/)
                {
                        if (length($flags) > 0)
                        {
Comment 2 Kevyn Shortell (RETIRED) gentoo-dev 2002-08-02 06:36:04 UTC
Hi Maik,

I think this is meant for you, since it's your baby =)

Some of the fields would be labeled wrong, but we can hammer those out if your 
willing to make the changes. 

We'd need to look at the table you have, vs the info I have in the proc table 
and see if I can get the appropriate info. But the Vendor of the CPU is not 
PowerBook =)
Comment 3 Maik Schreiber 2002-08-02 07:33:58 UTC
Another config I've been sent by Pieter Van den Abeele:
(I'm adding it here so I won't forget)

cpu               : 7450, altivec supported
clock             : 550Mhz
revisions         : 2.1 (pvr 8000 0201)
bogomips          : 548.86
machine           : Powerbook3,3
motherboard       : Powerbook3,3 MacRISC2 MacRISC Power Macintosh
detected as       : 72 (Powerbook Titanium II)
pmac flags        : 00000003
L2 cache          : 256K unified
memory            : 256MB
pmac-generation   : NewWorld
Comment 4 Maik Schreiber 2002-08-02 07:38:07 UTC
Another one by Robert Cole:

cpu             : 7455, altivec supported
clock           : 667MHz
revision        : 2.1 (pvr 8001 0201)
bogomips        : 665.19
machine         : PowerBook3,4
motherboard     : PowerBook3,4 MacRISC2 MacRISC Power Macintosh
detected as     : 73 (PowerBook Titanium III)
pmac flags      : 00000003
L2 cache        : 256K unified
memory          : 1024MB
pmac-generation : NewWorld
Comment 5 Rajiv Aaron Manglani (RETIRED) gentoo-dev 2002-08-06 12:38:44 UTC
from my powermac 6400:

cpu             : 603ev
clock           : 200MHz
revision        : 2.1 (pvr 0007 0201)
bogomips        : 133.12
machine         : Power Macintosh
motherboard     : AAPL,e407 MacRISC
detected as     : 35 (Alchemy)
pmac flags      : 00000000
memory          : 72MB
pmac-generation : OldWorld
Comment 6 Rajiv Aaron Manglani (RETIRED) gentoo-dev 2002-08-14 18:21:11 UTC
until this is fixed, shouldn't gentoo-stats not have 'ppc' in KEYWORDS?
Comment 7 Mark Guertin 2002-08-25 17:35:54 UTC
From a G4 733 Quicksilver 
 
cpu             : 7450, altivec supported 
clock           : 733MHz 
revision        : 2.1 (pvr 8000 0201) 
bogomips        : 730.72 
machine         : PowerMac3,5 
motherboard     : PowerMac3,5 MacRISC2 MacRISC Power Macintosh 
detected as     : 69 (PowerMac G4 Silver) 
pmac flags      : 00000000 
L2 cache        : 256K unified 
memory          : 512MB 
pmac-generation : NewWorld 
 
from iMac DV 350 
 
cpu             : 740/750 
temperature     : 43-45 C (uncalibrated) 
clock           : 350MHz 
revision        : 2.2 (pvr 0008 0202) 
bogomips        : 697.95 
machine         : PowerMac2,1 
motherboard     : PowerMac2,1 MacRISC Power Macintosh 
detected as     : 66 (iMac FireWire) 
pmac flags      : 00000001 
L2 cache        : 512K unified 
memory          : 256MB 
pmac-generation : NewWorld 
 
Comment 8 Kevyn Shortell (RETIRED) gentoo-dev 2002-08-25 17:39:45 UTC
Don't need to keep sending us new versions, the data will stay the same 
actually, it's just a matter of changing uname and proc cpuinfo, which isn't 
part of this package.

Nor will the vendor str ever say powerbook =)

Comment 9 Mark Guertin 2002-08-25 17:42:25 UTC
I've set this as -ppc temporarily, until this is resolved  
Comment 10 Kevyn Shortell (RETIRED) gentoo-dev 2002-08-27 01:34:31 UTC
Bug is requesting that valid information be pulled from /proc/cpuinfo to match 
information gathered by x86 info for the result of generating a corect form. 
Will create new bug for uname.c and proc table modifications.
Comment 11 Maik Schreiber 2002-09-03 16:56:13 UTC
FYI: I've also set "-sparc -sparc64" on gentoo-stats, since I guess it doesn't
work there as well.

In addition, doesn't it make more sense to tweak gentoo-stats to take care of
those weird /proc/cpuinfo's before (if even) changing something else?

trance: I haven't found the time to tweak gentoo-stats that way yet, so it would
be cool if you can send me your changes so I can incorporate them into the
official gentoo-stats.
Comment 12 Kevyn Shortell (RETIRED) gentoo-dev 2002-09-03 17:08:53 UTC
I haven't made any changes to gentoo-stats. In order to collect the information 
that gentoo stats is looking for, such as processor manufacture, that needs to 
be added into /proc on the ppc. If you want to fix gentoo-stats to look for 
alternative str's thats fine with me, but the basic info gentoo-stats is 
looking for doesn't exist on sparc or ppc, but it should. If you want to do a 
hack until then, there is code in the bug that has been submitted, but it looks 
for the wrong part, the vendor ID str he picked is the board type.

I could give you a list of the Apple str's and if any of them were that, it 
would be the machine type of "Apple" and then either "PowerBook", "iBook" 
or "PowerMac".

Kevyn
Comment 13 Mark Guertin 2002-10-25 13:59:17 UTC
Maik:

any chance at looking at tweaking gentoo-stats for non x86 arches?  Since its
being proposed for higher purposes in gentoo now I think its pretty important...
Comment 14 Maik Schreiber 2002-10-25 22:23:02 UTC
Fixed, update to gentoo-stats-0.4 and off you go! :)