LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Getting architecture/processor info.. (https://www.linuxquestions.org/questions/linux-newbie-8/getting-architecture-processor-info-461093/)

PeterDowling 07-05-2006 01:54 AM

Getting architecture/processor info..
 
I am in the process of writing a SHELL script that gathers 'system' information on a range of servers (Solaris [SUN & Fujitsu], SGI-IRIX, SGI-Linux, and Intel Linux (RH & Suse), amongst others.

One of the main requirements is to report processor and architecture detail such as number of processors, and their detail, such as '6 x Pentium 4 Xeon (Foster) Original OEM i386'.

The method for getting this type of information varies greatly, even between 32 bit and 64 bit Enterprise RedHat distributions. i.e x86info seems to be avalailable on 32 bit installation only, and hwinfo yields some of this with SUSE?

I would like to know about any other ways to get this kind of basic system information, other than 'uname -a' or looking at /proc/cpuinfo, which seems to be empty ,most of the time?

Any help gratefuly received, as always.....

MasterC 07-05-2006 03:06 AM

If they are empty, maybe you haven't mounted the proc filesystem? Although I am not that familiar with the other OS's you are trying to obtain information from, all of the CPU info you are looking for from linux should be in that location:
cat /proc/cpuinfo

You may be trying to access that information from a filesystem where the actual system isn't booted, and therefore the proc filesystem isn't mounted. You can still mount it and access it though:
mount -t proc none /mnt/whatever/proc
And then:
cat /mnt/whatever/proc/cpuinfo

AFAIK that is the most accurate way of actually knowing what CPU info pertains to *that* specific hardware arrangement. Obviously you can move a hard disk to another machine, and upon bootup /proc/cpuinfo will change; which is why mounting proc is necessary before catting the info.

HTH

Cool

Tinkster 07-05-2006 03:42 AM

http://bhami.com/rosetta.html

is a good starting point ... :}


Cheers,
Tink

timmeke 07-05-2006 03:58 AM

A quick Google search turned up:
http://www.lifeaftercoffee.com/2006/...on-in-solaris/
for Solaris 7-10.

On SGI Irix (at least on 6.5), it seems to be the "hinv" command.
http://techpubs.sgi.com/library/tpl/...an/cat1/hinv.z

Edit: But I'm no user of either Solaris or Irix, so I could be mistaken...

cs-cam 07-05-2006 10:30 PM

Quote:

Originally Posted by Tinkster
http://bhami.com/rosetta.html

is a good starting point ... :}


Cheers,
Tink

Hey rad link :D

PeterDowling 07-06-2006 01:55 AM

Thanks.....
 
Seems /proc is mounted and cpuinfo seems to give the information.

I was interpreting a zero length to mean no content, however guess this is some sort of pseudo access to the kernel/hardware, and the length means nothing.

As for the UNIX flavours, I am a UNIX System Administrator, and have these covered. Just added them for context.

Celebrate the fact that Linux versions do things differently, and rejoice in the fact others are quick to help!

No further help needed, thanks to all...:)


All times are GMT -5. The time now is 07:15 PM.