The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
command to display my tape drives (rmt's) jwholey AIX 8 03-25-2008 10:52 AM
URGENT: Display memory details in 5.8 ashvik SUN Solaris 1 01-16-2008 07:05 AM
how floppy disks, CDs and flash drives (pen drives) are accessed in UNIX nokia1100 Shell Programming and Scripting 0 04-06-2007 06:10 PM
Inconsistent memory usage display spdas Filesystems, Disks and Memory 2 02-15-2007 09:15 PM
Display size shaan_dmp UNIX for Dummies Questions & Answers 1 02-13-2007 05:16 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-07-2002
Registered User
 

Join Date: Feb 2002
Posts: 8
Stumble this Post!
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,
Forum Sponsor
  #2 (permalink)  
Old 03-07-2002
killerserv's Avatar
Unix Predator
 

Join Date: Dec 2000
Location: Phoenix, AZ
Posts: 670
Stumble this Post!
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 (permalink)  
Old 03-08-2002
Registered User
 

Join Date: Jul 2001
Location: California
Posts: 42
Stumble this Post!
in Solaris, you may try

/usr/platform/YourMachineModel/sbin/prtdiag

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

__________________
:rolleyes:
  #4 (permalink)  
Old 03-09-2002
auswipe's Avatar
Registered User
 

Join Date: Nov 2001
Location: Wide Awake Wylie, Texas
Posts: 536
Stumble this Post!
You can also pull a lot of that information out of the `dmesg` output.

That is normally the first place that I look...
__________________
Not quite as cool as all the other Kids...
  #5 (permalink)  
Old 03-12-2002
Registered User
 

Join Date: Feb 2002
Location: Brabant, Belgium
Posts: 65
Stumble this Post!
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++)
invalidate_cache();
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;
while(p++);

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.

Pray.

Atle



(*)(BFAMI = brute-force-and-massive-ignorance)
__________________
PS
All of the above is to be read as '... unless I am wrong'
ENDPS
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:21 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0