What's the easiest way to display system cpu, memory, # drives/size ??

Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users What's the easiest way to display system cpu, memory, # drives/size ??
# 1  
Old 03-08-2002
What's the easiest way to display system cpu, memory, # drives/size ??

I am looking for the easiest and most generic way
to determine:

System model/class
Number of cpu's
Clock speed of cpu's (ie 550 MHz)
Total Physical Memory (not virtual)
Number of Drives/Drive Size

Thanks in advance,
# 2  
Old 03-08-2002
For what OS are you looking to get this complete information? For linux if you installed KDE or GNU they include a user friendly Xsystem panel for you to check those information called "Process Managment".

- For solaris mysys> prtconf | grep Mem for checking on the Memory size, top command, primarily used to identify a system's most resource-consuming processes, also provides a synopsis of memory and memory usage.

- If you still unable to figured out what you are looking for, then check your MAN page depending on what UNIX os you are using the commands might vary..
# 3  
Old 03-08-2002
in Solaris, you may try


i.e. /usr/platform/sun4u/sbin/prtdiag
or /usr/platform/SUNW,Ultra-1/sbin/prtdiag
hope this help

# 4  
Old 03-09-2002
You can also pull a lot of that information out of the `dmesg` output.

That is normally the first place that I look...
# 5  
Old 03-12-2002
There you probably have the only real way to do it.
I have never seen that SunOS stuff on any other system, and if I should vote between that and GNU /proc, I'd vote for the latter.

But in dmesg you find what the system found, and dmesg is on all systems I know about.

Could you tell us what you want this information for?

These are the commands I found that deal with some of this:

uname - Will tell you about the system name
top - You may parse some of this stuff and
draw inferences from it
df - This tells you about drives and free
space (parse for NFS mounts!)

To determine system speed, you have to make a small program, I guess.
Time a loop or something, maybe invalidate the cache inside the loop, determine what you want as criterion, and divide that by the time it took to run.

double d, dd;
long i;
long t = (long)time();
d = (double) t;
 for (i=0; i < LOOPCNTR; i++)
t = (long) time();
dd = (double) t;

time_it_took = dd - d;

system_speed = criterion / time_it_took;

You could fork one for each 'suspected' process and time it again. With a few if's - like each new process is given a new processor, you may infer the number of processor by multiplying time_it_took by the number of forks and compare.

This is a BFAMI(*) approach that might work.

Physical memry can be determined with a

long *p = 0;

loop that evenually will seqfault.
Trap that, and check the count.
Another BFAMI approach.

A structured approach is write to the POSIX guys and tell them: "Hey, I think we need a portable way of determining the system configuration, like CPUs, memory, disks, etc."

Maybe they'll listen.

Write an RFC.



(*)(BFAMI = brute-force-and-massive-ignorance)
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Memory or CPU size

Is there a command or file I can look at that tells me how much real memory a machine has? A little background. In my shop we run a bunch of java programs, sometimes some of these jobs have config definitions that call for 2G. I would like to know how many I can run before I exhaust rescources. Any... (12 Replies)
Discussion started by: Harleyrci
12 Replies

2. UNIX for Advanced & Expert Users

Out of Memory error when free memory size is large

I was running a program and it stopped and showed "Out of Memory!". at that time, the RAM used by this process is around 4G and the free memory size of the machine is around 30G. Does anybody know what maybe the reason? this program is written with Perl. the OS of the machine is Solaris U8. And I... (1 Reply)
Discussion started by: lilili07
1 Replies

3. Solaris

Multi CPU Solaris system shows 100% CPU usage.

Hello Friends, On one of my Solaris 10 box, CPU usage shows 100% using "sar", "vmstat". However, it has 4 CPUs and prstat and glance are not showing enough processes to justify high CPU utilization. ========================================================================= $ prstat -a ... (4 Replies)
Discussion started by: mahive
4 Replies

4. UNIX for Dummies Questions & Answers

cpu, memory and virtual memory usage

Hi All, Does anyone know what the best commands in the UNIX command line are for obtaining this info: current CPU usage memory usage virtual memory usage preferably with date and time parameters too? thanks ocelot (4 Replies)
Discussion started by: ocelot
4 Replies

5. Programming

How can I get a processor's CPU Percentage?

you know that.. in HP-UX.. in sys/pstat.h struct pst_status { long pst_idx; /* Index for further pstat() requests */ long pst_uid; /* Real UID */ long pst_pid; /* Process ID */ .... float pst_pctcpu; /* %cpu for this process during p_time... (3 Replies)
Discussion started by: sangjinn
3 Replies

6. AIX

command to display my tape drives (rmt's)

Hi all, Looking for an ls** command to display my tape drives and their associated serial numbers. thx. (8 Replies)
Discussion started by: jwholey
8 Replies

7. UNIX for Advanced & Expert Users

memory free up using 'find'

Hi, I am facing an interesting aspect of find command... to be clear, we are running a small web server with oracle 8i database and Oralce9iAS on Sun E250 with Solaris 2.6 Over a period of time, the free memory ( displayed in 'top' utility ) drops down.. we could relate this to dedicated... (6 Replies)
Discussion started by: shibz
6 Replies

8. UNIX for Dummies Questions & Answers


I have a question. Is Linux (Redhat 7.2 specifically) set up to run better/faster on a Pentium cpu vs. an AMD? The reason I ask is, I have a PIII 733 w/512 pc133, and a 4mb video card at work, and an AMD 1.4 w/1gb ddr, and a Radeon 64mb DDR at home, and the PIII at work runs a lot faster. I have a... (1 Reply)
Discussion started by: jeremiebarber
1 Replies

9. Shell Programming and Scripting

Clearify what it means under 'WHAT' when hit the 'w'-command

I wonder how I shall read the result below, especially 'what' shown below. The result was shown when I entered 'w'. E.g what is TOP? What is gosh ( what does selmgr mean?)? login@ idle JCPU PCPU what 6:15am 7:04 39 39 TOP 6:34am 6:45 45 45 TOP 6:41am ... (1 Reply)
Discussion started by: Aelgen
1 Replies
Login or Register to Ask a Question