Jump to content

I am on Arch and I am trying to display the usage of my Intel integrated graphics in my i3bar through i3blocks. I found the intel-gpu-tools package. In the terminal, I can run the intel_gpu_top command which lays out some information of the GPU in a nice readable and graphical format. But if I want to say, grep the usage, it would be better to use the -l (l as in lose) parameter which outputs the data in just normal text format. The usage column is hard to find but it is the second percent sign, which should be just after the 2 columns of the IMC reading, if anybody is willing to check out.

 

I have tried a lot of grep and awk variations, but I am not able to correctly get the usage data. Surely there has to be a better way. I can also output the data to a file by using the -o parameter, which could help in parsing. Here you can see the package contents of the intel-gpu-tools package - https://archlinux.org/packages/extra/x86_64/intel-gpu-tools/. Scroll to the bottom. I tried checking if there is a standalone program to get the GPU usage, but by the names, I couldn't find any.

PLEASE MARK COMMENTS AS SOLUTION IF SATISFIED!!

bigger number better, makes me look cooler.

Link to comment
https://linustechtips.com/topic/1564104-trying-to-display-gpu-usage/
Share on other sites

Link to post
Share on other sites

Learn regular expression. Grep supports full regex. 

 

You can also use scripting or a programming language that takes in text input from stdin or read from a file and then do string manipulation to get an output you desire. I see you have been learning C recently, this might be a good exercise and homework for you. 

Sudo make me a sandwich 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×