Attempting to show GPU utilization.
Attempting to show GPU utilization.
I'm using Arch and attempting to show how my Intel integrated graphics appear in i3bar via i3blocks. I located the intel-gpu-tools package. In the terminal, I can execute intel_gpu_top to display GPU details in a clear, readable format. For extracting specific data, using -l produces plain text output, which is easier to process. The usage column is tricky but appears after the second set of numbers in the IMC reading—someone might be able to help verify it. I've experimented with various grep and awk commands, but haven't successfully retrieved the needed information. There seems to be no obvious standalone tool for this purpose. I can redirect the output to a file using the -o option, which would aid in parsing. You can view the full package list here: https://archlinux.org/packages/extra/x86...gpu-tools/.
Regular expressions are fully supported by Grep. You can also employ scripts or programming languages that accept input via stdin or files, performing string operations to achieve your goals. Keep in mind you’ve been studying C recently—this could be a useful practice and assignment.