OpenBSD上查看CPU/内存信息的几种方法
发表于 : 2011-03-10 12:36
原文是在freebsd上使用的,经测试在OpenBSD上同样可行,:D
参考地址:
http://www.cyberciti.biz/faq/howto-find ... d-cpuinfo/
查看CPU信息的方法
方法1:
方法2:
方法3直接从dmesg.boot文件中提取:
查看内存信息的方法
参考地址:
http://www.cyberciti.biz/faq/howto-find ... d-cpuinfo/
查看所有信息的方法
参考地址:
http://www.cyberciti.biz/faq/howto-find ... d-cpuinfo/
查看CPU信息的方法
方法1:
代码: 全选
# sysctl -a | egrep -i 'hw.machine|hw.model|hw.ncpu'
hw.machine=i386
hw.model=Intel(R) Pentium(R) 4 CPU 1300MHz ("GenuineIntel" 686-class)
hw.ncpu=1
hw.ncpufound=1
方法2:
代码: 全选
# dmesg | grep -i cpu
cpu0: Intel(R) Pentium(R) 4 CPU 1300MHz ("GenuineIntel" 686-class) 1.29 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM
acpicpu0 at acpi0
cpu0 at mainbus0: (uniprocessor)
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
方法3直接从dmesg.boot文件中提取:
代码: 全选
# grep -i cpu /var/run/dmesg.boot
cpu0: Intel(R) Pentium(R) 4 CPU 1300MHz ("GenuineIntel" 686-class) 1.29 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM
acpicpu0 at acpi0
cpu0 at mainbus0: (uniprocessor)
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
查看内存信息的方法
参考地址:
http://www.cyberciti.biz/faq/howto-find ... d-cpuinfo/
代码: 全选
# sysctl hw | grep mem
hw.physmem=1341190144
hw.usermem=1341177856
查看所有信息的方法
代码: 全选
# sysctl hw
hw.machine=i386
hw.model=Intel(R) Pentium(R) 4 CPU 1300MHz ("GenuineIntel" 686-class)
hw.ncpu=1
hw.byteorder=1234
hw.pagesize=4096
hw.disknames=wd0,cd0,fd0
hw.diskcount=3
hw.cpuspeed=1286
hw.setperf=100
hw.vendor=Dell Computer Corporation
hw.product=OptiPlex GX400
hw.serialno=DDNQH01
hw.uuid=44454c4c-44c6-104e-8051-c4c04f483031
hw.physmem=1341190144
hw.usermem=1341177856
hw.ncpufound=1