Bug 478009

Summary: To add a sosplugin to collect soundcard related information
Product: Red Hat Enterprise Linux 5 Reporter: Vimal Kumar <vikumar>
Component: sosAssignee: Adam Stokes <astokes>
Status: CLOSED ERRATA QA Contact: BaseOS QE <qe-baseos-auto>
Severity: medium Docs Contact:
Priority: low    
Version: 5.5CC: agk, ahecox, azelinka, bmr, rbiba, syeghiay
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-30 08:07:40 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:
Bug Depends On:    
Bug Blocks: 557292    
Attachments:
Description Flags
soundcard.py none

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