FreeBSD的CPU序列号

我试图从有FreeBSD的服务器读取CPU序列号信息。

我毫不费力地尝试了这些:

  • 的sysctl
  • dmesg的
  • cpucontrol

这些实用程序在系统上不存在:

  • 的dmidecode
  • cpuinfo中
  • CPUID
  • / proc目录

我无法安装任何sotfware到服务器。

任何想法如何解决它?

谢谢!

软件包“cpuid”存在于FreeBSD上,但这不是基本系统的一部分。

输出示例:

root@freeBSD > cpuid eax in eax ebx ecx edx 00000000 00000005 756e6547 6c65746e 49656e69 00000001 000106e5 01040800 00000201 178bfbff 00000002 55035a01 00f0b2e4 00000000 09ca212c 00000003 00000000 00000000 00000000 00000000 00000004 0c000021 01c0003f 0000003f 00000000 00000005 00000000 00000000 00000000 00000000 80000000 80000008 00000000 00000000 00000000 80000001 00000000 00000000 00000001 28100800 80000002 65746e49 2952286c 726f4320 4d542865 80000003 37692029 55504320 20202020 20202020 80000004 30363820 20402020 30382e32 007a4847 80000005 00000000 00000000 00000000 00000000 80000006 00000000 00000000 01006040 00000000 80000007 00000000 00000000 00000000 00000000 80000008 00003024 00000000 00000000 00000000 Vendor ID: "GenuineIntel"; CPUID level 5 Intel-specific functions: Version 000106e5: Type 0 - Original OEM Family 6 - Pentium Pro Model 30 - Intel Corei7 or Xeon processor, 45nm Stepping 5 Reserved 0 Extended brand string: "Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz" CLFLUSH instruction cache line size: 8 Initial APIC ID: 1 Hyper threading siblings: 4 Feature flags: 178bfbff: FPU Floating Point Unit VME Virtual 8086 Mode Enhancements DE Debugging Extensions PSE Page Size Extensions TSC Time Stamp Counter MSR Model Specific Registers PAE Physical Address Extension MCE Machine Check Exception CX8 COMPXCHG8B Instruction APIC On-chip Advanced Programmable Interrupt Controller present and enabled SEP Fast System Call MTRR Memory Type Range Registers PGE PTE Global Flag MCA Machine Check Architecture CMOV Conditional Move and Compare Instructions FGPAT Page Attribute Table PSE-36 36-bit Page Size Extension CLFSH CFLUSH instruction MMX MMX instruction set FXSR Fast FP/MMX Streaming SIMD Extensions save/restore SSE Streaming SIMD Extensions instruction set SSE2 SSE2 extensions HT Hyper Threading Feature flags set 2: 00000201: SSE3 SSE3 extensions SSSE3 Supplemental Streaming SIMD Extension 3 Extended feature flags: 28100800: SYSCALL SYSCALL/SYSRET instructions XD-bit Execution Disable bit RDTSCP RDTSCP and IA32_TSC_AUX are available EM64T Intel Extended Memory 64 Technology Extended feature flags set 2: 00000001: LAHF LAHF/SAHF available in IA-32e mode TLB and cache info: 5a: Data TLB: 2MB or 4MB pages, 4-way set associative, 32 entries 03: Data TLB: 4KB pages, 4-way set assoc, 64 entries 55: Instruction TLB: 2MB or 4MB pages, fully assoc., 7 entries e4: 3rd-level cache: 8MB, 16-way set associative, 64-byte line size b2: Instruction TLB: 4-KB Pages, 4-way set associative, 64 entries f0: 64-byte prefetching 2c: 1st-level data cache: 32-KB, 8-way set associative, 64-byte line size 21: 256-KB L2 (MLC), 8-way set associative, 64 byte line size ca: Shared 2nd-level TLB: 4-KB Pages, 4-way set associative, 512 entries 09: 1st-level instruction cache: 32KB, 4-way set assoc, 64 byte line size Processor serial: 0001-06E5-0000-0000-0000-0000 

我认为你正在寻找的价值是这个“处理器序列”。 所以一个简单的cpuid |grep "Processor serial"就可以做到这一点。

正如你所说,你不能在你的服务器上安装一些东西,你仍然可以:

  • 发现了一个很像/tmp地方(如果你想保持跟踪/垃圾低),
  • 获得预编译的软件包:

     fetch ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages/misc/cpuid-3.3_6.tbz 

    (用你的服务器拱门来调整url – 参见uname -a了解更多信息)

  • 从中提取“cpuid”二进制文件:

     tar -jxvf cpuid-3.3_6.tbz bin/cpuid` 
  • 并在本地执行它:

     ./bin/cpuid