home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / sun / admin / 5113 < prev    next >
Encoding:
Internet Message Format  |  1992-07-30  |  1.8 KB

  1. Xref: sparky comp.sys.sun.admin:5113 comp.sys.sun.misc:3403
  2. Path: sparky!uunet!auspex-gw!guy
  3. From: guy@Auspex.COM (Guy Harris)
  4. Newsgroups: comp.sys.sun.admin,comp.sys.sun.misc
  5. Subject: Re: How much physical memory?
  6. Message-ID: <13832@auspex-gw.auspex.com>
  7. Date: 30 Jul 92 21:11:02 GMT
  8. References: <ASHERMAN.92Jul29114658@laser.fmrco.com> <CHETAL.92Jul30045312@is1.is.morgan.com>
  9. Sender: news@auspex-gw.auspex.com
  10. Followup-To: comp.sys.sun.admin
  11. Organization: Auspex Systems, Santa Clara
  12. Lines: 33
  13. Nntp-Posting-Host: bootme.auspex.com
  14.  
  15. >I picked this perl script from net itself. If you have ONLY sun's , you may
  16. >wanna use pagesize(1) rather than hard-coded value.
  17.  
  18. Yes, you *definitely* don't want to hard-code a value.
  19.  
  20. For one thing, the script in question appears to be a bit confused:
  21.  
  22. ># I think for Sun-3's you divide by 128
  23.  
  24. That's true, *BUT* it's also true for Sun-4's as well; they also have
  25. 8K pages, so:
  26.  
  27. >$_ = `adb -k /vmunix /dev/mem </dev/null 2>&1`;
  28. >if (/physmem\s+(.*)/) {
  29. >    print "Physical memory is ", int(hex($1) / 256 + 1), " megs\n";
  30.  
  31. will give the wrong answer.
  32.  
  33. Sun-4c's have 4K pages, Sun-4m's (and all other SPARC Reference MMU
  34. machines) have 4K pages, and the SPARCengine 1E has 8K pages.  I'll bet
  35. the script's author tried it on a Sun-4c, and figured it was
  36. representative of all SPARC machines.  It may be representative of
  37. *most* of 'em, but it's definitely not representative of *all* of
  38. 'em....
  39.  
  40. I.e., if you have a program or script that you want to run on arbitrary
  41. SPARC-based machines, your program or script *must not* have the page
  42. size hardcoded into it.
  43.  
  44. Then again, if you don't have only Suns, you may or may not have a
  45. "physmem" variable in your kernel on the non-Sun machines, so....
  46.  
  47. (And, for that matter, SunOS 5.0 might not have it, either....)
  48.