Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9023


Ignore:
Timestamp:
12/11/12 15:37:03 (11 years ago)
Author:
ascheibe
Message:

#1994 added displaying of real cpu load and real available cores

Location:
trunk/sources/HeuristicLab.Services.Hive.Web/Hive-3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Services.Hive.Web/Hive-3.3/Status.aspx

    r9022 r9023  
    1515  <form id="form1" runat="server">
    1616  <div>
    17     Available Cores:
     17      Overall Available Cores:
     18    <asp:Label ID="overallAvailableCoresLabel" runat="server" />
     19      <br />
     20      Available Cores (real):
    1821    <asp:Label ID="availableCoresLabel" runat="server" />
    19     <br />
     22      <br />
    2023    Used Cores / Calculating Jobs:
    2124    <asp:Label ID="usedCoresLabel" runat="server" />
     
    2427    <asp:Label ID="waitingJobsLabel" runat="server" />
    2528    <br />
     29      Overall
    2630    Avg. CPU Utilization:
     31    <asp:Label ID="overallCpuUtilizationLabel" runat="server" />
     32      <br />
     33      Real Avg. CPU Utilization:
    2734    <asp:Label ID="cpuUtilizationLabel" runat="server" />
    28       <br />
     35      &nbsp;<br />
    2936    Slaves (CPU Utilization):
    3037    <asp:Label ID="slavesLabel" runat="server" />
    3138      <br />
    3239      <br />
    33       Number of calculating tasks by user:<asp:Table ID="calculatingTasksByUserTable" runat="server" GridLines="Both">
    34           <asp:TableRow runat="server">
     40      Number of Calculating Tasks by User:<asp:Table ID="calculatingTasksByUserTable" runat="server" GridLines="Both">
     41          <asp:TableRow runat="server" BackColor="#CCCCCC">
    3542              <asp:TableCell runat="server" Font-Bold="False">User</asp:TableCell>
    36               <asp:TableCell runat="server" Font-Bold="False">Nr. of tasks</asp:TableCell>
     43              <asp:TableCell runat="server" Font-Bold="False">Nr. of Tasks</asp:TableCell>
    3744          </asp:TableRow>
    3845      </asp:Table>
    3946      <br />
    40       Number of waiting tasks by user:<asp:Table ID="waitingTasksByUserTable" runat="server" GridLines="Both">
    41           <asp:TableRow runat="server">
     47      Number of Waiting Tasks by User:<asp:Table ID="waitingTasksByUserTable" runat="server" GridLines="Both">
     48          <asp:TableRow runat="server" BackColor="#CCCCCC">
    4249              <asp:TableCell runat="server" Font-Bold="False">User</asp:TableCell>
    43               <asp:TableCell runat="server" Font-Bold="False">Nr. of tasks</asp:TableCell>
     50              <asp:TableCell runat="server" Font-Bold="False">Nr. of Tasks</asp:TableCell>
    4451          </asp:TableRow>
    4552      </asp:Table>
  • trunk/sources/HeuristicLab.Services.Hive.Web/Hive-3.3/Status.aspx.cs

    r9022 r9023  
    6666    }, false, false);
    6767
    68     int currentlyAvailableCores = onlineSlaves.Where(s => s.Cores.HasValue).Sum(s => s.Cores.Value);
    69     int currentlyUsedCores = currentlyAvailableCores - onlineSlaves.Where(s => s.FreeCores.HasValue).Sum(s => s.FreeCores.Value);
     68    int overallCurrentlyAvailableCores = onlineSlaves.Where(s => s.Cores.HasValue).Sum(s => s.Cores.Value);
     69    int currentlyAvailableCores = onlineSlaves.Where(s => s.Cores.HasValue && s.IsAllowedToCalculate).Sum(s => s.Cores.Value);
     70    int currentlyUsedCores = overallCurrentlyAvailableCores - onlineSlaves.Where(s => s.FreeCores.HasValue).Sum(s => s.FreeCores.Value);
    7071   
     72    this.overallAvailableCoresLabel.Text = overallCurrentlyAvailableCores.ToString();
    7173    this.availableCoresLabel.Text = currentlyAvailableCores.ToString();
    7274    this.usedCoresLabel.Text = currentlyUsedCores.ToString();
     
    7577    slavesLabel.Text = string.Join(", ", onlineSlaves.Select(x => string.Format("<a href=\"?resource={0}\">{0}</a> ({1} %)", x.Name, Math.Round(x.CpuUtilization, 2))));
    7678
    77     cpuUtilizationLabel.Text = (onlineSlaves.Count() > 0 ? Math.Round(onlineSlaves.Average(s => s.CpuUtilization), 2).ToString() : "0.0") + " %";
     79    overallCpuUtilizationLabel.Text = (onlineSlaves.Count() > 0 ? Math.Round(onlineSlaves.Average(s => s.CpuUtilization), 2).ToString() : "0.0") + " %";
     80    cpuUtilizationLabel.Text = (onlineSlaves.Count() > 0 ? Math.Round(onlineSlaves.Where(x => x.IsAllowedToCalculate).Average(s => s.CpuUtilization), 2).ToString() : "0.0") + " %";
    7881
    7982    DT.Statistics[] stats = new DT.Statistics[0];   
Note: See TracChangeset for help on using the changeset viewer.