top -H -p $PID #查看对应进程的那个线程占用CPU过高 1.top -H 手册中说:-H : Threads toggle 加上这个选项启动top,top一行显示一个线程.否则,它一行显示一个进程. 2.ps xH 手册中说:H Show threads as if they were processes 这样可以查看所有存在的线程. 3.ps -mp 手册中说:m Show threads after processes 这样可以查看一个进程起的线程数. 查看进程 top 命令…
查看最大线程数: cat /proc/sys/kernel/threads-max ulimit User limits - limit the use of system-wide resources. Syntaxulimit [-acdfHlmnpsStuv] [limit] Options -S Change and report the soft limit associated with a resource. -H Change and report the hard limit…