Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of checking and killing stopped process under Linux

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you the method of killing stopped process under Linux. I hope you will get something after reading this article. Let's discuss it together.

Under the Linux system, the top command can view and view stopped processes. However, you cannot view the details of the stopped process. So how do you look at the stopped processes and kill those stopped processes?

Ps-e j | grep T

The STAT status of the stopped process is T, and generally speaking, the process has the following status codes:

D uninterruptible sleep (usually IO)

I Idle kernel thread

R running or runnable (on run queue)

S interruptible sleep (waiting for an event to complete)

T stopped by job control signal

T stopped by debugger during the tracing

W paging (not valid since the 2.6.xx kernel)

X dead (should never be seen)

Z defunct ("zombie") process, terminated but not reaped by

Its parent

For BSD formats and when the stat keyword is used, additional

Characters may be displayed:

< high-priority (not nice to other users)

N low-priority (nice to other users)

L has pages locked into memory (for real-time and custom

IO)

S is a session leader

L is multi-threaded (using CLONE_THREAD, like NPTL

Pthreads do)

+ is in the foreground process group

Generally speaking, there are five kinds of status codes:

D non-interruptible uninterruptible sleep (usually IO)

R runs runnable (on run queue)

S interrupt sleeping

T stop traced or stopped

Z zombie a defunct ("zombie") process

Therefore, you can use the following command ps-A-ostat,ppid,pid,cmd | grep-e'^ [T]'to view the process information of stopped. As follows:

# ps-A-ostat,ppid,pid,cmd | grep-e'^ [T]'T 6777 8635 more alert_pps.logT 6777 9654 tail-60f alert_pps.logT 6777 10724 top# kill-9 863 ps-A-ostat,ppid,pid,cmd | grep-e'^'T 6777 9654 tail-60f alert_pps.logT 6777 10724 top# kill-9 965 killing kill-9 10724 after reading this article, I believe you have a certain understanding of "the method of killing stopped process under Linux" If you want to know more related knowledge, welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report