Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2009794

Summary: Add puma stats to foreman plugin
Product: Red Hat Enterprise Linux 7 Reporter: Pavel Moravec <pmoravec>
Component: sosAssignee: Jan Jansky <jjansky>
Status: CLOSED DUPLICATE QA Contact: Upgrades and Supportability <upgrades-and-supportability>
Severity: high Docs Contact:
Priority: high    
Version: 7.9CC: agk, bmr, fkrska, mhulan, plambri, pmoravec, sbradley, theute
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-05 07:22:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pavel Moravec 2021-10-01 15:23:43 UTC
Description of problem:
As Satellite6 migrated from passenger to puma, we should collect puma related stats / status. Elaborating over https://community.theforeman.org/t/foreman-application-server-puma-status-monitoring/23154 :

1) pumactl stats -S /usr/share/foreman/tmp/puma.state
(on RHEL7, call scl enable tfm '....' instead - can be one add_cmd_output only)

2) pumactl gc-stats -S /usr/share/foreman/tmp/puma.state
does that provide some valuable info for debugging, or is it too verbose data?

3) /usr/sbin/foreman-puma-status 
nice overview with a load and # of past requests per worker

4) is there an equivalent of "passenger-status --show=requests"? (such we can add all commands altogether)


Version-Release number of selected component (if applicable):
sos-3.9-*


How reproducible:
100%


Steps to Reproduce:
1. on Sat6.9+, run "sosreport -o foreman --batch"
2. Check if the puma status / stats commands outputs were collected


Actual results:
Not collected ATM.


Expected results:
To be collected.


Additional info:

Comment 3 Pavel Moravec 2021-10-01 15:28:13 UTC
Hi Marek,
could you please:

- decide / justify if the gc-stats is required? I dont see when such data can be important, for what kind of troubleshooting purposes.
- provide an equivalent command of "passenger-status --show=requests" for puma (if/once it is available, I know it is/was being implemented; it is OK to collect a command that is in upstream so far and will occur in downstream after a while - missing commands are skipped by sos)

Comment 4 Marek Hulan 2021-10-04 10:06:11 UTC
The gc stats would only be useful when debugging some memory consumption issues, we probably don't need that in every sos-report. Btw you mentioned somewhere you don't know what data it gives. See if this would be useful source of information https://www.speedshop.co/2017/03/09/a-guide-to-gc-stat.html

The command to see the workers stats is /usr/sbin/foreman-puma-status and will be present starting with 6.10. That will at least answer the question, how many workers are configured to be running and can also give a quick indication of their load. If they are overloaded, adding more workers may help. See the up to date write up at https://community.theforeman.org/t/foreman-application-server-puma-status-monitoring/23154/13

Comment 5 Pavel Moravec 2021-10-04 14:01:03 UTC
Raised upstream https://github.com/sosreport/sos/pull/2712 (which will need to be backported to legacy-3.9 branch there, first).

Comment 6 Pavel Moravec 2021-10-05 07:22:18 UTC
As a homework, I should hand-write 100 times "check for duplicates before filing a bug".

*** This bug has been marked as a duplicate of bug 2007272 ***