Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

top is broken in Linux #42

Closed
kkonstantine opened this issue Aug 16, 2017 · 4 comments
Closed

top is broken in Linux #42

kkonstantine opened this issue Aug 16, 2017 · 4 comments
Labels

Comments

@kkonstantine
Copy link
Member

There's a stray comma that does not allow top to run on certain linux distros for all the services.
Also a check for empty pid needs to be added.

@gwenshap
Copy link

👍

@vthot4
Copy link

vthot4 commented Sep 11, 2017

I imagine that there will be better ways but I have solved with these lines:

top_pid=echo $pids| sed 's/.$//g'
top -p "$top_pid"

@kkonstantine
Copy link
Member Author

Hi @vthot4, thanks so much for checking this out and suggesting a fix!
Allow me to encourage you to go ahead and directly issue a PR next time you have a similar suggestion. All of us will be thrilled! :)

Since the above had a minor issue of not catching multiple commas (the original bug could produce ,,,,, as well) I went ahead and issued a different patch which is also pretty brief.

Feel free to check it out and even try it from here: #45

@kkonstantine
Copy link
Member Author

Fixed by: #45

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants