Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

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 ?

ilyaluk added a commit to ilyaluk/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
ilyaluk added a commit to ilyaluk/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
ilyaluk added a commit to ilyaluk/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 <[email protected]>
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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants