question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No process and user information in output (for graphics application)

See original GitHub issue

I have no process and user information while running gpustat with -cpu flags.

gpustat 0.4.0.dev
% python -m gpustat -cpu                       
feline  Sun Aug 13 15:45:59 2017
[0] GeForce GTX 750 Ti | 48'C,   7 % |   213 /  1995 MB |

nvidia-smi v384.59 shows processes as well. Here is XML dump from it: nvidia-smi_out_gtx750ti.xml.txt

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
kapshcommented, Sep 6, 2017

I think I got it. It is documented feature:

This function returns information only about compute running processes (e.g. CUDA application which have active context). Any graphics applications (e.g. using OpenGL, DirectX) won’t be listed by this function.

https://docs.nvidia.com/deploy/nvml-api/group__nvmlDeviceQueries.html#group__nvmlDeviceQueries_1g46ceaea624d5c96e098e03c453419d68

I guess this is about CUDA applications - and I was running glxgears for testing. So I found another function in their API and did some weird patching like this:

diff --git a/gpustat.py b/gpustat.py
index 8b45fde..a5210e2 100755
--- a/gpustat.py
+++ b/gpustat.py
@@ -253,7 +253,8 @@ class GPUStatCollection(object):
             processes = []
             try:
-                nv_processes = N.nvmlDeviceGetComputeRunningProcesses(handle)
+                comp_processes = N.nvmlDeviceGetComputeRunningProcesses(handle)
+                graphics_processes = N.nvmlDeviceGetGraphicsRunningProcesses(handle)
                 # dict type is mutable
-                for nv_process in nv_processes:
+                for nv_process in comp_processes + graphics_processes:
                     #TODO: could be more information such as system memory usage,
                     # CPU percentage, create time etc.

And now I have this:

feline  Thu Sep  7 00:46:28 2017
[0] GeForce GTX 750 Ti | 46'C,   4 % |   257 /  1995 MB | kapsh/3278(170M) kapsh/16279(83M)
0reactions
kapshcommented, Sep 11, 2017

@wookayin Current master works as expected, thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Permission issue with Performance Counters | NVIDIA ...
You may encounter the following error message when using NVIDIA tools: ERR_NVGPUCTRPERM The user running <tool_name/application_name> does not have permission ...
Read more >
How Computers Work: Input and Output
Output : Information for the User. As we have seen, computer output takes the form of screen or printer output. Other forms of...
Read more >
Troubleshoot Photoshop graphics processor (GPU) and ...
With the Photoshop 23.0 release, you can run the graphics processor compatibility check to ensure your GPU is compatible. To do so, go...
Read more >
Defining PeopleSoft Process Scheduler Support Information
Defining Process Output Types. To access the Process Output Type Settings page, select PeopleTools, Process Scheduler, System Settings, Process Output Type.
Read more >
Attach to a processes output for viewing - Stack Overflow
How would I detach from an applications output without killing the application? Normally if you fire up a talkative application using the command...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found