Package wt.fc.jmx

Interface TopSQLMonitorMBean

All Superinterfaces:
SelfEmailingMBean

public interface TopSQLMonitorMBean extends SelfEmailingMBean
Provides monitoring of the top, most-expensive SQL statements.

Supported API: true

Extendable: true
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    emailMatchingSQLData(String sqlRegexp, String addressesOrEmailList, String subject)
    E-mails information on usage and expense thus far in the current measurement interval of SQL statements that match the given regular expression

    Supported API: true
    long
    Number of calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack.
    double
    Elapsed seconds for any single call to a given SQL statement above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack.
    Returns information on usage and expense thus far in the current measurement interval of SQL statements that match the given regular expression

    Supported API: true
    int
    Maximum number of SQL statements which have not yet reached any threshold to track.
    double
    Minimum total elapsed seconds for calls to a given SQL statement for it to be included in results reported with INFO (vs.
    int
    Number of most expensive SQL statements to report.
    double
    Percentage of total elapsed SQL call time for calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack if it also meets or exceeds TotalElapsedSecondsThreshold.
    Information on the top, most expensive SQL statements thus far in the current measurement interval; does not reset measurement interval

    Supported API: true
    double
    Total elapsed seconds for calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack if it also meets or exceeds PercentTotalElapsedTimeThreshold.
    int
    Length of interval in seconds over which SQL statements are to be tracked; at the end of each interval information on the top, most expsensive SQL statements is logged to the wt.fc.jmx.TopSQLMonitor.sqlStats.interval.quiet logger.
    void
    Reset current measurement interval and log information on the top, most expsensive SQL statements in the previous measurement interval to the wt.fc.jmx.TopSQLMonitor.sqlStats.interval.forced logger.
    void
    Logs information on usage and expense thus far in the current measurement interval of SQL statements that match the given regular expression

    Supported API: true
    void
    Logs information on the top, most expensive SQL statements thus far in the current measurement interval; does not reset measurement interval

    Supported API: true
    void
    Reset current measurement interval.
    void
    setCallCountThreshold(long callCountThreshold)
    Number of calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack.
    void
    setElapsedSecondsThreshold(double elapsedSecondsThreshold)
    Elapsed seconds for any single call to a given SQL statement above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack.
    void
    setMaxUnderThresholdStatementsToTrack(int maxUnderThresholdStatementsToTrack)
    Maximum number of SQL statements which have not yet reached any threshold to track.
    void
    setMinTotalElapsedSecondsToReport(double minTotalElapsedSecondsToReport)
    Minimum total elapsed seconds for calls to a given SQL statement for it to be included in results reported with INFO (vs.
    void
    setNumberOfTopStatementsToReport(int numberOfTopStatementsToReport)
    Number of most expensive SQL statements to report.
    void
    setPercentTotalElapsedTimeThreshold(double percentTotalElapsedTimeThreshold)
    Percentage of total elapsed SQL call time for calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack if it also meets or exceeds TotalElapsedSecondsThreshold.
    void
    setTotalElapsedSecondsThreshold(double totalElapsedSecondsThreshold)
    Total elapsed seconds for calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack if it also meets or exceeds PercentTotalElapsedTimeThreshold.
    void
    setTrackingIntervalSeconds(int trackingIntervalSeconds)
    Length of interval in seconds over which SQL statements are to be tracked; at the end of each interval information on the top, most expsensive SQL statements is logged to the wt.fc.jmx.TopSQLMonitor.sqlStats.interval.quiet logger.

    Methods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean

    emailThisMBean
  • Method Details

    • getNumberOfTopStatementsToReport

      int getNumberOfTopStatementsToReport()
      Number of most expensive SQL statements to report.

      Supported API: true
    • setNumberOfTopStatementsToReport

      void setNumberOfTopStatementsToReport(int numberOfTopStatementsToReport)
      Number of most expensive SQL statements to report.

      Supported API: true
    • getMinTotalElapsedSecondsToReport

      double getMinTotalElapsedSecondsToReport()
      Minimum total elapsed seconds for calls to a given SQL statement for it to be included in results reported with INFO (vs. DEBUG) level logging.

      Supported API: true
    • setMinTotalElapsedSecondsToReport

      void setMinTotalElapsedSecondsToReport(double minTotalElapsedSecondsToReport)
      Minimum total elapsed seconds for calls to a given SQL statement for it to be included in results reported with INFO (vs. DEBUG) level logging.

      Supported API: true
    • getTrackingIntervalSeconds

      int getTrackingIntervalSeconds()
      Length of interval in seconds over which SQL statements are to be tracked; at the end of each interval information on the top, most expsensive SQL statements is logged to the wt.fc.jmx.TopSQLMonitor.sqlStats.interval.quiet logger.

      Supported API: true
    • setTrackingIntervalSeconds

      void setTrackingIntervalSeconds(int trackingIntervalSeconds)
      Length of interval in seconds over which SQL statements are to be tracked; at the end of each interval information on the top, most expsensive SQL statements is logged to the wt.fc.jmx.TopSQLMonitor.sqlStats.interval.quiet logger.

      Supported API: true
    • getMaxUnderThresholdStatementsToTrack

      int getMaxUnderThresholdStatementsToTrack()
      Maximum number of SQL statements which have not yet reached any threshold to track. This is effectively the size of an LRU cache of SQL statements which have not yet been found to be interesting.

      Supported API: true
    • setMaxUnderThresholdStatementsToTrack

      void setMaxUnderThresholdStatementsToTrack(int maxUnderThresholdStatementsToTrack)
      Maximum number of SQL statements which have not yet reached any threshold to track. This is effectively the size of an LRU cache of SQL statements which have not yet been found to be interesting.

      Supported API: true
    • getCallCountThreshold

      long getCallCountThreshold()
      Number of calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack. Non-positive values of this attribute imply that no number of calls is sufficient to consider a SQL statement interesting.

      Supported API: true
    • setCallCountThreshold

      void setCallCountThreshold(long callCountThreshold)
      Number of calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack. Non-positive values of this attribute imply that no number of calls is sufficient to consider a SQL statement interesting.

      Supported API: true
    • getElapsedSecondsThreshold

      double getElapsedSecondsThreshold()
      Elapsed seconds for any single call to a given SQL statement above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack.

      Supported API: true
    • setElapsedSecondsThreshold

      void setElapsedSecondsThreshold(double elapsedSecondsThreshold)
      Elapsed seconds for any single call to a given SQL statement above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack.

      Supported API: true
    • getTotalElapsedSecondsThreshold

      double getTotalElapsedSecondsThreshold()
      Total elapsed seconds for calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack if it also meets or exceeds PercentTotalElapsedTimeThreshold.

      Supported API: true
    • setTotalElapsedSecondsThreshold

      void setTotalElapsedSecondsThreshold(double totalElapsedSecondsThreshold)
      Total elapsed seconds for calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack if it also meets or exceeds PercentTotalElapsedTimeThreshold.

      Supported API: true
    • getPercentTotalElapsedTimeThreshold

      double getPercentTotalElapsedTimeThreshold()
      Percentage of total elapsed SQL call time for calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack if it also meets or exceeds TotalElapsedSecondsThreshold.

      Supported API: true
    • setPercentTotalElapsedTimeThreshold

      void setPercentTotalElapsedTimeThreshold(double percentTotalElapsedTimeThreshold)
      Percentage of total elapsed SQL call time for calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack if it also meets or exceeds TotalElapsedSecondsThreshold.

      Supported API: true
    • getTopSQLData

      CompositeData getTopSQLData() throws OpenDataException
      Information on the top, most expensive SQL statements thus far in the current measurement interval; does not reset measurement interval

      Supported API: true
      Throws:
      OpenDataException
    • getMatchingSQLData

      @MBeanOperationImpact(0) CompositeData getMatchingSQLData(String sqlRegexp) throws OpenDataException
      Returns information on usage and expense thus far in the current measurement interval of SQL statements that match the given regular expression

      Supported API: true
      Parameters:
      sqlRegexp - Regular expression (as per java.util.regex.Pattern) used to match SQL statements
      Throws:
      OpenDataException
    • emailMatchingSQLData

      @MBeanOperationImpact(0) void emailMatchingSQLData(String sqlRegexp, String addressesOrEmailList, String subject) throws IOException
      E-mails information on usage and expense thus far in the current measurement interval of SQL statements that match the given regular expression

      Supported API: true
      Parameters:
      sqlRegexp - Regular expression (as per java.util.regex.Pattern) used to match SQL statements
      addressesOrEmailList - Comma-delimited list of e-mail addresses or name of e-mail list to send e-mail to
      subject - Subject to give e-mail
      Throws:
      IOException
    • logTopSQLData

      @MBeanOperationImpact(0) void logTopSQLData()
      Logs information on the top, most expensive SQL statements thus far in the current measurement interval; does not reset measurement interval

      Supported API: true
    • logMatchingSQLData

      @MBeanOperationImpact(0) void logMatchingSQLData(String sqlRegexp)
      Logs information on usage and expense thus far in the current measurement interval of SQL statements that match the given regular expression

      Supported API: true
      Parameters:
      sqlRegexp - Regular expression (as per java.util.regex.Pattern) used to match SQL statements
    • resetTopSQLData

      @MBeanOperationImpact(0) void resetTopSQLData()
      Reset current measurement interval. Information on the top, most expsensive SQL statements in the previous measurement interval is logged to the wt.fc.jmx.TopSQLMonitor.sqlStats.interval.quiet logger as would normally occur at the end of a measurement interval.

      Supported API: true
    • logAndResetTopSQLData

      @MBeanOperationImpact(0) void logAndResetTopSQLData()
      Reset current measurement interval and log information on the top, most expsensive SQL statements in the previous measurement interval to the wt.fc.jmx.TopSQLMonitor.sqlStats.interval.forced logger.

      Supported API: true