处于S状态的进程

 

A process in S state is usually in a blocking system call, such as reading or writing to a file or the network, or waiting for another called program to finish.

You can use strace -p <pid> to find out which system call is currently happening. It will produce output like

write(1, "foobar"..., 4096

which means that the process is trying to write 4096 bytes starting with "foobar" to stdout (fd #1) but whatever it has been redirected into is busy and the output buffer is full.

 

The strace output may indicate that the main process is just waiting for child processes to finish their work. If so, you could try running

strace -f -p 5075

to trace the child processes as well.

 

But in some case, for process, the CPU usage consists of many short bursts below the 1s time granularity for Top. Which means it the usage counter gets updated but Top does not see the "R" state since it is too short.

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值