id: codecs_attachment
plugin: attachment
requires: device.driver == 'snd_hda_intel'
command: cat /proc/asound/card*/codec#*
estimated_duration: 0.023
_description: Attaches a report of installed codecs for Intel HDA

id: cpuinfo_attachment
plugin: attachment
command: cat /proc/cpuinfo
estimated_duration: 0.006
_description: Attaches a report of CPU information

id: dmesg_attachment
plugin: attachment
command: cat /var/log/dmesg | ansi_parser
estimated_duration: 0.640
_description: Attaches a copy of /var/log/dmesg to the test results

id: dmi_attachment
plugin: attachment
command: [ -d /sys/class/dmi/id/ ] && (grep -r . /sys/class/dmi/id/ 2>/dev/null || true) || false
estimated_duration: 0.044
_description: Attaches info on DMI

id: dmidecode_attachment
plugin: attachment
requires: package.name == 'dmidecode'
user: root
command: dmidecode | iconv -t 'utf-8' -c
estimated_duration: 0.030
_description: Attaches dmidecode output

id: lshw_attachment
plugin: attachment
requires: package.name == 'lshw'
user: root
command: lshw | iconv -t 'utf-8' -c
_description: Attaches lshw output

id: efi_attachment
plugin: attachment
user: root
command: [ -d /sys/firmware/efi ] && grep -m 1 -o --color=never 'EFI v.*' /var/log/kern.log* || true
estimated_duration: 0.5
_description: Attaches the firmware version

id: lspci_attachment
plugin: attachment
command: lspci -vvnn | iconv -t 'utf-8' -c
estimated_duration: 0.042
_description: Attaches very verbose lspci output.

id: lspci_network_attachment
plugin: attachment
command: lspci -vvnnQ | iconv -t 'utf-8' -c
estimated_duration: 1.322
_description: Attaches very verbose lspci output (with central database Query).

id: lsusb_attachment
plugin: attachment
requires: package.name == 'usbutils'
user: root
command: lsusb -vv | iconv -t 'utf-8' -c
estimated_duration: 0.700
_description: List USB devices

id: meminfo_attachment
plugin: attachment
command: cat /proc/meminfo
estimated_duration: 0.043

id: modprobe_attachment
plugin: attachment
command: find /etc/modprobe.* -name \*.conf | xargs cat
estimated_duration: 0.015
_description: Attaches the contents of the various modprobe conf files.

id: modules_attachment
plugin: attachment
command: cat /etc/modules
estimated_duration: 0.004
_description: Attaches the contents of the /etc/modules file.

id: sysctl_attachment
plugin: attachment
command: find /etc/sysctl.* -name \*.conf | xargs cat
estimated_duration: 0.014
_description: attaches the contents of various sysctl config files.

id: sysfs_attachment
plugin: attachment
_description: Attaches a report of sysfs attributes.
command:
 for i in `udevadm info --export-db | sed -n 's/^P: //p'`; do
  echo "P: $i"
  udevadm info --attribute-walk --path=/sys$i 2>/dev/null | sed -n 's/    ATTR{\(.*\)}=="\(.*\)"/A: \1=\2/p'
  echo
 done
estimated_duration: 6.344

id: udev_attachment
plugin: attachment
command: udevadm info --export-db | xml_sanitize
estimated_duration: 1.465
_description: Attaches a dump of the udev database showing system hardware information.

id: udev_resource_attachment
plugin: attachment
command: udev_resource
estimated_duration: 0.432
_description: Attaches the output of udev_resource, for debugging purposes

id: gcov_attachment
plugin: attachment
requires: package.name == 'lcov'
user: root
command: gcov_tarball
_description: Attaches a tarball of gcov data if present.

id: lsmod_attachment
plugin: attachment
command: lsmod_info
estimated_duration: 0.5
_description: Attaches a list of the currently running kernel modules.

plugin: attachment
id: acpi_sleep_attachment
command: [ -e /proc/acpi/sleep ] && cat /proc/acpi/sleep || echo "No /proc/acpi/sleep found"
estimated_duration: 0.5
_description: Attaches the contents of /proc/acpi/sleep if it exists.

plugin: shell
id: info/bootchart
_description: Bootchart information.
requires: package.name == 'bootchart' or package.name == 'pybootchartgui'
user: root
command:
 process_wait -u root bootchart collector ureadahead; \
 [ `ls /var/log/bootchart/*.tgz 2>/dev/null | wc -l` -lt 2 ] && reboot && sleep 100

plugin: local
_summary: SATA/IDE device information.
id: info/hdparm
estimated_duration: 1.0
_description: SATA/IDE device information.
requires:
 package.name == 'hdparm'
 device.category == 'DISK'
command:
 cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=DISK"'
 plugin: attachment
 id: info/hdparm_`ls /sys$path/block`.txt
 estimated_duration: 1.0
 requires:
  device.path == "$path"
  block_device.`ls /sys$path/block`_state != 'removable'
 user: root
 command: hdparm -I /dev/`ls /sys$path/block`
 EOF

plugin: attachment
id: bootchart.png
depends: info/bootchart
requires: package.name == 'pybootchartgui'
_description: Attaches the bootchart png file for bootchart runs
command:
 file=`ls /var/log/bootchart/*.png 2>/dev/null | tail -1`; \
 [ -e "$file" ] && cat "$file"

plugin: attachment
id: bootchart.tgz
depends: info/bootchart
_description: Attaches the bootchart log for bootchart test runs.
command:
 file=`ls /var/log/bootchart/*.tgz 2>/dev/null | tail -1`; \
 [ -e "$file" ] && cat "$file"

plugin: attachment
id: installer_bootchart.tgz
command: [ -e /var/log/installer/bootchart.tgz ] && cat /var/log/installer/bootchart.tgz
_description: installs the installer bootchart tarball if it exists.

plugin: attachment
id: installer_debug.gz
user: root
command: [ -e /var/log/installer/debug ] && gzip -9 -c /var/log/installer/debug
estimated_duration: 0.1
_description: Attaches the installer debug log if it exists.

plugin: attachment
id: info/touchpad_driver
requires: device.category == 'TOUCHPAD'
command: touchpad_driver_info
estimated_duration: 0.384
_description:
 Returns the name, driver name and driver version of any touchpad discovered on
 the system.

plugin: attachment
id: info/audio_device_driver
requires:
 package.name == 'pulseaudio-utils'
 package.name == 'module-init-tools'
 device.category == 'AUDIO'
command: audio_driver_info
estimated_duration: 0.177
_description: Lists the device driver and version for all audio devices.

plugin: attachment
id: info/network_devices
requires:
 device.category == 'NETWORK' or device.category == 'WIRELESS'
 package.name == 'module-init-tools'
 package.name == 'pciutils'
command: network_device_info
estimated_duration: 0.550
_description: Provides information about network devices

plugin: attachment
id: info/mobile_broadband_info
command: broadband_info
estimated_duration: 0.5
_description: Provides information about wwan/mobile broadband devices

plugin: attachment
id: info/xrandr
command: xrandr -q --verbose
_description: Provides information about displays attached to the system

plugin: attachment
id: info/disk_partitions
estimated_duration: 1.0
user: root
command: parted -l -s
_description: Attaches information about disk partitions

