![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | 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, |
| Forum Sponsor | ||
|
|
|
|||
|
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 |