The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

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 02:52 PM
URGENT: Display memory details in 5.8 ashvik SUN Solaris 1 01-16-2008 11:05 AM
how floppy disks, CDs and flash drives (pen drives) are accessed in UNIX nokia1100 Shell Programming and Scripting 0 04-06-2007 09:10 PM
Inconsistent memory usage display spdas Filesystems, Disks and Memory 2 02-16-2007 01:15 AM
Display size shaan_dmp UNIX for Dummies Questions & Answers 1 02-13-2007 09:16 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-08-2002
eyounes eyounes is offline
Registered User
  
 

Join Date: Feb 2002
Posts: 8
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 (permalink)  
Old 03-08-2002
killerserv's Avatar
killerserv killerserv is offline Forum Advisor  
Unix Predator
  
 

Join Date: Dec 2000
Location: Phoenix, AZ
Posts: 670
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
yellowfish yellowfish is offline
Registered User
  
 

Join Date: Jul 2001
Location: California
Posts: 42
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

  #4 (permalink)  
Old 03-09-2002
auswipe's Avatar
auswipe auswipe is offline Forum Advisor  
Registered User
  
 

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

That is normally the first place that I look...
  #5 (permalink)  
Old 03-12-2002
AtleRamsli AtleRamsli is offline
Registered User
  
 

Join Date: Feb 2002
Location: Brabant, Belgium
Posts: 65
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)
Closed Thread

Bookmarks

Tags
linux commands

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:23 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0