-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Process cmdline is truncated on Solaris #694
Comments
I don't like parsing pargs. Instead we should figure out how pargs determines the full cmdline. |
Me neither, but it was really a quick-fix. |
@alxchk I think I lost track on this. Was this fixed? |
@alxchk Care to elaborate whether your fork fixes the problem of truncated command line on Solaris? |
@gozdal , the implementation used in the fork and now included upstream should fix the truncating as the code directly reads the argv from the address-space of the running process, cf.: https://github.com/giampaolo/psutil/blob/master/psutil/arch/solaris/environ.c#L287-L299 That means this avoids the truncating processes your user has enough permissions to look into their address space. |
@gsauthof O, great, I guess this issue is now solved. |
p.cmdline()
is truncated to 80 characters on Solaris 11./proc/PID/psinfo
that psutil uses to read the command line contains only the beginning - See e.g. https://unix.stackexchange.com/questions/3934/how-can-i-get-a-full-process-list-in-solaris-without-truncated-lines.The solution would be to use the same method as
pargs
tool - https://github.com/illumos/illumos-gate/blob/09f79f7c66b85f056db11f58210dc6182c9b1aef/usr/src/cmd/ptools/pargs/pargs.c. It's not however clear to me how can it be easily ported as it's usinglibproc
, which is documented in https://github.com/illumos/illumos-gate/blob/09f79f7c66b85f056db11f58210dc6182c9b1aef/usr/src/lib/libproc/common/libproc.h as:As a workaround
cmdline()
could try to launchpargs
if available but it bears afork
cost.Didn't test any other Solaris version.
The text was updated successfully, but these errors were encountered: