Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show-busy-java-threads support MacOS #33

Open
oldratlee opened this issue Jan 7, 2014 · 4 comments
Open

show-busy-java-threads support MacOS #33

oldratlee opened this issue Jan 7, 2014 · 4 comments

Comments

@oldratlee
Copy link
Owner

oldratlee commented Jan 7, 2014

  • Mac下使用解析命令行参数出错。Macgetopt不兼容GNU
    • 这个不是问题。自己手动来解析 来实现即可。
  • Macshow-busy-java-threads出错。Macps不兼容GNU
    • 比如 不支持 输出 线程ID(即 -L 选项)。
      • Mac下的ps-L是:
        List the set of keywords available for the -O and -o options.
@ghost ghost assigned oldratlee Jan 7, 2014
@undancer
Copy link

undancer commented Sep 11, 2014

同一个文件,head --lines "${count}"部分,Mac下应为 head -n "${count}"

@oldratlee oldratlee assigned oldratlee and unassigned oldratlee Dec 26, 2014
@AnonymMan
Copy link

AnonymMan commented Oct 13, 2015

ps -Leo pid,lwp,user,comm,pcpu --no-headersMac不兼容啊,怎么解决?

@oldratlee
Copy link
Owner Author

oldratlee commented Oct 14, 2015

@AnonymMan Macps命令没有支持,也没有找到其它的命令支持。


我去翻了过Mac的系统API,想写C程序来获取系统的

  • 线程ID
  • 及其CPU使用率

没有找到。


我到现在还没有找到解法, @AnonymMan 你看看有没有办法 ? 😄

@AnonymMan
Copy link

@oldratlee 我这暂时也没有想到什么好的办法。

@oldratlee oldratlee changed the title 兼容Mac show-busy-java-threads.sh 兼容Mac Oct 17, 2017
@oldratlee oldratlee added feature and removed bug labels Oct 17, 2017
@oldratlee oldratlee changed the title show-busy-java-threads.sh 兼容Mac show-busy-java-threads.sh 支持 Mac Mar 6, 2018
@oldratlee oldratlee pinned this issue Apr 20, 2019
@oldratlee oldratlee changed the title show-busy-java-threads.sh 支持 Mac show-busy-java-threads 支持 Mac Apr 20, 2019
@oldratlee oldratlee changed the title show-busy-java-threads 支持 Mac show-busy-java-threads support MacOS May 1, 2021
@oldratlee oldratlee unpinned this issue May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants