Bug 639398 - Need Open Files/File Handle Count metric for JVM and other processes
Summary: Need Open Files/File Handle Count metric for JVM and other processes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 3.0.0
Hardware: All
OS: All
high
medium
Target Milestone: ---
: JON 3.1.0
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 747925
Blocks: jon30-sprint8 jon310-sprint11, rhq44-sprint11
TreeView+ depends on / blocked
 
Reported: 2010-10-01 16:12 UTC by Larry O'Leary
Modified: 2018-10-27 11:48 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-03 15:18:26 UTC
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker PRODMGT-31 0 Major Pending Product Management Triage Alerts need to be able to compare two resource metrics to one another 2017-11-02 07:54:18 UTC

Description Larry O'Leary 2010-10-01 16:12:25 UTC
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 15:35:48 UTC
=== 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 21:22:20 UTC
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 15:47:45 UTC
That should be disabled by default with a comment about Win*

Comment 4 Charles Crouch 2011-09-30 17:50:30 UTC
removing superfluous trackers

Comment 5 Charles Crouch 2012-02-07 15:20:58 UTC
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 20:54:11 UTC
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>
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 20:59:13 UTC
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 20:15:54 UTC
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 20:16:38 UTC
Created attachment 579104 [details]
image documenting i don't see open files metric under operating system

Comment 10 Lukas Krejci 2012-04-23 08:45:22 UTC
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 11:55:55 UTC
attaching screenshot of the verification per comment #10.

Comment 12 Mike Foley 2012-04-23 11:56:31 UTC
Created attachment 579507 [details]
screenshot documenting open files metric per comment #10

Comment 13 Heiko W. Rupp 2013-09-03 15:18:26 UTC
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.