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

Executable names might be truncated (darwin, linux) #15

Open
gabriel opened this issue Jun 24, 2016 · 8 comments
Open

Executable names might be truncated (darwin, linux) #15

gabriel opened this issue Jun 24, 2016 · 8 comments

Comments

@gabriel
Copy link

gabriel commented Jun 24, 2016

Process names might be truncated on darwin, linux.

This fork here which has the full process executable path, uses filepath.Base(..) to get the full name:
https://github.com/keybase/go-ps

@mitchellh
Copy link
Owner

Looks great! Can you point me to where I should merge any changes?

@gabriel
Copy link
Author

gabriel commented Jun 28, 2016

You could create a pull request (or compare changes) and then pick and choose what changes you want? master...keybase:master

If you need, I could also prepare a pull-request which has these fixes (and adds more tests etc), but might be a week or so before I can get to it.

@conn
Copy link

conn commented May 16, 2019

Still confirming this as a problem. Do you need a hand?

Ran into a bug downstream with goss because of this.

@vipau
Copy link

vipau commented Jun 5, 2019

Thanks for pointing me to the fork, @gabriel .
BTW @mitchellh you have a pull request open for fixing this on OSX.
Regarding Linux, I think the issue is reading /proc/$pid/stat instead of /proc/$pid/cmdline

@meskio
Copy link

meskio commented Jul 8, 2019

I can confirm it does truncate the names in linux.

@evnix
Copy link

evnix commented Jul 14, 2019

Fix for now is to just import github.com/keybase/go-ps
@mitchellh seems to have abandoned this repo ☹️

@evnix
Copy link

evnix commented Jul 14, 2019

or use https://github.com/shirou/gopsutil

leap-code-o-matic pushed a commit to leapcode/bitmask-vpn that referenced this issue Apr 30, 2020
The old mitchellh go-ps is not maintained and it has an issue where it
truncates the process names:
mitchellh/go-ps#15

- Related: #152
Backerich added a commit to Backerich/go-ps that referenced this issue Aug 28, 2020
@ankurnigam
Copy link

do we have fix available for linux ? Are we going to merge it as I still see the same problem in github.com/mitchellh/go-ps ?

jilyaluk added a commit to jilyaluk/tailscale that referenced this issue Mar 31, 2023
Currently, on macOS Standonlone version if local client returns any
errors while tailscaled is running, cli would not print the error at
all, showing only that Tailscale might not be running.

Add tailscaled process name of macsys version, so that
fixTailscaledConnectError reports error correctly.

Contains workaround for go-ps bug which trims long process names (>16
characters): mitchellh/go-ps#15
jilyaluk added a commit to jilyaluk/tailscale that referenced this issue Mar 31, 2023
Currently, on macOS Standalone version if local client returns any
errors while tailscaled is running, cli would not print the error at
all, showing only that Tailscale might not be running.

Add tailscaled process name of macsys version, so that
fixTailscaledConnectError reports error correctly.

Contains workaround for go-ps bug which trims long process names (>16
characters): mitchellh/go-ps#15
jilyaluk added a commit to jilyaluk/tailscale that referenced this issue Mar 31, 2023
Currently, on macOS Standalone version if local client returns any
errors while tailscaled is running, cli would not print the error at
all, showing only that Tailscale might not be running.

Add tailscaled process name of macsys version, so that
fixTailscaledConnectError reports error correctly.

Contains workaround for go-ps bug which trims long process names (>16
characters): mitchellh/go-ps#15

Signed-off-by: Ilya Lukyanov <il@joom.com>
kalikaneko pushed a commit to leapcode/riseup-vpn-snap that referenced this issue Apr 21, 2024
The old mitchellh go-ps is not maintained and it has an issue where it
truncates the process names:
mitchellh/go-ps#15

- Related: #152
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

No branches or pull requests

7 participants