Bug 436191 - iostat with -n flag continously creates new open file handles.
iostat with -n flag continously creates new open file handles.
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sysstat (Show other bugs)
x86_64 Linux
low Severity low
: rc
: ---
Assigned To: Ivana Varekova
Brian Brock
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2008-03-05 15:41 EST by Christopher Karel
Modified: 2013-04-15 04:54 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-10-08 04:07:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Christopher Karel 2008-03-05 15:41:01 EST
Description of problem:
When using the -n flag, iostat creates new open file handles while running, and
fails to close them.  One new handle opening /proc/<iostat's-PID>/mountstats per

     Version-Release number of selected components:
# rpm -q sysstat
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.1 (Tikanga)
# uname -a
Linux hostname 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:19 EDT 2007 x86_64

     Steps to Reproduce:
1. Run iostat with the -n flag, and an interval value.  (EG:  iostat -n 1)
2. Use lsof to determine the number of open files for a process.
3. Iostat will eventually crash because of too many open files.
1. Start an iostat command running in one terminal window:  iostat -n 1
2. In another terminal window, monitor open file usage with lsof:  lsof -c
/iostat/ | wc
3. Rerunning the lsof command above will return with an ever increasing number
of open files.
4. After 17 minutes and 2 seconds of running, iostat will crash with the error:
 "fopen: Too many open files"

# time iostat -n 1 > /dev/null &
[2]     2525
# lsof -c /iostat/ | wc
      22     195    1624
# lsof -c /iostat/ | wc
      38     339    2872
# lsof -c /iostat/ | wc
     259    2328   20110
# lsof -c /iostat/ | wc
     306    2751   23776
# lsof -c /iostat/ | wc
     507    4560   39454
# lsof -c /iostat/ | wc
     959    8628   74710
# fopen: Too many open files

real    17m2.04s
user    0m0.08s
sys     0m0.94s
Comment 1 Denise Dumas 2008-08-07 15:58:53 EDT
one command patch, no problem - Fast Trackable
Comment 2 Ivana Varekova 2008-08-14 09:59:57 EDT
Fixed in sysstat-7.0.2-1.el5.
Comment 7 errata-xmlrpc 2008-10-08 04:07:11 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

Comment 8 Greg Bradner 2009-12-01 18:18:03 EST
(In reply to comment #2)
> Fixed in sysstat-7.0.2-1.el5.  

I have sysstat-7.0.2-3.el5 installed on RHEL 5.3 and it is not fixed.
Comment 9 Greg Bradner 2009-12-01 18:18:52 EST
So sorry. Wrong ticket.

Note You need to log in before you can comment on or make changes to this bug.