Bug 478009 - To add a sosplugin to collect soundcard related information
To add a sosplugin to collect soundcard related information
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sos (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Adam Stokes
: FutureFeature
Depends On:
Blocks: 557292
  Show dependency treegraph
Reported: 2008-12-27 02:27 EST by Vimal Kumar
Modified: 2012-11-02 14:31 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-03-30 04:07:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Vimal Kumar 2008-12-27 02:27:17 EST
Created attachment 327878 [details]

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' :

import sos.plugintools
import commands
import os

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

    def setup(self):
        self.collectExtOutput("/sbin/lspci | grep -i audio")
        self.collectExtOutput("/usr/bin/aplay -l")
        self.collectExtOutput("/usr/bin/aplay -L")
        self.collectExtOutput("/sbin/lsmod | /bin/grep snd | /bin/awk '{print $1}'", suggest_filename = "sndmodules_loaded")

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 Yeghiayan 2009-05-22 16:24:13 EDT
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 04:07:40 EDT
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.


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