免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1435 | 回复: 2
打印 上一主题 下一主题

[Web] 请问进程有关D状态。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-07-25 16:45 |只看该作者 |倒序浏览

我服务器的nginx进程很多是D状态:但是系统的cpu不高,才10%左右。
现在很多d状态导致用户连接进程超时。
请问有什么办法能查nginx是阻塞在什么地方?谢谢了。
用strace查,发现主要的操作都在sendfile:
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
81.29    0.003614          48        76           sendfile
11.13    0.000495          10        50           readv
  4.05    0.000180           2        89           writev
  3.53    0.000157           5        30           close
  0.00    0.000000           0        11           write
  0.00    0.000000           0         5           open
  0.00    0.000000           0         6         2 stat
  0.00    0.000000           0         5           fstat
  0.00    0.000000           0         3           ioctl
  0.00    0.000000           0        10           socket
  0.00    0.000000           0         3           accept
  0.00    0.000000           0        12           sendto
  0.00    0.000000           0        24        12 recvfrom
  0.00    0.000000           0         2           shutdown
  0.00    0.000000           0         7           getsockname
  0.00    0.000000           0        14           setsockopt
  0.00    0.000000           0         2           getsockopt
  0.00    0.000000           0         2           epoll_wait
  0.00    0.000000           0         4           epoll_ctl
------ ----------- ----------- --------- --------- ----------------
100.00    0.004446                   355        14 total

nginx状态:
root     10839  5.7  1.1 153144 91428 ?        S    15:10   3:34 nginx: work
er process
root     10840  6.0  1.0 140676 82612 ?        S    15:10   3:44 nginx: work
er process
root     10841  5.7  1.0 144412 86080 ?        D    15:10   3:34 nginx: work
er process
root     10842  5.8  0.9 135428 77112 ?        S    15:10   3:37 nginx: work
er process
root     10843  5.9  1.0 145780 83380 ?        D    15:10   3:43 nginx: work
er process
root     11818  1.2  1.9 332380 159448 ?       D    15:14   0:43 nginx: work
er process
root     11819  1.2  2.0 339788 166888 ?       D    15:14   0:44 nginx: work
er process
root     11820  1.2  1.9 331148 156104 ?       D    15:14   0:42 nginx: work
er process
root     11821  1.3  1.9 331448 156388 ?       D    15:14   0:46 nginx: work
er process
root     11822  1.4  1.9 335668 162712 ?       D    15:14   0:50 nginx: work
er process
root     11823  1.3  1.9 336032 163148 ?       D    15:14   0:48 nginx: work
er process
root     11824  1.3  1.9 329228 156328 ?       D    15:14   0:47 nginx: work
er process
root     11825  1.3  1.9 332944 160024 ?       D    15:14   0:45 nginx: work
er process

论坛徽章:
0
2 [报告]
发表于 2014-07-25 19:45 |只看该作者
有人知道吗?

自己顶一下,谢谢了。

论坛徽章:
223
2022北京冬奥会纪念版徽章
日期:2015-08-10 16:30:32操作系统版块每日发帖之星
日期:2016-05-10 19:22:58操作系统版块每日发帖之星
日期:2016-02-18 06:20:00操作系统版块每日发帖之星
日期:2016-03-01 06:20:00操作系统版块每日发帖之星
日期:2016-03-02 06:20:0015-16赛季CBA联赛之上海
日期:2019-09-20 12:29:3219周年集字徽章-周
日期:2019-10-01 20:47:4815-16赛季CBA联赛之八一
日期:2020-10-23 18:30:5320周年集字徽章-20	
日期:2020-10-28 14:14:2615-16赛季CBA联赛之广夏
日期:2023-02-25 16:26:26CU十四周年纪念徽章
日期:2023-04-13 12:23:10操作系统版块每日发帖之星
日期:2016-05-10 19:22:58
3 [报告]
发表于 2014-07-27 19:20 |只看该作者
sendfile在做什么啊,bug的可能大些,估计应该不是被黑了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP