tigase.server.sreceiver.sysmon

## Class CPUMonitor

- java.lang.Object
- - tigase.server.sreceiver.sysmon.AbstractMonitor
  - - tigase.server.sreceiver.sysmon.CPUMonitor

- All Implemented Interfaces:
    ResourceMonitorIfc

      public class CPUMonitor
      extends AbstractMonitor

  Created: Dec 10, 2008 12:27:15 PM
  Version:
    $Rev$
  Author:
    Artur Hefczyc

- - ### Field Summary

    - ### Fields inherited from class tigase.server.sreceiver.sysmon.AbstractMonitor

      `treshold, warningsSent`

    - ### Fields inherited from interface tigase.server.sreceiver.sysmon.ResourceMonitorIfc

      `INTERVAL_10SECS, INTERVAL_1DAY, INTERVAL_1HOUR, INTERVAL_1MIN, MINUTE, SECOND`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CPUMonitor()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `float` | `calcCPUUse(long prevUptime, long currUptime, long prevCputime, long currCputime, int cpus)`
    `void` | `check10Secs(Queue<Packet> results)`
    `String` | `commandsHelp()`
    `void` | `destroy()`
    `String` | `getState()`
    `void` | `getStatistics(StatisticsList list)`
    `void` | `init(JID jid, float treshold, SystemMonitorTask smTask)`
    `boolean` | `isMonitorCommand(String com)`
    `String` | `runCommand(String[] com)`

    - ### Methods inherited from class tigase.server.sreceiver.sysmon.AbstractMonitor

      `check1Day, check1Hour, check1Min, prepareCalmDown, prepareWarning, resetWarnings, sendWarningOut, setValueInArr, setValueInArr`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CPUMonitor

          public CPUMonitor()

  - ### Method Detail

    - #### runCommand

          public String runCommand(String[] com)

      Specified by:
        `runCommand` in interface `ResourceMonitorIfc`
      Overrides:
        `runCommand` in class `AbstractMonitor`

    - #### commandsHelp

          public String commandsHelp()

      Specified by:
        `commandsHelp` in interface `ResourceMonitorIfc`
      Overrides:
        `commandsHelp` in class `AbstractMonitor`

    - #### isMonitorCommand

          public boolean isMonitorCommand(String com)

      Specified by:
        `isMonitorCommand` in interface `ResourceMonitorIfc`
      Overrides:
        `isMonitorCommand` in class `AbstractMonitor`

    - #### init

          public void init(JID jid,
                           float treshold,
                           SystemMonitorTask smTask)

      Specified by:
        `init` in interface `ResourceMonitorIfc`
      Overrides:
        `init` in class `AbstractMonitor`

    - #### check10Secs

          public void check10Secs(Queue<Packet> results)

      Specified by:
        `check10Secs` in interface `ResourceMonitorIfc`
      Overrides:
        `check10Secs` in class `AbstractMonitor`

    - #### getState

          public String getState()

    - #### destroy

          public void destroy()

    - #### getStatistics

          public void getStatistics(StatisticsList list)

      Specified by:
        `getStatistics` in interface `ResourceMonitorIfc`
      Overrides:
        `getStatistics` in class `AbstractMonitor`

    - #### calcCPUUse

          public float calcCPUUse(long prevUptime,
                                  long currUptime,
                                  long prevCputime,
                                  long currCputime,
                                  int cpus)

Copyright © 2022 "Tigase, Inc.". All rights reserved.