Hello!
I’m developing a tool written in python that uses sosreport to generate a report containing a lot of log files and things like lspci
and lsusb
outputs.
I just noticed that, although a sosreport is generated and contains some data, a lot of the output is empty. For instance, the lspci output is 0 bytes.
If I run the same command from the Debian package installed on the same laptop (sudo sosreport --batch
), I get a different sosreport, and this time the lspci -nnvv
logs contain a lot of data.
I tried accessing my snap through a shell and checked that I could use lscpi, and it works:
$ snap run --shell qabro
$ cd $SNAP/usr/bin/
$ sudo ./lspci -nnvv
00:00.0 Host bridge [0600]: Intel Corporation Device [8086:5904] (rev 02)
Subsystem: Dell Device [1028:07b8]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ >SERR- <PERR- INTx-
Latency: 0
Capabilities: [e0] Vendor Specific Information: Len=10 <?>
(…)
How can I make sure sosreport can access the proper information and provide a useful report/logs?
For info: