Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有兴趣找出哪个线程在哪个核心/CPU 上运行。我的 Tomcat6 正在 100% 使用单个 CPU 内核,而所有其他 CPU(我的服务器有 16 个其他空闲内核)没有被使用......所以我试图找出问题所在。
有趣的是,人们投了反对票,但不知道为什么。我搜索了一段时间,发现以下命令给出了哪个线程在哪个 CPU 上运行:
ps -p <PID> -L -o pid,tid,psr
其中<PID>是我们感兴趣的进程的pid。