Changeset 9363 for branches/OaaS/HeuristicLab.Services.Hive.Web/Hive-3.3
- Timestamp:
- 04/16/13 13:13:41 (11 years ago)
- Location:
- branches/OaaS
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OaaS
- Property svn:ignore
-
old new 21 21 protoc.exe 22 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll 23 24 packages
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/OaaS/HeuristicLab.Services.Hive.Web/Hive-3.3/Status.aspx
r7047 r9363 8 8 <title>HeuristicLab Hive Status Monitor</title> 9 9 <link rel="icon" type="image/ico" href="HeuristicLab.ico" /> 10 <style type="text/css"> 11 .auto-style1 { 12 color: #F6921B; 13 } 14 .auto-style2 { 15 color: #000000; 16 } 17 </style> 10 18 </head> 11 19 <body> 12 20 <center> 13 <h1 >HeuristicLab Hive Status Monitor</h1>21 <h1 class="auto-style1">HeuristicLab <span class="auto-style2">Hive Status Monitor</span></h1> 14 22 </center> 15 23 <form id="form1" runat="server"> 16 24 <div> 17 Available Cores: 25 <strong>Overall Available Cores:</strong> 26 <asp:Label ID="overallAvailableCoresLabel" runat="server" /> 27 <br /> 28 <strong>Available Cores (real):</strong> 18 29 <asp:Label ID="availableCoresLabel" runat="server" /> 19 <br /> 20 Used Cores / Calculating Jobs: 30 <br /> 31 <strong>System-Wide Waiting Tasks:</strong> 32 <asp:Label ID="waitingJobsLabel" runat="server" /> 33 <br /> 34 <strong>Used Cores / Calculating Tasks:</strong> 21 35 <asp:Label ID="usedCoresLabel" runat="server" /> 22 36 <br /> 23 Waiting Jobs: 24 <asp:Label ID="waitingJobsLabel" runat="server" /> 25 <br /> 26 Avg. CPU Utilization: 37 <strong>Overall 38 Avg. CPU Utilization:</strong> 39 <asp:Label ID="overallCpuUtilizationLabel" runat="server" /> 40 <br /> 41 <strong>Real Avg. CPU Utilization:</strong> 27 42 <asp:Label ID="cpuUtilizationLabel" runat="server" /> 28 <br />29 Slaves (CPU Utilization):43 <br /> 44 <strong>Slaves (CPU Utilization):</strong> 30 45 <asp:Label ID="slavesLabel" runat="server" /> 31 46 <br /> 47 <strong>Groups:</strong> 48 <asp:Label ID="groupsLabel" runat="server" /> 49 <br /> 50 <br /> 51 <strong>Number of Calculating Tasks by User:</strong><asp:Table ID="calculatingTasksByUserTable" runat="server" GridLines="Both"> 52 <asp:TableRow runat="server" BackColor="#CCCCCC"> 53 <asp:TableCell runat="server" Font-Bold="False">User</asp:TableCell> 54 <asp:TableCell runat="server" Font-Bold="False">Nr. of Tasks</asp:TableCell> 55 </asp:TableRow> 56 </asp:Table> 57 <br /> 58 <strong>Number of Waiting Tasks by User:</strong><asp:Table ID="waitingTasksByUserTable" runat="server" GridLines="Both"> 59 <asp:TableRow runat="server" BackColor="#CCCCCC"> 60 <asp:TableCell runat="server" Font-Bold="False">User</asp:TableCell> 61 <asp:TableCell runat="server" Font-Bold="False">Nr. of Tasks</asp:TableCell> 62 </asp:TableRow> 63 </asp:Table> 64 <br /> 32 65 <br /> 33 Days:66 <strong>Days:</strong> 34 67 <asp:DropDownList ID="daysDropDownList" runat="server" AutoPostBack="True"> 35 68 <asp:ListItem Value="1"></asp:ListItem> … … 51 84 <br /> 52 85 <br /> 53 Avg. CPU Utilization History of all Slaves<br />54 <asp:Chart ID="cpuUtilizationChart" runat="server" Height="270px" Width="1 900px">86 <strong>Avg. CPU Utilization History of all Slaves</strong><br /> 87 <asp:Chart ID="cpuUtilizationChart" runat="server" Height="270px" Width="1280px"> 55 88 <Series> 56 89 <asp:Series BorderWidth="2" ChartType="Line" Color="0, 176, 80" Name="Series1" XValueType="DateTime" … … 73 106 </asp:Chart> 74 107 <br /> 75 Cores/Used Cores History<br />76 <asp:Chart ID="coresChart" runat="server" Palette="None" Width="1 900px" PaletteCustomColors="137, 165, 78; 185, 205, 150">108 <strong>Cores/Used Cores History</strong><br /> 109 <asp:Chart ID="coresChart" runat="server" Palette="None" Width="1280px" PaletteCustomColors="137, 165, 78; 185, 205, 150"> 77 110 <Series> 78 111 <asp:Series ChartType="Area" Name="Cores" XValueType="DateTime" YValueType="Double"> … … 97 130 </asp:Chart> 98 131 <br /> 99 Memory/Used Memory History (GB)<br />132 <strong>Memory/Used Memory History (GB)</strong><br /> 100 133 <asp:Chart ID="memoryChart" runat="server" Palette="None" PaletteCustomColors="170, 70, 67; 209, 147, 146" 101 Width="1 900px">134 Width="1280px"> 102 135 <Series> 103 136 <asp:Series ChartType="Area" Name="Cores" XValueType="DateTime" YValueType="Double"> … … 121 154 </ChartAreas> 122 155 </asp:Chart> 123 <br />124 156 <br /> 125 157 </div> -
branches/OaaS/HeuristicLab.Services.Hive.Web/Hive-3.3/Status.aspx.cs
r7259 r9363 42 42 IEnumerable<DT.Slave> onlineSlaves = new List<DT.Slave>(); 43 43 int currentlyJobsWaiting = 0; 44 Dictionary<Guid, int> calculatingTasksByUser = new Dictionary<Guid,int>(); 45 Dictionary<Guid, int> waitingTasksByUser = new Dictionary<Guid, int>(); 46 List<DT.Resource> groups = new List<DT.Resource>(); 47 48 transactionManager.UseTransaction(() => { 49 groups = dao.GetResources(x => x.ResourceType == "GROUP").ToList(); 50 }, false, false); 44 51 45 52 if (!string.IsNullOrEmpty(resourceName)) { … … 48 55 var resId = dao.GetResources(x => x.Name == resourceName).Single().Id; 49 56 resourceIds = dao.GetChildResources(resId).Select(x => x.Id).Union(new List<Guid> { resId }); 57 calculatingTasksByUser = dao.GetCalculatingTasksByUserForResources(resourceIds.ToList()); 58 waitingTasksByUser = dao.GetWaitingTasksByUserForResources(resourceIds.ToList()); 50 59 }, false, false); 51 60 } else { … … 53 62 { 54 63 resourceIds = dao.GetResources(x => true).Select(y => y.Id); 64 calculatingTasksByUser = dao.GetCalculatingTasksByUser(); 65 waitingTasksByUser = dao.GetWaitingTasksByUser(); 55 66 }, false, false); 56 67 } … … 59 70 { 60 71 onlineSlaves = dao.GetSlaves(x => (x.SlaveState == DA.SlaveState.Calculating || x.SlaveState == DA.SlaveState.Idle) && resourceIds.Contains(x.ResourceId)); 61 currentlyJobsWaiting = dao.Get Tasks(x => x.State == DA.TaskState.Waiting).Count();72 currentlyJobsWaiting = dao.GetLightweightTasks(x => x.State == DA.TaskState.Waiting).Count(); 62 73 }, false, false); 63 74 64 int currentlyAvailableCores = onlineSlaves.Where(s => s.Cores.HasValue).Sum(s => s.Cores.Value); 65 int currentlyUsedCores = currentlyAvailableCores - onlineSlaves.Where(s => s.FreeCores.HasValue).Sum(s => s.FreeCores.Value); 75 int overallCurrentlyAvailableCores = onlineSlaves.Where(s => s.Cores.HasValue).Sum(s => s.Cores.Value); 76 int currentlyAvailableCores = onlineSlaves.Where(s => s.Cores.HasValue && s.IsAllowedToCalculate).Sum(s => s.Cores.Value); 77 int currentlyUsedCores = overallCurrentlyAvailableCores - onlineSlaves.Where(s => s.FreeCores.HasValue).Sum(s => s.FreeCores.Value); 66 78 79 this.overallAvailableCoresLabel.Text = overallCurrentlyAvailableCores.ToString(); 67 80 this.availableCoresLabel.Text = currentlyAvailableCores.ToString(); 68 81 this.usedCoresLabel.Text = currentlyUsedCores.ToString(); … … 70 83 71 84 slavesLabel.Text = string.Join(", ", onlineSlaves.Select(x => string.Format("<a href=\"?resource={0}\">{0}</a> ({1} %)", x.Name, Math.Round(x.CpuUtilization, 2)))); 85 groupsLabel.Text = "<a href=\"Status.aspx\">All</a>, "; 86 groupsLabel.Text += string.Join(", ", groups.Select(x => string.Format("<a href=\"?resource={0}\">{0}</a>", x.Name))); 72 87 73 cpuUtilizationLabel.Text = (onlineSlaves.Count() > 0 ? Math.Round(onlineSlaves.Average(s => s.CpuUtilization), 2).ToString() : "0.0") + " %"; 88 overallCpuUtilizationLabel.Text = (onlineSlaves.Count() > 0 ? Math.Round(onlineSlaves.Average(s => s.CpuUtilization), 2).ToString() : "0.0") + " %"; 89 cpuUtilizationLabel.Text = (onlineSlaves.Count() > 0 && onlineSlaves.Where(x => x.IsAllowedToCalculate).Count() > 0 ? Math.Round(onlineSlaves.Where(x => x.IsAllowedToCalculate).Average(s => s.CpuUtilization), 2).ToString() : "0.0") + " %"; 74 90 75 91 DT.Statistics[] stats = new DT.Statistics[0]; … … 101 117 memoryChart.Series[1].Points.AddXY(s.TimeStamp.ToOADate(), usedMemory / 1024.0); 102 118 } 119 120 GenerateTasksByUserTable(waitingTasksByUser, waitingTasksByUserTable); 121 GenerateTasksByUserTable(calculatingTasksByUser, calculatingTasksByUserTable); 103 122 } 123 124 private void GenerateTasksByUserTable(Dictionary<Guid, int> tasksByUser, Table table) { 125 foreach (var kvp in tasksByUser) { 126 TableRow curRow = new TableRow(); 127 TableCell cellUser = new TableCell(); 128 cellUser.Text = ServiceLocator.Instance.UserManager.GetUserById(kvp.Key).UserName; 129 TableCell cellCnt = new TableCell(); 130 cellCnt.Text = kvp.Value.ToString(); 131 132 curRow.Cells.Add(cellUser); 133 curRow.Cells.Add(cellCnt); 134 table.Rows.Add(curRow); 135 } 136 if (tasksByUser.Count() > 0) { 137 TableRow sumRow = new TableRow(); 138 TableCell sumCell = new TableCell(); 139 sumCell.BorderWidth = Unit.Pixel(3); 140 sumCell.Text = tasksByUser.Sum(x => x.Value).ToString(); 141 sumRow.Cells.Add(new TableCell()); 142 sumRow.Cells.Add(sumCell); 143 table.Rows.Add(sumRow); 144 } 145 } 104 146 } -
branches/OaaS/HeuristicLab.Services.Hive.Web/Hive-3.3/Web.config
r6983 r9363 59 59 <bindings> 60 60 <wsHttpBinding> 61 <binding name="WSHttpBinding_IHiveService" receiveTimeout="00:1 0:00" sendTimeout="00:10:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">61 <binding name="WSHttpBinding_IHiveService" receiveTimeout="00:15:00" sendTimeout="00:10:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"> 62 62 <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> 63 63 <security mode="Message">
Note: See TracChangeset
for help on using the changeset viewer.