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

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

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

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