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

命令行提示符增加pid提示 #803

Merged
merged 2 commits into from
Aug 28, 2019
Merged

Conversation

iportman
Copy link
Contributor

@iportman iportman commented Aug 6, 2019

  1. 钉钉群里很多人反馈,进入arthas之后,sc无法看到项目中编写的类
  2. 最后发现启动时进入了错误的jvm进程
  3. 模仿bash,在提示符 $ 前增加pid信息,时刻知道自己在哪个进程里

@hengyunabc
Copy link
Collaborator

  • 这个问题,根本原因是 arthas目前用的是telnet协议,所以在 telnet连接上去时,不能传递pid信息,所以也没办法校验。

  • 在欢迎信息里其实已经打印出pid了。

  • 增加一个前缀显得比较啰嗦

所以暂时不考虑这个。


有一个办法是arthas listen端口之后,把相关信息写到一个文件里,然后要连接时,读取判断端口和进程是否对应。不过这个也有点烦琐。

@iportman
Copy link
Contributor Author

iportman commented Aug 7, 2019

其实在各种shell中都有类似的做法
bash

zsh

@hengyunabc
Copy link
Collaborator

改为 arthas@pid ,这样子的方式?感觉更形象一点。

@iportman
Copy link
Contributor Author

提示符样式已修改。
这个PR的核心关注点主要是:提示用户知道自己在哪,定位问题少绕弯路;样式小问题。

@hengyunabc hengyunabc merged commit baf41aa into alibaba:master Aug 28, 2019
@hengyunabc hengyunabc added this to the 3.1.2 milestone Aug 28, 2019
@iportman iportman deleted the prompt-modify branch August 29, 2019 01:16
lzc-alioo pushed a commit to lzc-alioo/arthas that referenced this pull request May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants