@@ -153,8 +153,14 @@ function report_command () {
153153echo " Running the reporting commands that require sudo access."
154154echo " If these take a while, then you may be asked to input your sudo password again."
155155
156+ # Root info with report_command
156157report_command sudo dmesg
157158report_command sudo dmidecode
159+ report_command sudo fdisk -l
160+ report_command sudo intel_gpu_top -L
161+
162+ # Root info with custom handling
163+
158164if command -v docker & > /dev/null; then
159165 {
160166 sudo docker -v
166172 echo " The command \" docker\" was not found."
167173fi
168174
169- report_command sudo fdisk -l
170-
171175if command -v lshw & > /dev/null; then
172176 # shellcheck disable=SC2024
173177 sudo lshw -html > " ${DIR} /lshw.html"
243247echo " Running the reporting commands that do not require sudo access."
244248echo " You should no longer be asked for your sudo password."
245249
250+ # Non-root info with cat
246251cat " /proc/acpi/wakeup" > " ${DIR} /wakeup.txt"
247252cat " /proc/cpuinfo" > " ${DIR} /cpuinfo.txt"
248253cat " /proc/mdstat" > " ${DIR} /mdstat.txt"
249254cat " /sys/power/mem_sleep" > " ${DIR} /mem_sleep.txt"
250255cat " /var/log/syslog" > " ${DIR} /syslog.txt"
251256
257+ # Non-root info with report_command
258+ report_command acpi --everything --details
259+ report_command arp
260+ report_command clinfo
261+ report_command decode-dimms
262+ report_command df --human-readable
263+ report_command dpkg --list
264+ report_command fastfetch
265+ report_command glxinfo -t
266+ report_command lsblk
267+ report_command lsb_release -a
268+ report_command lscpu
269+ report_command lsmod
270+ report_command lspci
271+ report_command lsscsi
272+ # lsusb seems to return 1 on virtual servers.
273+ set +e
274+ report_command lsusb
275+ set -e
276+ report_command numba --sysinfo
277+ report_command nvidia-smi
278+ report_command rocminfo
279+ report_command rocm-smi --showallinfo
280+ report_command sensors
281+ report_command vainfo
282+ report_command vdpauinfo
283+ report_command vulkaninfo
284+ report_command xinput list
285+ report_command xrandr
286+ report_command zpool status
287+
288+ # Non-root info with custom handling
289+
252290if command -v fwupdmgr & > /dev/null; then
253291 fwupdmgr get-devices > " ${DIR} /fwupdmgr_devices.txt"
254292 # fwupdmgr returns exit code 2 when no updates are found.
@@ -284,28 +322,6 @@ else
284322 echo " The command \" systemd-analyze\" was not found."
285323fi
286324
287- report_command acpi --everything --details
288- report_command arp
289- report_command clinfo
290- report_command decode-dimms
291- report_command df --human-readable
292- report_command dpkg --list
293- report_command fastfetch
294- report_command glxinfo -t
295- report_command intel_gpu_top -L
296- report_command lsblk
297- report_command lsb_release -a
298- report_command lscpu
299- report_command lsmod
300- report_command lspci
301- report_command lsscsi
302- # lsusb seems to return 1 on virtual servers.
303- set +e
304- report_command lsusb
305- set -e
306- report_command numba --sysinfo
307- report_command nvidia-smi
308-
309325if command -v pip & > /dev/null; then
310326 {
311327 pip -V
@@ -333,10 +349,6 @@ else
333349 echo " The command \" ras-mc-ctl\" was not found."
334350fi
335351
336- report_command rocminfo
337- report_command rocm-smi --showallinfo
338- report_command sensors
339-
340352# Battery info
341353if command -v upower & > /dev/null; then
342354 echo " Scanning battery info with upower."
@@ -350,18 +362,16 @@ else
350362 echo " The command \" upower\" was not found."
351363fi
352364
353- report_command vainfo
354- report_command vdpauinfo
355- report_command vulkaninfo
356- report_command xinput list
357- report_command xrandr
358- report_command zpool status
359-
360365if [ -d " /var/log/samba" ] && command -v rsync & > /dev/null; then
361366 # The cores folder would require root access, so let's skip it.
362367 rsync -av --progress " /var/log/samba" " ${DIR} " --exclude " cores"
363368fi
364369
370+
371+ # -----
372+ # Post-processing
373+ # -----
374+
365375if [ " ${REPORT} " = true ]; then
366376 # Packaging
367377 7zr a -mx=9 " ${DIR} _${TIMESTAMP} .7z" " ${DIR} "
0 commit comments