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 such file or directory: '/proc/30094/stat'

See original GitHub issue

I re-install gpustat by pip,it stall has error when I used gpustat:

root$ gpustat --debug
Error on querying NVIDIA devices. Use --debug flag for details
Traceback (most recent call last):
  File "/home/zhudd/anaconda3/lib/python3.7/site-packages/gpustat/__main__.py", line 19, in print_gpustat
    gpu_stats = GPUStatCollection.new_query()
  File "/home/zhudd/anaconda3/lib/python3.7/site-packages/gpustat/core.py", line 396, in new_query
    gpu_info = get_gpu_info(handle)
  File "/home/zhudd/anaconda3/lib/python3.7/site-packages/gpustat/core.py", line 365, in get_gpu_info
    process = get_process_info(nv_process)
  File "/home/zhudd/anaconda3/lib/python3.7/site-packages/gpustat/core.py", line 294, in get_process_info
    ps_process = psutil.Process(pid=nv_process.pid)
  File "/home/zhudd/anaconda3/lib/python3.7/site-packages/psutil/__init__.py", line 339, in __init__
    self._init(pid)
  File "/home/zhudd/anaconda3/lib/python3.7/site-packages/psutil/__init__.py", line 366, in _init
    self.create_time()
  File "/home/zhudd/anaconda3/lib/python3.7/site-packages/psutil/__init__.py", line 697, in create_time
    self._create_time = self._proc.create_time()
  File "/home/zhudd/anaconda3/lib/python3.7/site-packages/psutil/_pslinux.py", line 1459, in wrapper
    return fun(self, *args, **kwargs)
  File "/home/zhudd/anaconda3/lib/python3.7/site-packages/psutil/_pslinux.py", line 1641, in create_time
    values = self._parse_stat_file()
  File "/home/zhudd/anaconda3/lib/python3.7/site-packages/psutil/_common.py", line 340, in wrapper
    return fun(self)
  File "/home/zhudd/anaconda3/lib/python3.7/site-packages/psutil/_pslinux.py", line 1498, in _parse_stat_file
    with open_binary("%s/%s/stat" % (self._procfs_path, self.pid)) as f:
  File "/home/zhudd/anaconda3/lib/python3.7/site-packages/psutil/_pslinux.py", line 205, in open_binary
    return open(fname, "rb", **kwargs)
FileNotFoundError: [Errno 2] No such file or directory: '/proc/30094/stat'

so , what’s wrong with my gpu,please help me

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
wookayincommented, Jul 8, 2022

Closing as fixed (b52fe9a).

0reactions
zhanjiahuicommented, Sep 13, 2022

i find a bug: 图片 图片

and then, i kill the four processes from root. However, my gpustat was useless like this:

(tf1) zjh@ubuntu-Super-Server:~$ gpustat --debug
Error on querying NVIDIA devices. Use --debug flag for details
Traceback (most recent call last):
  File "/mnt/lab/zjh/anaconda3/envs/tf1/lib/python3.6/site-packages/psutil/_common.py", line 441, in wrapper
    ret = self._cache[fun]
AttributeError: _cache

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/lab/zjh/anaconda3/envs/tf1/lib/python3.6/site-packages/gpustat/__main__.py", line 19, in print_gpustat
    gpu_stats = GPUStatCollection.new_query()
  File "/mnt/lab/zjh/anaconda3/envs/tf1/lib/python3.6/site-packages/gpustat/core.py", line 396, in new_query
    gpu_info = get_gpu_info(handle)
  File "/mnt/lab/zjh/anaconda3/envs/tf1/lib/python3.6/site-packages/gpustat/core.py", line 365, in get_gpu_info
    process = get_process_info(nv_process)
  File "/mnt/lab/zjh/anaconda3/envs/tf1/lib/python3.6/site-packages/gpustat/core.py", line 294, in get_process_info
    ps_process = psutil.Process(pid=nv_process.pid)
  File "/mnt/lab/zjh/anaconda3/envs/tf1/lib/python3.6/site-packages/psutil/__init__.py", line 332, in __init__
    self._init(pid)
  File "/mnt/lab/zjh/anaconda3/envs/tf1/lib/python3.6/site-packages/psutil/__init__.py", line 361, in _init
    self.create_time()
  File "/mnt/lab/zjh/anaconda3/envs/tf1/lib/python3.6/site-packages/psutil/__init__.py", line 717, in create_time
    self._create_time = self._proc.create_time()
  File "/mnt/lab/zjh/anaconda3/envs/tf1/lib/python3.6/site-packages/psutil/_pslinux.py", line 1661, in wrapper
    return fun(self, *args, **kwargs)
  File "/mnt/lab/zjh/anaconda3/envs/tf1/lib/python3.6/site-packages/psutil/_pslinux.py", line 1873, in create_time
    ctime = float(self._parse_stat_file()['create_time'])
  File "/mnt/lab/zjh/anaconda3/envs/tf1/lib/python3.6/site-packages/psutil/_pslinux.py", line 1661, in wrapper
    return fun(self, *args, **kwargs)
  File "/mnt/lab/zjh/anaconda3/envs/tf1/lib/python3.6/site-packages/psutil/_common.py", line 444, in wrapper
    return fun(self)
  File "/mnt/lab/zjh/anaconda3/envs/tf1/lib/python3.6/site-packages/psutil/_pslinux.py", line 1703, in _parse_stat_file
    with open_binary("%s/%s/stat" % (self._procfs_path, self.pid)) as f:
  File "/mnt/lab/zjh/anaconda3/envs/tf1/lib/python3.6/site-packages/psutil/_common.py", line 711, in open_binary
    return open(fname, "rb", **kwargs)
FileNotFoundError: [Errno 2] No such file or directory: '/proc/14462/stat'

and then i used pip install -I git+https://github.com/wookayin/gpustat.git@master, gpustat seems to be fixed, but the memory usage of the gpu does not correspond 图片 图片 Is it gpustat have bug or is my server being maliciously attacked? @wookayin

Read more comments on GitHub >

github_iconTop Results From Across the Web

ENOENT(No such file or directory) error occur when I try to ...
Anyway, we can't reliably access all the files in /proc/ as processes are appearing and disappearing during the system life.
Read more >
cp: cannot stat 'filename': No such file or directory - Ask Ubuntu
I am not familiar with running Ubuntu inside a ChromeOS. It looks to me the folder VueScan exists in two places: In the...
Read more >
mv: cannot stat No such file or directory in shell script
The * is being passed literally to the mv command, which fails since it doesn't find files called * in the directories indicated....
Read more >
No such file or directory. But there is and it's in the same ...
Gnat raising exception for name error but the file specified is exactly where it needs to be. Ive tried using the command line...
Read more >
A simple command-line utility for querying and monitoring ...
No such file or directory : '/proc/30094/stat'. I re-install gpustat by pip,it stall has error when I used gpustat:
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