Bug 241071
Summary: | Patch to speed up sos processing | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Karl Abbott <kabbott> | ||||
Component: | sos | Assignee: | Adam Stokes <astokes> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | |||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 5.0 | ||||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2009-06-08 17:23:07 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Karl Abbott
2007-05-23 21:07:19 UTC
Created attachment 155298 [details]
Patch for helpers.py that improves the performance of sos
stdout and stderr are separated because stderr is put in the sos log, and stdout goes into the report. But - It may be a good idea to combine them in the output to the report. Any errors while running commands should be of interest to whoever is looking at the report, and having errors buried in another log obscures them. I don't think that there was any compelling reason that they were separated in the first place. I agree, using popen unnecessarily complicates things. Committed to svn. -- Navid This seems to be unpatched in the latest svn trunk: https://hosted.fedoraproject.org/projects/sos/browser/trunk/src/lib/sos/helpers.py Was this intended or was this accidental? Hi Karl, I initially applied the patch in revision 200: https://hosted.fedoraproject.org/projects/sos/changeset/200 I later found it that it created problems with SELinux, generating a lot of warnings. I didn't have a chance to investigate this further, but for this reason I decided to go back to using popen in a similar way it is used from within commands.getstatusouput(): https://hosted.fedoraproject.org/projects/sos/changeset/307#file1 Later on, I implemented a timeout to allow the main thread to kill the process and continue (which is something we couldn't do with commands.getstatusoutput), this is very helpful especially on systems where we might end up with processes in D status: https://hosted.fedoraproject.org/projects/sos/changeset/390#file2 Honestly I haven't done any benchmarking, but as we are using a very similar code as in getstatusoutput() (which also uses popen), the execution speed should be fairly similar. Have you had a chance to try the code in trunk ? Thanks. -- Navid |