Reading statistics for a PCIe device
Use the statistics attribute file to see measurement data for a PCIe device.
About this task
All PCIe devices collect measurement data by default. You can read the data in a sysfs attribute file in the debug file system, by default mounted at /sys/kernel/debug.
You can turn data collection on and off. To switch off measurement data collecting for the current session, write "0" to the statistics attribute. To enable data collection again, write "1" to the statistics attribute.
Example
# cat /sys/kernel/debug/pci/0000:00:00.0/statistics
The statistics attribute file might look similar to this example:
FMB @ 0000000078cd8000
Update interval: 4000 ms
Samples: 14373
Last update TOD: cefa44fa50006378
Load operations: 1002780
Store operations: 1950622
Store block operations: 0
Refresh operations: 0
Received bytes: 0
Received packets: 0
Transmitted bytes: 0
Transmitted packets: 0
Allocated pages: 9104
Mapped pages: 16633
Unmapped pages: 2337