关于linux下strace疑问

肥多罗 2014-12-08 10:22:07
[root@localhost ~]# strace -c -p 3277
Process 3277 attached - interrupt to quit
Process 3277 detached
[root@localhost ~]#

如上,3277为进程ID,为查看不打调用花费的时间信息了呢,有知道的吗 谢谢
...全文
215 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
肥多罗 2014-12-13
  • 打赏
  • 举报
回复
嗯 确实需要停止被监测的进程才会出报告
引用 3 楼 micropentium6 的回复:
since you attach strace to a running process, you probably don't want to get the statistic report unless you don't mind to terminate that process. I guess that is what you refer to as "显示系统调用的花费时间". On command line, Generate Statistics Report of System Calls Using Option -c However, you could try Print Timestamp for Each Trace Output Line Using Option -t It may not give you any clue since -t only counts up to second. So try the following: Print Relative Time for System Calls Using Option -r
  • 打赏
  • 举报
回复
since you attach strace to a running process, you probably don't want to get the statistic report unless you don't mind to terminate that process. I guess that is what you refer to as "显示系统调用的花费时间". On command line, Generate Statistics Report of System Calls Using Option -c However, you could try Print Timestamp for Each Trace Output Line Using Option -t It may not give you any clue since -t only counts up to second. So try the following: Print Relative Time for System Calls Using Option -r
肥多罗 2014-12-09
  • 打赏
  • 举报
回复
我的问题是怎么没有显示系统调用的花费时间了 不是他的使用方法哦 你知道原因吗 谢谢
引用 1 楼 buyong 的回复:
http://www.cnblogs.com/ggjucheng/archive/2012/01/08/2316692.html
buyong 2014-12-08
  • 打赏
  • 举报
回复
http://www.cnblogs.com/ggjucheng/archive/2012/01/08/2316692.html

23,107

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧