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

[process] Add output of 'ps auxfwww' #3707

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jcastill
Copy link
Member

Add output of 'ps auxfwww'

Resolves: #3706


Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines

  • Is the commit message split over multiple lines and hard-wrapped at 72 characters?
  • Is the subject and message clear and concise?
  • Does the subject start with [plugin_name] if submitting a plugin patch or a [section_name] if part of the core sosreport code?
  • Does the commit contain a Signed-off-by: First Lastname [email protected]?
  • Are any related Issues or existing PRs properly referenced via a Closes (Issue) or Resolved (PR) line?
  • Are all passwords or private data gathered by this PR obfuscated?

Add output of 'ps auxfwww'

Resolves: sosreport#3706

Signed-off-by: Jose Castillo <[email protected]>
Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/sosreport-sos-3707
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@pmoravec
Copy link
Contributor

Not sure where to discuss the issue/PR, if here or in #3706 .

sos report already collects the info in both ps alxwww and ps -elfL outputs, where parent PID is included. Just the "pstree-like visualisation" is missing there. That is, however, collected in pstree -lp output.

Can't combination of pstree and current ps * outputs suffice? I am torn apart: on one side we should not repeatedly collect the same data as that redundantly slows down each and every sos report execution. On the other side it helps visualisation of running processes.

@jcastill
Copy link
Member Author

@casantos mentioned in the RFE that:

The “forest” output helps debugging problems in GUI sessions and services launched via systemd.

I take it that the current outputs don't help in these specific cases, but maybe he can offer a specific example where or why the current captures don't help.

@casantos
Copy link

casantos commented Jul 26, 2024

@casantos mentioned in the RFE that:

The “forest” output helps debugging problems in GUI sessions and services launched via systemd.

I take it that the current outputs don't help in these specific cases, but maybe he can offer a specific example where or why the current captures don't help.

Here are two examples, using a GNOME session running through a VNC service.

  1. Without forest mode:
# ps auxwww | grep -B1 ^vncuser1
root       53757  0.0  0.0  84432   480 ?        S    16:38   0:00 /usr/sbin/vncsession vncuser1 :1
vncuser1   53762  0.1  0.1  89708  2908 ?        Ss   16:38   0:00 /usr/lib/systemd/systemd --user
vncuser1   53765  0.0  0.0 301056   936 ?        S    16:38   0:00 (sd-pam)
vncuser1   53776  0.0  0.1 1032396 2860 ?        Ssl  16:38   0:00 /usr/bin/pulseaudio --daemonize=no --log-target=journal
vncuser1   53779  0.0  0.0  14064     0 ?        S    16:38   0:00 xinit /etc/X11/xinit/Xsession gnome-session -- /usr/bin/Xvnc :1 -auth /home/vncuser1/.Xauthority -desktop rhel-8-4:1 (vncuser1) -fp catalogue:/etc/X11/fontpath.d -pn -rfbauth /home/vncuser1/.vnc/passwd -rfbport 5901
vncuser1   53787  0.8  0.5 272704  9480 ?        S    16:38   0:00 /usr/bin/Xvnc :1 -auth /home/vncuser1/.Xauthority -desktop rhel-8-4:1 (vncuser1) -fp catalogue:/etc/X11/fontpath.d -pn -rfbauth /home/vncuser1/.vnc/passwd -rfbport 5901
vncuser1   53793  0.1  0.2 868656  4736 ?        Ssl  16:38   0:00 /usr/libexec/gnome-session-binary
vncuser1   53805  0.1  0.1  65216  3160 ?        Ssl  16:38   0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
vncuser1   53872  0.0  0.1 372244  3396 ?        Ssl  16:38   0:00 /usr/libexec/at-spi-bus-launcher
vncuser1   53879  0.0  0.1  64428  2200 ?        Sl   16:38   0:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
vncuser1   53884  0.0  0.2 248748  3860 ?        Sl   16:38   0:00 /usr/libexec/at-spi2-registryd --use-gnome-session
vncuser1   53918  0.0  0.1 516976  2188 ?        Sl   16:38   0:00 /usr/bin/gnome-keyring-daemon --start --components=pkcs11
vncuser1   53926  2.6  4.3 3358256 79240 ?       Sl   16:38   0:01 /usr/bin/gnome-shell
vncuser1   53941  0.0  0.2 522804  3608 ?        Ssl  16:38   0:00 /usr/libexec/gvfsd
vncuser1   53946  0.0  0.1 379816  3188 ?        Sl   16:38   0:00 /usr/libexec/gvfsd-fuse /run/user/10001/gvfs -f -o big_writes
vncuser1   53957  0.0  0.2 662796  4288 ?        Sl   16:38   0:00 ibus-daemon --xim --panel disable
vncuser1   53961  0.0  0.1 512576  2912 ?        Sl   16:38   0:00 /usr/libexec/ibus-dconf
vncuser1   53963  0.7  0.2 666016  3832 ?        Sl   16:38   0:00 /usr/libexec/ibus-extension-gtk3
vncuser1   53964  0.0  0.1 503472  3192 ?        Ssl  16:38   0:00 /usr/libexec/xdg-permission-store
vncuser1   53967  0.0  0.2 583692  4416 ?        Sl   16:38   0:00 /usr/libexec/ibus-x11 --kill-daemon
vncuser1   53972  0.0  0.1 512576  3052 ?        Sl   16:38   0:00 /usr/libexec/ibus-portal
vncuser1   53985  0.0  0.2 687728  4568 ?        Sl   16:38   0:00 /usr/libexec/gnome-shell-calendar-server
vncuser1   53991  0.0  0.2 897948  5372 ?        Ssl  16:38   0:00 /usr/libexec/evolution-source-registry
vncuser1   54001  0.0  0.2 1043556 4604 ?        Sl   16:38   0:00 /usr/libexec/goa-daemon
vncuser1   54015  0.0  0.1 652380  2164 ?        Sl   16:38   0:00 /usr/libexec/goa-identity-service
vncuser1   54026  0.0  0.1 611608  3248 ?        Ssl  16:38   0:00 /usr/libexec/gvfs-udisks2-volume-monitor
vncuser1   54033  0.0  0.1 510544  2984 ?        Ssl  16:38   0:00 /usr/libexec/gvfs-mtp-volume-monitor
vncuser1   54037  0.0  0.1 523248  2920 ?        Ssl  16:38   0:00 /usr/libexec/gvfs-gphoto2-volume-monitor
vncuser1   54041  0.0  0.2 508252  3604 ?        Ssl  16:38   0:00 /usr/libexec/gvfs-goa-volume-monitor
vncuser1   54045  0.0  0.1 591236  3484 ?        Ssl  16:38   0:00 /usr/libexec/gvfs-afc-volume-monitor
vncuser1   54052  0.1  0.2 822624  4780 ?        Sl   16:38   0:00 /usr/libexec/gsd-power
vncuser1   54053  0.0  0.2 563344  3928 ?        Sl   16:38   0:00 /usr/libexec/gsd-print-notifications
vncuser1   54055  0.0  0.1 657816  2460 ?        Sl   16:38   0:00 /usr/libexec/gsd-rfkill
vncuser1   54058  0.0  0.1 505564  2664 ?        Sl   16:38   0:00 /usr/libexec/gsd-screensaver-proxy
vncuser1   54063  0.0  0.1 661740  2944 ?        Sl   16:38   0:00 /usr/libexec/gsd-sharing
vncuser1   54068  0.0  0.1 576996  3508 ?        Sl   16:38   0:00 /usr/libexec/gsd-sound
vncuser1   54069  0.1  0.2 660312  4524 ?        Sl   16:38   0:00 /usr/libexec/gsd-xsettings
vncuser1   54073  0.1  0.2 664076  4512 ?        Sl   16:38   0:00 /usr/libexec/gsd-wacom
vncuser1   54076  0.0  0.1 684308  3008 ?        Sl   16:38   0:00 /usr/libexec/gsd-smartcard
vncuser1   54078  0.0  0.1 591912  3332 ?        Sl   16:38   0:00 /usr/libexec/gsd-account
vncuser1   54081  0.0  0.4 661348  8508 ?        Sl   16:38   0:00 /usr/libexec/gsd-subman
vncuser1   54085  0.0  0.2 1050160 4712 ?        Ssl  16:38   0:00 /usr/libexec/evolution-calendar-factory
vncuser1   54095  0.0  0.1 507820  3312 ?        Sl   16:38   0:00 /usr/libexec/gsd-a11y-settings
vncuser1   54098  0.0  0.2 583260  4532 ?        Sl   16:38   0:00 /usr/libexec/gsd-clipboard
vncuser1   54105  0.1  0.2 896836  4368 ?        Sl   16:38   0:00 /usr/libexec/gsd-color
vncuser1   54108  0.0  0.1 438904  2776 ?        Sl   16:38   0:00 /usr/libexec/ibus-engine-simple
vncuser1   54111  0.0  0.2 669836  4016 ?        Sl   16:38   0:00 /usr/libexec/gsd-datetime
vncuser1   54112  0.0  0.1 598360  3088 ?        Sl   16:38   0:00 /usr/libexec/gsd-housekeeping
vncuser1   54113  0.0  0.2 1407796 4376 ?        Sl   16:38   0:00 /usr/libexec/evolution-calendar-factory-subprocess --factory all --bus-name org.gnome.evolution.dataserver.Subprocess.Backend.Calendarx54085x2 --own-path /org/gnome/evolution/dataserver/Subprocess/Backend/Calendar/54085/2
vncuser1   54121  0.0  0.2 732980  4824 ?        Sl   16:38   0:00 /usr/libexec/gsd-keyboard
vncuser1   54124  0.1  0.2 1321728 4492 ?        Sl   16:38   0:00 /usr/libexec/gsd-media-keys
vncuser1   54125  0.0  0.1 507956  3264 ?        Sl   16:38   0:00 /usr/libexec/gsd-mouse
vncuser1   54144  0.0  0.1 727596  2980 ?        Sl   16:38   0:00 /usr/libexec/gsd-printer
vncuser1   54178  0.0  0.1 214928  3008 ?        Sl   16:38   0:00 /usr/libexec/dconf-service
vncuser1   54179  0.0  0.2 1036700 5176 ?        Ssl  16:38   0:00 /usr/libexec/evolution-addressbook-factory
vncuser1   54201  0.1  0.7 766452 13456 ?        Ssl  16:38   0:00 /usr/libexec/tracker-store
vncuser1   54204  2.7  5.0 1354432 91668 ?       Sl   16:38   0:01 /usr/bin/gnome-software --gapplication-service
vncuser1   54208  0.0  0.1 301376  3468 ?        Sl   16:38   0:00 /usr/libexec/gsd-disk-utility-notify
vncuser1   54226  0.0  0.2 832700  4312 ?        SNl  16:38   0:00 /usr/libexec/tracker-miner-apps
vncuser1   54227  0.1  0.3 850408  5436 ?        SNl  16:38   0:00 /usr/libexec/tracker-miner-fs
vncuser1   54237  0.0  0.5 1319224 9664 ?        Sl   16:38   0:00 /usr/libexec/evolution-addressbook-factory-subprocess --factory all --bus-name org.gnome.evolution.dataserver.Subprocess.Backend.AddressBookx54179x2 --own-path /org/gnome/evolution/dataserver/Subprocess/Backend/AddressBook/54179/2
  1. With forest mode:
# ps auxfwww | grep -B1 ^vncuser1
root       53757  0.0  0.0  84432   480 ?        S    16:38   0:00 /usr/sbin/vncsession vncuser1 :1
vncuser1   53779  0.0  0.0  14064     0 ?        S    16:38   0:00  \_ xinit /etc/X11/xinit/Xsession gnome-session -- /usr/bin/Xvnc :1 -auth /home/vncuser1/.Xauthority -desktop rhel-8-4:1 (vncuser1) -fp catalogue:/etc/X11/fontpath.d -pn -rfbauth /home/vncuser1/.vnc/passwd -rfbport 5901
vncuser1   53787  0.1  0.4 273216  8960 ?        S    16:38   0:00      \_ /usr/bin/Xvnc :1 -auth /home/vncuser1/.Xauthority -desktop rhel-8-4:1 (vncuser1) -fp catalogue:/etc/X11/fontpath.d -pn -rfbauth /home/vncuser1/.vnc/passwd -rfbport 5901
vncuser1   53793  0.0  0.1 868656  3468 ?        Ssl  16:38   0:00      \_ /usr/libexec/gnome-session-binary
vncuser1   53926  0.5  4.3 3358300 78404 ?       Sl   16:38   0:01          \_ /usr/bin/gnome-shell
vncuser1   53957  0.0  0.1 662796  2344 ?        Sl   16:38   0:00          |   \_ ibus-daemon --xim --panel disable
vncuser1   53961  0.0  0.0 512576  1676 ?        Sl   16:38   0:00          |       \_ /usr/libexec/ibus-dconf
vncuser1   53963  0.1  0.1 666016  2020 ?        Sl   16:38   0:00          |       \_ /usr/libexec/ibus-extension-gtk3
vncuser1   54108  0.0  0.0 438904  1496 ?        Sl   16:38   0:00          |       \_ /usr/libexec/ibus-engine-simple
vncuser1   54052  0.0  0.1 822624  3220 ?        Sl   16:38   0:00          \_ /usr/libexec/gsd-power
vncuser1   54053  0.0  0.1 563344  2288 ?        Sl   16:38   0:00          \_ /usr/libexec/gsd-print-notifications
vncuser1   54055  0.0  0.0 657816  1176 ?        Sl   16:38   0:00          \_ /usr/libexec/gsd-rfkill
vncuser1   54058  0.0  0.0 505564  1464 ?        Sl   16:38   0:00          \_ /usr/libexec/gsd-screensaver-proxy
vncuser1   54063  0.0  0.0 661740  1748 ?        Sl   16:38   0:00          \_ /usr/libexec/gsd-sharing
vncuser1   54068  0.0  0.1 576996  2052 ?        Sl   16:38   0:00          \_ /usr/libexec/gsd-sound
vncuser1   54069  0.0  0.1 660312  2768 ?        Sl   16:38   0:00          \_ /usr/libexec/gsd-xsettings
vncuser1   54073  0.0  0.1 664076  2776 ?        Sl   16:38   0:00          \_ /usr/libexec/gsd-wacom
vncuser1   54076  0.0  0.0 684308  1564 ?        Sl   16:38   0:00          \_ /usr/libexec/gsd-smartcard
vncuser1   54078  0.0  0.1 591912  2052 ?        Sl   16:38   0:00          \_ /usr/libexec/gsd-account
vncuser1   54081  0.0  0.2 661348  3888 ?        Sl   16:38   0:00          \_ /usr/libexec/gsd-subman
vncuser1   54095  0.0  0.1 507820  2064 ?        Sl   16:38   0:00          \_ /usr/libexec/gsd-a11y-settings
vncuser1   54098  0.0  0.1 583260  2768 ?        Sl   16:38   0:00          \_ /usr/libexec/gsd-clipboard
vncuser1   54105  0.0  0.2 896836  4640 ?        Sl   16:38   0:00          \_ /usr/libexec/gsd-color
vncuser1   54111  0.0  0.1 669836  2376 ?        Sl   16:38   0:00          \_ /usr/libexec/gsd-datetime
vncuser1   54112  0.0  0.1 598504  2936 ?        Sl   16:38   0:00          \_ /usr/libexec/gsd-housekeeping
vncuser1   54121  0.0  0.1 732980  3092 ?        Sl   16:38   0:00          \_ /usr/libexec/gsd-keyboard
vncuser1   54124  0.0  0.1 1321728 2892 ?        Sl   16:38   0:00          \_ /usr/libexec/gsd-media-keys
vncuser1   54125  0.0  0.1 507956  2040 ?        Sl   16:38   0:00          \_ /usr/libexec/gsd-mouse
vncuser1   54204  0.9  3.7 1338552 66900 ?       Sl   16:38   0:01          \_ /usr/bin/gnome-software --gapplication-service
vncuser1   54208  0.0  0.1 301376  2372 ?        Sl   16:38   0:00          \_ /usr/libexec/gsd-disk-utility-notify
vncuser1   54226  0.0  0.1 832700  2356 ?        SNl  16:38   0:00          \_ /usr/libexec/tracker-miner-apps
vncuser1   54227  0.0  0.1 850408  2960 ?        SNl  16:38   0:00          \_ /usr/libexec/tracker-miner-fs
vncuser1   53762  0.0  0.2  89708  3668 ?        Ss   16:38   0:00 /usr/lib/systemd/systemd --user
vncuser1   53765  0.0  0.0 301056   436 ?        S    16:38   0:00  \_ (sd-pam)
vncuser1   53776  0.0  0.0 1032396 1448 ?        Ssl  16:38   0:00  \_ /usr/bin/pulseaudio --daemonize=no --log-target=journal
vncuser1   53805  0.0  0.1  65216  2272 ?        Ssl  16:38   0:00  \_ /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
vncuser1   53872  0.0  0.1 372244  2092 ?        Ssl  16:38   0:00  \_ /usr/libexec/at-spi-bus-launcher
vncuser1   53879  0.0  0.0  64428  1348 ?        Sl   16:38   0:00  |   \_ /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
vncuser1   53884  0.0  0.1 248748  2216 ?        Sl   16:38   0:00  \_ /usr/libexec/at-spi2-registryd --use-gnome-session
vncuser1   53941  0.0  0.1 522804  1936 ?        Ssl  16:38   0:00  \_ /usr/libexec/gvfsd
vncuser1   53946  0.0  0.1 379816  2024 ?        Sl   16:38   0:00  \_ /usr/libexec/gvfsd-fuse /run/user/10001/gvfs -f -o big_writes
vncuser1   53964  0.0  0.1 503472  1848 ?        Ssl  16:38   0:00  \_ /usr/libexec/xdg-permission-store
vncuser1   53972  0.0  0.0 512576  1708 ?        Sl   16:38   0:00  \_ /usr/libexec/ibus-portal
vncuser1   53985  0.0  0.1 687728  2444 ?        Sl   16:38   0:00  \_ /usr/libexec/gnome-shell-calendar-server
vncuser1   53991  0.0  0.1 897948  2740 ?        Ssl  16:38   0:00  \_ /usr/libexec/evolution-source-registry
vncuser1   54001  0.0  0.1 1043556 2576 ?        Sl   16:38   0:00  \_ /usr/libexec/goa-daemon
vncuser1   54015  0.0  0.1 652380  2068 ?        Sl   16:38   0:00  \_ /usr/libexec/goa-identity-service
vncuser1   54026  0.0  0.0 611608  1464 ?        Ssl  16:38   0:00  \_ /usr/libexec/gvfs-udisks2-volume-monitor
vncuser1   54033  0.0  0.0 510544  1424 ?        Ssl  16:38   0:00  \_ /usr/libexec/gvfs-mtp-volume-monitor
vncuser1   54037  0.0  0.0 523248  1520 ?        Ssl  16:38   0:00  \_ /usr/libexec/gvfs-gphoto2-volume-monitor
vncuser1   54041  0.0  0.1 508252  2380 ?        Ssl  16:38   0:00  \_ /usr/libexec/gvfs-goa-volume-monitor
vncuser1   54045  0.0  0.1 591236  2244 ?        Ssl  16:38   0:00  \_ /usr/libexec/gvfs-afc-volume-monitor
vncuser1   54085  0.0  0.1 1050160 2752 ?        Ssl  16:38   0:00  \_ /usr/libexec/evolution-calendar-factory
vncuser1   54113  0.0  0.1 1407796 2516 ?        Sl   16:38   0:00  |   \_ /usr/libexec/evolution-calendar-factory-subprocess --factory all --bus-name org.gnome.evolution.dataserver.Subprocess.Backend.Calendarx54085x2 --own-path /org/gnome/evolution/dataserver/Subprocess/Backend/Calendar/54085/2
vncuser1   54178  0.0  0.1 214928  2384 ?        Sl   16:38   0:00  \_ /usr/libexec/dconf-service
vncuser1   54179  0.0  0.1 1036700 2764 ?        Ssl  16:38   0:00  \_ /usr/libexec/evolution-addressbook-factory
vncuser1   54237  0.0  0.1 1319224 2996 ?        Sl   16:38   0:00  |   \_ /usr/libexec/evolution-addressbook-factory-subprocess --factory all --bus-name org.gnome.evolution.dataserver.Subprocess.Backend.AddressBookx54179x2 --own-path /org/gnome/evolution/dataserver/Subprocess/Backend/AddressBook/54179/2
vncuser1   54201  0.0  0.2 766452  5016 ?        Ssl  16:38   0:00  \_ /usr/libexec/tracker-store
vncuser1   53918  0.0  0.0 516976  1664 ?        Sl   16:38   0:00 /usr/bin/gnome-keyring-daemon --start --components=pkcs11
vncuser1   53967  0.0  0.1 583692  2568 ?        Sl   16:38   0:00 /usr/libexec/ibus-x11 --kill-daemon
vncuser1   54144  0.0  0.0 727596  1328 ?        Sl   16:38   0:00 /usr/libexec/gsd-printer

It is much easier to identify what processs belong to systemd service (vncsession children) and what processes belong to the systemd user service (systemd --user children). This is extremely helpful to analyze GUI sessions.

@pmoravec
Copy link
Contributor

sos report already collects pstree -lp that provides the forest-like output. Isn't that sufficient for such analysis?

We should not extend the current command by the forest option, since there are tools analysing the current output and they would be broken (as they expect binary / cmd name as 11th word in a line). We can add a new ps *f* command output (with whatever options would be suitable).

Pros: users investigating GUI issues will see process details in forest-like view more easily (no need to merge outputs of other ps and pstree cmd outputs)

Negs: one extra command to execute on every sos report run, collecting no new data.

@TurboTurtle and @arif-ali , what is your opinion? I am on torn..

@casantos
Copy link

sos report already collects pstree -lp that provides the forest-like output. Isn't that sufficient for such analysis?

pstree does not identify the process user owner.

We should not extend the current command by the forest option, since there are tools analysing the current output and they would be broken (as they expect binary / cmd name as 11th word in a line). We can add a new ps *f* command output (with whatever options would be suitable).

I agree. A new ps *f* output makes more sense.

Pros: users investigating GUI issues will see process details in forest-like view more easily (no need to merge outputs of other ps and pstree cmd outputs)

Negs: one extra command to execute on every sos report run, collecting no new data.

@TurboTurtle and @arif-ali , what is your opinion? I am on torn..

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

Successfully merging this pull request may close these issues.

[RFE] add the output of “ps auxfwww” to the report
3 participants