Was ist das äquivalent von /proc/cpuinfo auf FreeBSD v8.1?
Was ist das äquivalent von Linux ' s /proc/cpuinfo auf FreeBSD v8.1? Meine Anwendung liest /proc/cpuinfo und speichert die Informationen in der log-Datei, was könnte ich tun, um ähnliche Informationen protokolliert, die auf FreeBSD?
Eine Beispieldatei von /proc/cpuinfo sieht wie folgt aus:
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Xeon(R) CPU E5420 @ 2.50GHz
stepping : 8
cpu MHz : 2499.015
cache size : 6144 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss nx lm constant_tsc pni ds_cpl
bogomips : 5004.54
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Xeon(R) CPU E5420 @ 2.50GHz
stepping : 8
cpu MHz : 2499.015
cache size : 6144 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss nx lm constant_tsc pni ds_cpl
bogomips : 5009.45
InformationsquelleAutor der Frage WilliamKF | 2010-11-03
Du musst angemeldet sein, um einen Kommentar abzugeben.
Verwenden
dmidecode
Befehl:InformationsquelleAutor der Antwort Nan Xiao
Glaube ich nicht, es ist alles so detailliert wie Linux
/proc/cpuinfo
. Schauen Sie insysctl hw
und/var/run/dmesg.boot
. Die meisten Informationen, wie CPU-Geschwindigkeit und instruction sets sollten drin sein irgendwo.Dies ist, was ich sehen (mit ein paar uninteressante
hw.*
Felder entfernt):(Beachten Sie, dass auf OpenBSD, die cpu-Geschwindigkeit wird gefunden in
hw.cpuspeed
statt in dmesg.)InformationsquelleAutor der Antwort Josh Lee
Nur um jleedev Kommentar, können Sie die
sysctl(3)
Systemaufruf zu erhalten diese Informationen aus dem kernel, von Ihrer Anwendung aus. Finden Sie dieCTL_HW
top-level-name:http://www.manpages.info/freebsd/sysctl.3.html
InformationsquelleAutor der Antwort Seth Kingsley
Beachten Sie, dass Informationen wie die CPU-features und verschiedenen CPU-cache-Größen sind nicht in der sysctl-Ausgabe, aber Sie sind in der Ausgabe von dmidecode unter FreeBSD.
InformationsquelleAutor der Antwort Greg Smith
Wenn Sie interessiert sind, CPU-flags, Sie könnten aber auch einen Blick auf
oder
Würden etwas zeigen wie
InformationsquelleAutor der Antwort AntonioK