[mod_cluster-issues] [JBoss JIRA] Commented: (MODCLUSTER-234) AverageSystemLoadMetric in Tomcat 6 broken on Windows

Jean-Frederic Clere (JIRA) jira-events at lists.jboss.org
Thu Apr 21 04:08:33 EDT 2011


    [ https://issues.jboss.org/browse/MODCLUSTER-234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597005#comment-12597005 ] 

Jean-Frederic Clere commented on MODCLUSTER-234:
------------------------------------------------

try:
import java.lang.management.*;
public class SystemLoadAverage {
  public static void main(String[] args) {
    System.out.println("Load: " + ManagementFactory.getOperatingSystemMXBean().getSystemLoadAverage());
  }
}

It return -1.0 and the java doc says:
"getSystemLoadAverage

double getSystemLoadAverage()

    Returns the system load average for the last minute. The system load average is the sum of the number of runnable entities queued to the available processors and the number of runnable entities running on the available processors averaged over a period of time. The way in which the load average is calculated is operating system specific but is typically a damped time-dependent average.

    If the load average is not available, a negative value is returned.

    This method is designed to provide a hint about the system load and may be queried frequently. The load average may be unavailable on some platform where it is expensive to implement this method.

    Returns:
        the system load average; or a negative value if not available.
    Since:
        1.6

"

> AverageSystemLoadMetric in Tomcat 6 broken on Windows
> -----------------------------------------------------
>
>                 Key: MODCLUSTER-234
>                 URL: https://issues.jboss.org/browse/MODCLUSTER-234
>             Project: mod_cluster
>          Issue Type: Bug
>    Affects Versions: 1.0.10
>         Environment: Windows 2008, Tomcat 6
>            Reporter: Radoslav Husar
>            Assignee: Jean-Frederic Clere
>            Priority: Blocker
>         Attachments: Screenshot-rdesktop - vmg14.mw.lab.eng.bos.redhat.com.png
>
>
> If the AverageSystemLoadMetric is specified
> {code}
>   <Listener className="org.jboss.modcluster.ModClusterListener" 
> 	loadMetricClass="org.jboss.modcluster.load.metric.impl.AverageSystemLoadMetric"
>  />
> {code}
> in Tomcat 6 that is supposed to  Return  CPU load - it alawys returns 100 all the time. See screenshot.
> Reported by Igor

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the mod_cluster-issues mailing list