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.

Error on calling nvidia-smi: Command 'ps ...' returned non-zero exit status 1

See original GitHub issue

got above error msg when i run gpustat. but nvidia-smi works on my machine here are some details OS:Ubuntu 14.04.5 LTS Python Version: anaconda3.6

Error on calling nvidia-smi. Use --debug flag for details
Traceback (most recent call last):
  File "/usr/local/bin/gpustat", line 417, in print_gpustat                                                      gpu_stats = GPUStatCollection.new_query()
  File "/usr/local/bin/gpustat", line 245, in new_query
    return GPUStatCollection(gpu_list)
  File "/usr/local/bin/gpustat", line 218, in __init__
    self.update_process_information()
  File "/usr/local/bin/gpustat", line 316, in update_process_information
    processes = self.running_processes()
  File "/usr/local/bin/gpustat", line 275, in running_processes
    ','.join(map(str, pid_map.keys()))
  File "/usr/local/bin/gpustat", line 46, in execute_process
    stdout = check_output(command_shell, shell=True).strip()
  File "/home/xiyun/apps/anaconda3/lib/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "/home/xiyun/apps/anaconda3/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'ps -o pid,user:16,comm -p1 -p 14471' returned non-zero exit status 1.

how can i fix this ?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
feiwofeifeixiaowocommented, Sep 6, 2017

sorry about that, ~V~. gpustat --debug

Error on querying NVIDIA devices. Use --debug flag for details
Traceback (most recent call last):
  File "/home/xiyun/apps/anaconda3/lib/python3.6/site-packages/psutil/_pslinux.py", line 1332, in wrapper
    return fun(self, *args, **kwargs)
  File "/home/xiyun/apps/anaconda3/lib/python3.6/site-packages/psutil/_pslinux.py", line 1506, in create_time
    values = self._parse_stat_file()
  File "/home/xiyun/apps/anaconda3/lib/python3.6/site-packages/psutil/_common.py", line 313, in wrapper
    return fun(self)
  File "/home/xiyun/apps/anaconda3/lib/python3.6/site-packages/psutil/_pslinux.py", line 1367, in _parse_stat_file
    with open_binary("%s/%s/stat" % (self._procfs_path, self.pid)) as f:
  File "/home/xiyun/apps/anaconda3/lib/python3.6/site-packages/psutil/_pslinux.py", line 190, in open_binary
    return open(fname, "rb", **kwargs)
FileNotFoundError: [Errno 2] No such file or directory: '/proc/22919/stat'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/xiyun/apps/anaconda3/lib/python3.6/site-packages/psutil/__init__.py", line 408, in _init
    self.create_time()
  File "/home/xiyun/apps/anaconda3/lib/python3.6/site-packages/psutil/__init__.py", line 734, in create_time
    self._create_time = self._proc.create_time()
  File "/home/xiyun/apps/anaconda3/lib/python3.6/site-packages/psutil/_pslinux.py", line 1338, in wrapper
    raise NoSuchProcess(self.pid, self._name)
psutil.NoSuchProcess: psutil.NoSuchProcess process no longer exists (pid=22919)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/xiyun/apps/anaconda3/lib/python3.6/site-packages/gpustat.py", line 371, in print_gpustat
    gpu_stats = GPUStatCollection.new_query()
  File "/home/xiyun/apps/anaconda3/lib/python3.6/site-packages/gpustat.py", line 284, in new_query
    gpu_info = get_gpu_info(handle)
  File "/home/xiyun/apps/anaconda3/lib/python3.6/site-packages/gpustat.py", line 260, in get_gpu_info
    process = get_process_info(nv_process.pid)
  File "/home/xiyun/apps/anaconda3/lib/python3.6/site-packages/gpustat.py", line 221, in get_process_info
    ps_process = psutil.Process(pid=pid)
  File "/home/xiyun/apps/anaconda3/lib/python3.6/site-packages/psutil/__init__.py", line 381, in __init__
    self._init(pid)
  File "/home/xiyun/apps/anaconda3/lib/python3.6/site-packages/psutil/__init__.py", line 421, in _init
    raise NoSuchProcess(pid, None, msg)
psutil.NoSuchProcess: psutil.NoSuchProcess no process found with pid 22919
0reactions
wookayincommented, Dec 2, 2017

Released as v0.4.1.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command '['nvidia-smi', '-L']' returned non-zero exit status 255
Please provide the following information when requesting support. ... ~/.tao_mounts.json wasn't found. Falling back to obtain mount points and ...
Read more >
Command '[...]' returned non-zero exit status 1 - Stack Overflow
As your error message said, ping finished with non zero exit status. It might mean that e.g. the IP address ...
Read more >
Error: Command '/usr/bin/python' returned non-zero exit status 1
Hi, My python version is 2.7.3. I am using Ubuntu 12.04.1 LTS. I am trying to download the webrtc code base using 'gclient...
Read more >
nvidia-smi - NVIDIA System Management Interface program
nvidia -smi (also NVSMI) provides monitoring and management capabilities for ... Return code 0 - Success · Return code 2 - A supplied...
Read more >
Troubleshooting GCP + CUDA/NVIDIA + Docker and Keeping ...
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running. This...
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