Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_io_counters() fails on Red Hat Enterprise Linux AS release 4 (Nahant Update 5) / Python 2.6.4 #275

Closed
giampaolo opened this issue May 23, 2014 · 7 comments

Comments

@giampaolo
Copy link
Owner

From ole.weid...@rutgers.edu on June 05, 2012 16:38:19

What steps will reproduce the problem?  
>>> psutil.Process(os.getpid()).get_io_counters()

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File 
"/home/oweidner/software/bigjob-bliss/lib/python2.6/site-packages/psutil/__init__.py",
 line 265, in get_io_counters
    return self._platform_impl.get_process_io_counters()
  File 
"/home/oweidner/software/bigjob-bliss/lib/python2.6/site-packages/psutil/_pslinux.py",
 line 327, in wrapper
    raise NoSuchProcess(self.pid, self._process_name)
psutil.error.NoSuchProcess: process no longer exists (pid=24890) 

What is the expected output?  
I/O counters 

What do you see instead?  
psutil.error.NoSuchProcess: process no longer exists (pid=24890) 

What version of psutil are you using? What Python version?  
psutil-0.4.1 

On what operating system? Is it 32bit or 64bit version?  
x86_64 Please provide any additional information below.

Original issue: http://code.google.com/p/psutil/issues/detail?id=275

@giampaolo
Copy link
Owner Author

From g.rodola on June 05, 2012 08:13:01

That's strange.
Do you have /proc/self/io file?

@giampaolo
Copy link
Owner Author

From ole.weid...@rutgers.edu on June 05, 2012 08:17:06

Strange indeed: I don't have that file.

bash-3.00$ ls -l /proc/self/
total 0
dr-xr-xr-x  2 oweidner lsuusers 0 Jun  5 10:14 attr
-r--------  1 oweidner lsuusers 0 Jun  5 10:14 auxv
-r--r--r--  1 oweidner lsuusers 0 Jun  5 10:14 cmdline
-rw-r--r--  1 oweidner lsuusers 0 Jun  5 10:14 coredump_filter
lrwxrwxrwx  1 oweidner lsuusers 0 Jun  5 10:14 cwd -> /home/oweidner
-r--------  1 oweidner lsuusers 0 Jun  5 10:14 environ
lrwxrwxrwx  1 oweidner lsuusers 0 Jun  5 10:14 exe -> /bin/ls
dr-x------  2 oweidner lsuusers 0 Jun  5 10:14 fd
-r--------  1 oweidner lsuusers 0 Jun  5 10:14 limits
-rw-r--r--  1 oweidner lsuusers 0 Jun  5 10:14 loginuid
-r--r--r--  1 oweidner lsuusers 0 Jun  5 10:14 maps
-rw-------  1 oweidner lsuusers 0 Jun  5 10:14 mem
-r--r--r--  1 oweidner lsuusers 0 Jun  5 10:14 mounts
-r--------  1 oweidner lsuusers 0 Jun  5 10:14 mountstats
-r--r--r--  1 oweidner lsuusers 0 Jun  5 10:14 numa_maps
lrwxrwxrwx  1 oweidner lsuusers 0 Jun  5 10:14 root -> /
-r--------  1 oweidner lsuusers 0 Jun  5 10:14 smaps
-r--r--r--  1 oweidner lsuusers 0 Jun  5 10:14 stat
-r--r--r--  1 oweidner lsuusers 0 Jun  5 10:14 statm
-r--r--r--  1 oweidner lsuusers 0 Jun  5 10:14 status
dr-xr-xr-x  3 oweidner lsuusers 0 Jun  5 10:14 task
-r--r--r--  1 oweidner lsuusers 0 Jun  5 10:14 wchan

It might have something to do with the kernel, or more specifically the lustre 
filesystem? 

uname -a

Linux qb1 2.6.9-78.0.22.EL_lustre.1.6.7.2_loni #1 SMP Fri Nov 13 18:49:37 CST 
2009 x86_64 x86_64 x86_64 GNU/Linux

@giampaolo
Copy link
Owner Author

From g.rodola on June 05, 2012 09:28:36

I have no idea but it seems /io is not the only thing missing on your linux box.
On my Ubuntu 12.04 I get:


giampaolo@ubuntu:~/svn/psutil$ ls -l /proc/self/
totale 0
dr-xr-xr-x 2 giampaolo giampaolo 0 giu  5 18:27 attr
-rw-r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 autogroup
-r-------- 1 giampaolo giampaolo 0 giu  5 18:27 auxv
-r--r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 cgroup
--w------- 1 giampaolo giampaolo 0 giu  5 18:27 clear_refs
-r--r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 cmdline
-rw-r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 comm
-rw-r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 coredump_filter
-r--r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 cpuset
lrwxrwxrwx 1 giampaolo giampaolo 0 giu  5 18:27 cwd -> 
/home/giampaolo/svn/psutil
-r-------- 1 giampaolo giampaolo 0 giu  5 18:27 environ
lrwxrwxrwx 1 giampaolo giampaolo 0 giu  5 18:27 exe -> /bin/ls
dr-x------ 2 giampaolo giampaolo 0 giu  5 18:27 fd
dr-x------ 2 giampaolo giampaolo 0 giu  5 18:27 fdinfo
-r-------- 1 giampaolo giampaolo 0 giu  5 18:27 io
-r--r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 latency
-r--r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 limits
-rw-r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 loginuid
-r--r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 maps
-rw------- 1 giampaolo giampaolo 0 giu  5 18:27 mem
-r--r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 mountinfo
-r--r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 mounts
-r-------- 1 giampaolo giampaolo 0 giu  5 18:27 mountstats
dr-xr-xr-x 5 giampaolo giampaolo 0 giu  5 18:27 net
dr-x--x--x 2 giampaolo giampaolo 0 giu  5 18:27 ns
-r--r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 numa_maps
-rw-r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 oom_adj
-r--r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 oom_score
-rw-r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 oom_score_adj
-r--r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 pagemap
-r--r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 personality
lrwxrwxrwx 1 giampaolo giampaolo 0 giu  5 18:27 root -> /
-rw-r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 sched
-r--r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 schedstat
-r--r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 sessionid
-r--r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 smaps
-r--r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 stack
-r--r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 stat
-r--r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 statm
-r--r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 status
-r--r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 syscall
dr-xr-xr-x 3 giampaolo giampaolo 0 giu  5 18:27 task
-r--r--r-- 1 giampaolo giampaolo 0 giu  5 18:27 wchan

@giampaolo
Copy link
Owner Author

From ole.weid...@rutgers.edu on June 05, 2012 09:34:44

Hm, yeah -- it's a 5 year old 700-node cluster and I guess that makes it by 
definition a strange machine. 

However, do you think it would make sense to fix the implementation so that 
p.get_io_counters() raises and AttributeError (like on OS X) instead of 
claiming that the 'process no longer exists'?

@giampaolo
Copy link
Owner Author

From g.rodola on June 05, 2012 09:49:22

Definitively. I'll make it raise NotImplementedError though.
Done in r1339 .

Status: FixedInSVN
Labels: OpSys-Linux Milestone-0.5.0

@giampaolo
Copy link
Owner Author

From g.rodola on June 27, 2012 11:54:03

0.5.0 is finally out. Closing out as fixed.

Status: Fixed

@giampaolo
Copy link
Owner Author

From g.rodola on March 02, 2013 04:08:44

Updated csets after the SVN -> Mercurial migration: r1339 == revision ???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant