#!/bin/bash

LOGSN=`ipmitool fru print 0 |grep "Chassis Serial" | awk '{print $NF}'| tr a-z A-Z`
lspci | grep -i 82599ES | awk '{print $1}'| while read vs;do
  echo
  lspci -n |grep -i $vs >>"pci.log" 2>&1
done
awk '{print $3}' pci.log | while read zs;do 
  echo
  lspci -n -d $zs -vvv |grep --color Width >>"$LOGSN-pci.log" 2>&1
done
