Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
mantianyu
V2EX  ›  Linux

有没有办法能够监控某一进程下的各个线程的运行情况? 以及, 能不能获得这个线程打开的文件描述符的详细信息, 比如对应的文件名, 端口号等?

  •  
  •   mantianyu · May 23, 2014 · 3479 views
    This topic created in 4403 days ago, the information mentioned may be changed or developed.
    第一个问题, 我之前用 strace, 不过好像它不能跟踪线程啊. 当一个进程下有多个线程时, strace 貌似只能跟踪主线程....
    5 replies    2014-05-27 14:11:53 +08:00
    est
        1
    est  
       May 23, 2014
    strace -f
    mantianyu
        2
    mantianyu  
    OP
       May 23, 2014
    @est 多谢多谢~

    不知第二个问题有没有解?
    topkyo
        3
    topkyo  
       May 23, 2014
    lsof -h
    gfreezy
        4
    gfreezy  
       May 24, 2014
    /proc/<pid>/xxx
    favormm
        5
    favormm  
       May 27, 2014
    正好我有用
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   958 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 19:15 · PVG 03:15 · LAX 12:15 · JFK 15:15
    ♥ Do have faith in what you're doing.