As I’m writing my thesis I’m running tests on an old SMP Solaris machine. Obviously, I need to provide the specs of this machine in the paper so that the readers can see my results in context (ie why everything is taking forever. On linux I would just uselshwwhich is your ultimate hardware information goldmine. If you don’t have it on your system, go install it now. You will thank me later.
The ancient Solaris machine I was working with did not have it, so I was forced to find other ways of finding information such as CPU speed and memory size.
First you can tryprtdiag– it will tell you detailed information about all your CPU’s and memory banks. Unfortunately it is in a weird directory that is not in your $path so you will need to run it with the absolute path:
/usr/platform/sun4u/sbin/prtdiag -v
If you just want information on the CPU’s you can also try:
psrinfo -v
Finally, to just get your total memory size do:
prtconf | grep Memory
There might be better ways to do this, but these worked for me. Craig will probably be able to add to this list or correct me.
本文介绍了在Solaris系统中如何获取CPU速度和内存大小等硬件信息的方法。通过使用prtdiag、psrinfo及prtconf等命令,可以详细了解系统的硬件配置。
2216

被折叠的 条评论
为什么被折叠?



