![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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, |
|
||||
|
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) |
![]() |
| Bookmarks |
| Tags |
| linux commands |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|