Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1450059 Details for
Bug 1399206
ps sometimes does not show path to process executable
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Enhancement proposed to upstream
ps-exe-format-option.patch (text/plain), 1.92 KB, created by
Jan Rybar
on 2018-06-11 14:16:07 UTC
(
hide
)
Description:
Enhancement proposed to upstream
Filename:
MIME Type:
Creator:
Jan Rybar
Created:
2018-06-11 14:16:07 UTC
Size:
1.92 KB
patch
obsolete
>diff --git a/ps/output.c b/ps/output.c >index e718f19..bad4f83 100644 >--- a/ps/output.c >+++ b/ps/output.c >@@ -1250,6 +1250,26 @@ static int pr_luid(char *restrict const outbuf, const proc_t *restrict const pp) > } > > >+/* full path to executable */ >+static int pr_exe(char *restrict const outbuf, const proc_t *restrict const pp){ >+ char filename[48]; >+ ssize_t num_read = 0; >+ >+ snprintf(filename, sizeof filename, "/proc/%d/exe", pp->tgid); >+ >+ num_read = readlink(filename, outbuf, OUTBUF_SIZE-1); >+ if (num_read > 0) { >+ outbuf[num_read] = '\0'; >+ } >+ else { >+ outbuf[0] = '-'; >+ outbuf[1] = '\0'; >+ num_read = 1; >+ } >+ >+ return num_read; >+} >+ > /************************* Systemd stuff ********************************/ > static int pr_sd_unit(char *restrict const outbuf, const proc_t *restrict const pp){ > return snprintf(outbuf, COLWID, "%s", pp->sd_unit); >@@ -1533,6 +1553,7 @@ static const format_struct format_array[] = { > {"etimes", "ELAPSED", pr_etimes, sr_etime, 7, 0, BSD, ET|RIGHT}, /* FreeBSD */ > {"euid", "EUID", pr_euid, sr_euid, 5, 0, LNX, ET|RIGHT}, > {"euser", "EUSER", pr_euser, sr_euser, 8, USR, LNX, ET|USER}, >+{"exe", "EXE", pr_exe, sr_nop, 27, 0, LNX, PO|UNLIMITED}, > {"f", "F", pr_flag, sr_flags, 1, 0, XXX, ET|RIGHT}, /*flags*/ > {"fgid", "FGID", pr_fgid, sr_fgid, 5, 0, LNX, ET|RIGHT}, > {"fgroup", "FGROUP", pr_fgroup, sr_fgroup, 8, GRP, LNX, ET|USER}, >diff --git a/ps/ps.1 b/ps/ps.1 >index b358d2f..a230f2e 100644 >--- a/ps/ps.1 >+++ b/ps/ps.1 >@@ -1249,6 +1249,14 @@ option can be used to force the decimal representation. (alias > .BR uname ", " user ). > T} > >+exe EXE T{ >+path to the executable. Useful if path cannot be printed via >+.BR cmd ", " comm >+or >+.BR args >+format options. >+T} >+ > f F T{ > flags associated with the process, see the > .B PROCESS FLAGS
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1399206
: 1450059