Bug 478009 - To add a sosplugin to collect soundcard related information
Summary: To add a sosplugin to collect soundcard related information
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sos
Version: 5.5
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Adam Stokes
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks: 557292
TreeView+ depends on / blocked
 
Reported: 2008-12-27 07:27 UTC by Vimal Kumar
Modified: 2012-11-02 18:31 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 08:07:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
soundcard.py (1.30 KB, application/octet-stream)
2008-12-27 07:27 UTC, Vimal Kumar
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0201 0 normal SHIPPED_LIVE sosreport bug fix and enhancement update 2010-03-29 12:26:44 UTC

Description Vimal Kumar 2008-12-27 07:27:17 UTC
Created attachment 327878 [details]
soundcard.py

1 ) Description of problem:
------------------------------

It would be very helpful if we have a sos-plugin to gather the information on sound cards from the machine. Many a time, we have to request this information separately and this leads to the delay in the case resolution.

2 ) How reproducible:
------------------------

Currently there are no sos plugins to extract details on soundcards.

3 ) Steps to Reproduce:
----------------------------

a) Create a new file named 'soundcard.py' in the sos plugins directory '/usr/lib/python2.4/site-packages/sos/plugins/'.

b) Add the following content in the file 'soundcard.py' :

<snip>
import sos.plugintools
import commands
import os

class soundcard(sos.plugintools.PluginBase):
    """ Sound card information
    """

    def setup(self):
        self.addCopySpec("/proc/asound/*")
        self.addCopySpec("/etc/alsa/*")
        self.addCopySpec("/etc/asound.*")
        self.collectExtOutput("/sbin/lspci | grep -i audio")
        self.collectExtOutput("/usr/bin/aplay -l")
        self.collectExtOutput("/usr/bin/aplay -L")
        self.collectExtOutput("/usr/bin/amixer")
        self.collectExtOutput("/sbin/lsmod | /bin/grep snd | /bin/awk '{print $1}'", suggest_filename = "sndmodules_loaded")
        return
</snip>

c) The above steps will create the sos plugin named 'soundcard'. This plugin can be run individually using the command 'sosreport --only-plugins=soundcard'. 

d) The collected details are :

   (i) /proc/asound/

   (ii) /etc/alsa/

   (iii) /etc/asound.state 

   (iv) It creates a folder named 'soundcard' under the folder 'sos_commands' in the sosreport tar-ball and collects the output of the given commands :

          # '/sbin/lspci | grep -i audio'   (To collect information of the audio controller, this information is already available in the file 'lspci' created by the plugin 'hardware.py'. But this is gathered again to bring all the details on sound cards to a single location)

          # '/usr/bin/aplay -l'        (To collect the data on all the sound cards and audio devices [man aplay])

          # '/usr/bin/aplay -L'       (To collect the details on all the PCM devices [http://alsa.opensrc.org/index.php/PCM, man aplay)

	  # '/usr/bin/amixer'        (To collect the mixer settings of the default soundcards)

	  # /sbin/lsmod | /bin/grep snd | /bin/awk '{print $1}'       (This will gather the module names which are related to 'snd' and save it to a file name 'sndmodules_loaded')


Additional info :

This is only tested on RHEL5 machines and not on RHEL4 and lower.

Comment 2 Suzanne Logcher 2009-05-22 20:24:13 UTC
Since this FutureFeature was not resolved for RHEL 5.4 Beta, it has been moved to RHEL 5.5 for inclusion consideration.

Comment 7 errata-xmlrpc 2010-03-30 08:07:40 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0201.html


Note You need to log in before you can comment on or make changes to this bug.