LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-05-2006, 02:54 AM   #1
PeterDowling
LQ Newbie
 
Registered: Jun 2006
Distribution: Investigating ubuntu, and Centos
Posts: 2

Rep: Reputation: 0
Question 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.....
 
Old 07-05-2006, 04:06 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
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
 
Old 07-05-2006, 04:42 AM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
http://bhami.com/rosetta.html

is a good starting point ... :}


Cheers,
Tink
 
Old 07-05-2006, 04:58 AM   #4
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
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...

Last edited by timmeke; 07-05-2006 at 04:59 AM.
 
Old 07-05-2006, 11:30 PM   #5
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,544
Blog Entries: 4

Rep: Reputation: 57
Quote:
Originally Posted by Tinkster
http://bhami.com/rosetta.html

is a good starting point ... :}


Cheers,
Tink
Hey rad link
 
Old 07-06-2006, 02:55 AM   #6
PeterDowling
LQ Newbie
 
Registered: Jun 2006
Distribution: Investigating ubuntu, and Centos
Posts: 2

Original Poster
Rep: Reputation: 0
Smile 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...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: The Cell BE Processor Security Architecture LXer Syndicated Linux News 0 04-26-2006 09:21 PM
URGENT::System call to find Processor Info mghiya Programming 4 02-13-2006 04:16 AM
Processor Architecture bladepdx Debian 2 01-23-2005 09:05 PM
How to get processor info for linux raees Linux - General 2 03-17-2004 07:11 AM
processor architecture? pyropenguin Linux - Hardware 3 02-08-2003 08:36 PM


All times are GMT -5. The time now is 10:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration