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 155298 Details for
Bug 241071
Patch to speed up sos processing
[?]
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]
Patch for helpers.py that improves the performance of sos
helpers.py.speed-boost.patch (text/plain), 1.83 KB, created by
Karl Abbott
on 2007-05-23 21:07:19 UTC
(
hide
)
Description:
Patch for helpers.py that improves the performance of sos
Filename:
MIME Type:
Creator:
Karl Abbott
Created:
2007-05-23 21:07:19 UTC
Size:
1.83 KB
patch
obsolete
>--- helpers.py.old 2007-05-23 06:38:35.000000000 -0400 >+++ helpers.py 2007-05-23 06:40:11.000000000 -0400 >@@ -25,7 +25,7 @@ > """ > helper functions used by sosreport and plugins > """ >-import os, popen2, fcntl, select, itertools, sys >+import os, popen2, fcntl, select, itertools, sys, commands > from tempfile import mkdtemp > > def importPlugin(pluginname, name): >@@ -60,36 +60,9 @@ > """ Execute a command and gather stdin, stdout, and return status. > Adapted from Python Cookbook - O'Reilly > """ >- child = popen2.Popen3(command, 1) # Capture stdout and stderr from command >- child.tochild.close() # don't need to write to child's stdin >- outfile = child.fromchild >- outfd = outfile.fileno() >- errfile = child.childerr >- errfd = errfile.fileno() >- makeNonBlocking(outfd) # Don't deadlock! Make fd's nonblocking. >- makeNonBlocking(errfd) >- outdata, errdata = [], [] >- outeof = erreof = False >- while True: >- to_check = [outfd]*(not outeof) + [errfd]*(not erreof) >- ready = select.select(to_check, [], []) # Wait for input >- if outfd in ready[0]: >- outchunk = outfile.read() >- if outchunk == '': >- outeof = True >- else: >- outdata.append(outchunk) >- if errfd in ready[0]: >- errchunk = errfile.read() >- if errchunk == '': >- erreof = True >- else: >- errdata.append(errchunk) >- if outeof and erreof: >- break >- select.select([], [], [], .1) # Allow a little time for buffers to fill >- err = child.wait() >- return (err, ''.join(outdata), ''.join(errdata)) >+ status,outdata=commands.getstatusoutput(command) >+ return (status,''.join(outdata),''.join(outdata)) >+ > > > # this needs to be made clean and moved to the plugin tools, so
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 241071
: 155298