Skip to content
Reports video memory used by running processes
Python
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
README
drm_free.py

README

drm_free - simple script to report per-process video RAM usage.

Usage:

When run without parameters, this script outputs runnings processes which are
using video memory, and their total memory usage. For example:

$ ./drm_free.py 
PID 738 (X): total 25.4961M
PID 19907 (glxgears_pixmap): total 0.0312M
PID 19496 (glxgears): total 0.0312M


When run with '-v' parameter ('verbose'), it will also output detailed object
information:

PID 738 (X): total 25.4688M
0x001083c0000: 163840
0x00106a4c000: 4194304
0x001069ce000: 4096
0x00106e74000: 4096
0x00106a3f000: 4096
0x00106a4b000: 4096
0x00106a45000: 16384
0x00106a16000: 4096
0x00106a14000: 8192
0x00106a10000: 16384
0x00106a0a000: 24576
0x00106a09000: 4096
0x00106a08000: 4096
0x00109281000: 4096
0x001092f1000: 4096
0x00107d84000: 4096
0x00107d82000: 4096
0x00107667000: 4096
0x00108990000: 4096
0x001088f0000: 4096
0x001081e5000: 4096
0x001081cb000: 4096
0x001088ef000: 4096
0x001084a3000: 4096
0x001088e7000: 20480
0x001088da000: 12288
0x001088d5000: 20480
0x001088c6000: 40960
0x001088c4000: 4096
0x001088ba000: 4096
0x0010889a000: 131072
0x00108471000: 4096
0x0010840a000: 4096
0x00108409000: 4096
0x00108404000: 4096
0x00108401000: 4096
0x00108400000: 4096
0x001083fd000: 4096
0x001083f9000: 4096
0x001083bf000: 4096
0x0010817f000: 4096
0x0010817e000: 4096
0x00109246000: 4096
0x00109244000: 4096
0x00107386000: 4096
0x00107383000: 4096
0x0010737d000: 4096
0x0010737c000: 4096
0x00107377000: 4096
0x00107d81000: 4096
0x00107d3f000: 4096
0x00107d3a000: 4096
0x00107d31000: 4096
0x00109363000: 4096
0x00109362000: 4096
0x00107680000: 16384
0x00107663000: 16384
0x00107407000: 16384
0x0010764d000: 4096
0x0010734f000: 163840
0x0010956d000: 4096
0x0010959c000: 4194304
0x00107886000: 49152
0x001094d2000: 16384
0x001094c9000: 16384
0x001094c1000: 16384
0x001091a0000: 16384
0x0010927c000: 16384
0x001093d4000: 16384
0x00107dcb000: 16384
0x0010930b000: 4096
0x00109331000: 4096
0x00109257000: 4096
0x0010934d000: 4096
0x001081ca000: 4096
0x001081c6000: 4096
0x001081ae000: 16384
0x0010768b000: 4096
0x001090fd000: 4096
0x0010912d000: 163840
0x0010912a000: 8192
0x00109125000: 20480
0x0010911f000: 24576
0x0010919f000: 4096
0x00109198000: 24576
0x001093bd000: 24576
0x001075f8000: 4096
0x00109184000: 4096
0x0010951c000: 4096
0x0010951b000: 4096
0x0010951a000: 4096
0x00109213000: 4096
0x00109212000: 4096
0x00109181000: 4096
0x0010917a000: 28672
0x0010941b000: 4096
0x0010948a000: 4096
0x00109401000: 4096
0x00108101000: 12288
0x00109594000: 4096
0x00109587000: 4096
0x00109581000: 4096
0x0010768a000: 4096
0x00109171000: 4096
0x001090d3000: 4096
0x001094e0000: 4096
0x00107ea4000: 4096
0x001080ce000: 8192
0x001080c8000: 24576
0x0010836b000: 229376
0x00108252000: 49152
0x00107d12000: 4096
0x00107cea000: 163840
0x00107ce9000: 4096
0x00107ce8000: 4096
0x00107ce7000: 4096
0x00107ce6000: 4096
0x00107ce5000: 4096
0x00107ce4000: 4096
0x00107ce3000: 4096
0x00107ce2000: 4096
0x00107ce1000: 4096
0x00107ce0000: 4096
0x00107cdf000: 4096
0x00107cde000: 4096
0x00107cdd000: 4096
0x00107cdc000: 4096
0x00107cdb000: 4096
0x00107cda000: 4096
0x00107cd9000: 4096
0x00107cd8000: 4096
0x00107cd7000: 4096
0x00107cd6000: 4096
0x00107cd5000: 4096
0x00107cd4000: 4096
0x00107cc0000: 49152
0x00107598000: 4096
0x00107597000: 4096
0x00107596000: 4096
0x00107595000: 4096
0x00107594000: 4096
0x00107593000: 4096
0x00107592000: 4096
0x0010693a000: 4096
0x00106938000: 4096
0x00107cb3000: 4096
0x00107cb1000: 4096
0x001076c5000: 8192
0x001076c0000: 20480
0x001076ba000: 24576
0x00106945000: 24576
0x00106934000: 4096
0x00106922000: 4096
0x0010690f000: 4096
0x0010690e000: 4096
0x0010690b000: 4096
0x0010690a000: 4096
0x00107cad000: 4096
0x00107822000: 4096
0x00107466000: 4096
0x0010745f000: 4096
0x00107ca8000: 4096
0x00107ca7000: 4096
0x00107ca0000: 4096
0x0010581d000: 4096
0x0010581c000: 4096
0x00107441000: 8192
0x00107426000: 4096
0x0010741e000: 4096
0x0010741a000: 4096
0x001075dd000: 4096
0x001075d9000: 4096
0x001075b3000: 4096
0x001076b9000: 4096
0x001076a2000: 4096
0x0010769e000: 4096
0x0010769c000: 4096
0x001075f6000: 4096
0x001075f3000: 4096
0x00107e82000: 4096
0x00107e43000: 4096
0x001078a2000: 4096
0x00107835000: 4096
0x00107570000: 4096
0x00107dcf000: 4096
0x00107d26000: 4096
0x00107320000: 4096
0x0010734e000: 4096
0x0010734d000: 4096
0x0010734c000: 4096
0x0010734b000: 4096
0x0010734a000: 4096
0x00107349000: 4096
0x00107348000: 4096
0x00107347000: 4096
0x00107346000: 4096
0x00107345000: 4096
0x00107344000: 4096
0x00107343000: 4096
0x00107342000: 4096
0x00107341000: 4096
0x00107340000: 4096
0x001072c7000: 4096
0x001068ce000: 4096
0x00107993000: 4096
0x00107baf000: 4096
0x001069cd000: 4096
0x0010665c000: 4096
0x00105829000: 49152
0x0010581f000: 4096
0x00102764000: 4096
0x00101611000: 4096
0x00100b04000: 5242880
0x00100af8000: 4096
0x00100af7000: 4096
0x00100af5000: 4096
0x00100af4000: 4096
0x00100af2000: 4096
0x00100af1000: 4096
0x00100aef000: 4096
0x00100aee000: 4096
0x00100ae9000: 4096
0x00100ae8000: 4096
0x00100ae7000: 4096
0x00100ae6000: 4096
0x00100ae5000: 4096
0x00100ae4000: 4096
0x00100ae3000: 4096
0x00100ae2000: 4096
0x00100ae1000: 4096
0x00100ae0000: 4096
0x00100add000: 4096
0x00100adc000: 4096
0x00100adb000: 4096
0x00100ada000: 4096
0x001005a0000: 5242880
0x00100000000: 5242880
PID 19907 (glxgears_pixmap): total 0.0312M
0x001069ff000: 32768
PID 19496 (glxgears): total 0.0312M
0x001088bb000: 32768

Something went wrong with that request. Please try again.