linux-kernel - 如何检查内核中是否启用或禁用了 SMP?

标签 linux-kernel embedded-linux

我想知道如何检查我正在运行的机器,内核是否配置为 SMP?当然,我可以查看内核.config文件并可以搜索它。但是,问题是假设我没有源代码,我将如何检查 SMP 配置?有没有proc文件来检查它?

下面说我没有多核:

#cat /proc/cpuinfo

processor               : 1
cpu model               : Broadcom BMIPS5000 V1.1  FPU V0.1
BogoMIPS                : 651.26
cpu MHz                 : 1305.018
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 64
extra interrupt vector  : yes
hardware watchpoint     : no
ASEs implemented        :
shadow register sets    : 1
kscratch registers      : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available
uname -a的输出说:
Linux 136.170.193.3 3.3.8-2.4 #2 SMP Fri Dec 13 07:11:03 EST 2013 mips GNU/Linux

这里有点困惑。评论中有人建议我查看 uname -a .我不确定结果是否可靠。我可以假设使用 uname -a 产生的关键字 SMP 吗? ,内核配置为SMP?

最佳答案

Can I assume that with the keyword SMP produced by uname -a, the kernel is configured as SMP?



是的。 uname 返回的版本字符串是在编译内核时生成的。

关于linux-kernel - 如何检查内核中是否启用或禁用了 SMP?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20852902/

相关文章:

linux - 在嵌入式系统中使用的服务器和客户端编程语言和框架

c - 如何修改内核DTB文件

c - 读取到 procfile 末尾时遇到问题

linux - 从 Linux 内核模块识别 glibc mmap 区域(VMA)

linux - 在内核模块中预定义一个宏

c++ - gmtime() 函数是否考虑闰年?

linux - 如何配置嵌入式 linux USB?

c - C 程序中 8、16、32 和 64 位微 Controller 上的字长、int 和指针的大小是多少?

c - 在 Linux 中测量时间 - 时间 vs 时钟 vs getrusage vs clock_gettime vs gettimeofday vs timespec_get?

c - 为什么我们需要在 block 宏周围加上括号?