Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SWUTILS-806: Include PCIe Slot/Gen info to sfreport 'dmidecode -t slot' #26

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

amitgu-xilinx
Copy link
Collaborator

Also fixes SWUTILS-941

Copy link
Collaborator

@dchadwic-xilinx dchadwic-xilinx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test

sfreport.pl Outdated

print_heading("PCI configuration", "pci_config", 'hide');

if (my $pcieslot_file = `dmidecode -t slot |egrep -a10 'PCIe Slot' 2>/dev/null`) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This grep will miss some slots on certain machines. For example, on dellr620g:

dellr620g: ~$ sudo dmidecode -t slot |egrep -a10 'PCIe Slot'

Perhaps only grep for PCI?

dellr620g: ~$ sudo dmidecode -t slot
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.

Handle 0x0900, DMI type 9, 17 bytes
System Slot Information
	Designation: PCI1
	Type: x16 PCI Express 3
	Current Usage: In Use
	Length: Long
	ID: 1
	Characteristics:
		3.3 V is provided
		PME signal is supported
	Bus Address: 0000:41:00.0

Handle 0x0901, DMI type 9, 17 bytes
System Slot Information
	Designation: PCI2
	Type: x16 PCI Express 3
	Current Usage: In Use
	Length: Long
	ID: 2
	Characteristics:
		3.3 V is provided
		PME signal is supported
	Bus Address: 0000:05:00.0

@amitgu-xilinx
Copy link
Collaborator Author

dmidecode -t slot |grep -b10 'PCI Express'
might work better.

@amitgu-xilinx
Copy link
Collaborator Author

Have update. Can you please test on your servers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants