The Linux system process is composed of threads. Of course, the number of threads under the Linux process is not fixed. It can be a process or multiple processes. This article will teach you how to view the number of threads in the Linux system?
First, use the Linux command to view the process of the number of threads
1, the top command, specific use is top -H
With this option, the top Each line does not show a process, but a thread.
2, use the ps command, the specific usage is ps -xH
This way you can view all existing threads, you can also use grep for further filtering.
3, use the ps command, the specific usage is ps -mq PID
This can see the number of threads generated by the specified process.
Second, the Linux system tools to view the Linux process
Look at this directory, /proc/5000/There is everything you want. In fact, stat represents some of the current information.
When using the ps command to view the process, the meaning of the process state respectively is as follows:
D can not interrupt sleep (usually in IO operation) Receive signal does not wake up and can not run, process Must wait until an interrupt occurs
R is running or runnable (in queue running queue)
S interruptible sleep (hibernate, blocked, waiting for the formation or acceptance of a condition To signal)
T The stopped process receives the SIGSTOP, SIGSTP, SIGTIN, SIGTOU signals and stops running
W is changing pages (2.6. before the kernel is valid)
X dead process (not turned on)
Z The zombie process has terminated, but the process descriptor exists until the parent process calls the wait4() system call to release the BSD-style
"high priority" (not nice to other users)
N low priority (nice to other users)
L page locked in memory (real time and custom IO)
s a message Header
l Multithreading (using CLONE _THREAD, like NPTL's pthreads)
+ In the foreground process group
The above is the way to view the number of threads in the Linux process. The number of threads in the Linux process is an important parameter of the process. It is also the information you should know to manage Linux processes.
Linux users often use the scp and sftp commands when transferring remote files. How
FDisk is a disk partitioning tool for Linux. It can divide a disk into multiple par
The FIFO pipeline is a file type. It is very easy to create a FIFO on Linux. The FI
In Linux system operation, if there is too much data in the file, it is very troubl
Oracle Linux 6.4 accidentally remove VG solution
Linux bash shell vulnerability detection and repair method
Linux settings wget download http /https proxy method
Steps to delete a folder with a space name in Linux
How to fix the program error prompted by Ubuntu system?
How to upgrade OpenSSH under Linux system?
Fedora through l2tp vpn networking method
CentOS 6.4 uses script to disable the touchpad.
Linux using the telnet command method
Detailed method for automatic backup and deletion of website data under Linux
Linux installation g77 compiler skills
What should I do if Ubuntu prompts the list error when opening the software center?
Several practical tips for TAB keys under Windows 7
One of Microsoft Software Works Microsoft Office 2010
How to improve the speed of the network? (a)
Steps to install Brackets on Ubuntu
Win10 computer can not connect to the wifi hotspot fault resolution
There are several versions of Win10. The differences between versions of Win10 system are
Reinstalling Win 7 Five must-have settings
How to improve the speed of the win7 system
Win 7 comes with parental control: quit internet addiction anti-addiction