Bug 639398 - Need Open Files/File Handle Count metric for JVM and other processes
Need Open Files/File Handle Count metric for JVM and other processes
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
3.0.0
All All
high Severity medium (vote)
: ---
: JON 3.1.0
Assigned To: RHQ Project Maintainer
Mike Foley
: FutureFeature
Depends On: 747925
Blocks: jon30-sprint8 jon310-sprint11/rhq44-sprint11
  Show dependency treegraph
 
Reported: 2010-10-01 12:12 EDT by Larry O'Leary
Modified: 2013-09-03 11:18 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-03 11:18:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
image documenting i don't see open files metric under operating system (26.21 KB, image/png)
2012-04-20 16:16 EDT, Mike Foley
no flags Details
screenshot documenting open files metric per comment #10 (95.48 KB, image/png)
2012-04-23 07:56 EDT, Mike Foley
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker PRODMGT-31 Major Pending Product Management Triage Add more metrics to JON's plug-ins - Datasource Max Pool Size/MDB Invocations/Open Files Count 2014-07-11 00:52:45 EDT

  None (edit)
Description Larry O'Leary 2010-10-01 12:12:25 EDT
As most operating systems impose a file handle limit for each process, it is common for a process to crash or stop functioning correctly due to hitting such a limit. The ability to monitor and alert on a metric that indicates what the current open file count is for a process and what the file limit is would be very beneficial to the management and administration of enterprise platforms and servers.
Comment 1 Larry O'Leary 2010-10-07 11:35:48 EDT
=== In Red Hat Customer Portal Case 00350784 ===
--- Comment by Hasse, Scott on 10/7/2010 10:11 AM ---

The mbean is

java.lang:type=OperatingSystem
attribute:
OpenFileDescriptorCount

This is along side of other metrics already gathered such as ProcessCpuTime.  I believe this is attribute is not available on Windows.

Scott
Comment 2 Lukas Krejci 2011-01-20 16:22:20 EST
Adding this should be pretty easy, although as correctly noted, this attribute is not present on Windows.

We'd have to check how the generic JMX plugin behaves when a mbean attribute is not present while reading in a measurement, but even modifying that behaviour wouldn't be difficult.
Comment 3 Heiko W. Rupp 2011-09-28 11:47:45 EDT
That should be disabled by default with a comment about Win*
Comment 4 Charles Crouch 2011-09-30 13:50:30 EDT
removing superfluous trackers
Comment 5 Charles Crouch 2012-02-07 10:20:58 EST
Targeting for JON3.1.0, conditional on https://bugzilla.redhat.com/show_bug.cgi?id=747925 getting fixed
Comment 6 Lukas Krejci 2012-03-21 16:54:11 EDT
Test:

1) Inventory RHQ Agent resource on a Linux machine
2) Enable the "Open Files" metric on the "Operating System" service under the JVM of the RHQ Agent resource (and lower the default collection interval if needed)
3) Check that the metric is being collected.
4) Inventory the RHQ Agent on a Windows machine
5) repeat 2)
6) Check that all other metrics on that resource are still collected, while "Open Files" remains NaN (because there is no support for this metric on Windows, as noted in the metric's description).

commit 8b3a8efb13785bd10dd9491b4341af27eca5148c
Author: Lukas Krejci <lkrejci@redhat.com>
Date:   Wed Mar 21 21:49:49 2012 +0100

    [BZ 639398] - Adding an "Open Files" metric to the "Operating System"
    resource type.
Comment 7 Lukas Krejci 2012-03-21 16:59:13 EDT
Note that this metric is present in the generic "JMX Server" resource type inherited by many plugins - for example the "JVM" resource under RHQ Agent, AS servers, tomcat, etc, should automatically gain this feature, too.

Manually imported JMX server should have this metric available, too.

On the other hand, I don't think that the above needs to be specifically tested, because that is a feature of our plugin type system. It is enough to merely check for presence of this metric under, say, an inventoried RHQ Server.

Note also that for this new metric to appear under the RHQ Server using a database that has been kept from previous builds, the fix for bug 747925 needs to be in and working (which should be the case with master).
Comment 8 Mike Foley 2012-04-20 16:15:54 EDT
Build from:  http://hudson.qa.jboss.com/hudson/job/rhq-master/

I am on Fedora

Under RHQ Agent ... I don't see the open files metric.  Attaching image to document my observations.
Comment 9 Mike Foley 2012-04-20 16:16:38 EDT
Created attachment 579104 [details]
image documenting i don't see open files metric under operating system
Comment 10 Lukas Krejci 2012-04-23 04:45:22 EDT
The screenshot show the resource tree. The Open Files is a metric and as such doesn't appear in the resource tree.

Click on the Operating System resource under a JVM resource and navigate to its Monitoring -> Schedules subtab. You should see the Open Files metric there.
Comment 11 Mike Foley 2012-04-23 07:55:55 EDT
attaching screenshot of the verification per comment #10.
Comment 12 Mike Foley 2012-04-23 07:56:31 EDT
Created attachment 579507 [details]
screenshot documenting open files metric per comment #10
Comment 13 Heiko W. Rupp 2013-09-03 11:18:26 EDT
Bulk closing of old issues in VERIFIED state.

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