Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more 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?
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.
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.