private void BindGraidPageSpace() { int PageCount = 0; DataTable dt = new PerfApplicationDA().selecPageSpace(pgPageSpace.PageIndex, pgPageSpace.PageSize, out PageCount, Request.QueryString["id"]); gvPageSpace.DataSource = dt; gvPageSpace.DataBind(); this.pgPageSpace.RecordCount = PageCount; }
private void BindGraidDiskStatistics() { int PageCount = 0; DataTable dt = new PerfApplicationDA().selecDiskStatistics(pgDiskStatistics.PageIndex, pgDiskStatistics.PageSize, out PageCount, Request.QueryString["id"]); gvDiskStatistics.DataSource = dt; gvDiskStatistics.DataBind(); this.pgDiskStatistics.RecordCount = PageCount; }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { DataTable dt = new PerfApplicationDA().GetTopBuss(); if (null != dt) { rpApp.DataSource = dt; rpApp.DataBind(); } } }
public void HeadHD(List<ApplListOR> list) { string id = Request.QueryString["GUID"]; DataTable objDev = new PerfApplicationDA().GetSysLay(Convert.ToInt32(id), 1); if (objDev != null) { ApplListOR obj = HeadStatusAndWaring(objDev); obj.DeviceID = id; obj.DeviceName = "服务器"; obj.TypeName = "业务系统"; obj.TypeEN = "server"; list.Add(obj); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { lblDepart.Text = base.CurrentUser.DepartmentName; //加载,应用系统 DataTable dt = new PerfApplicationDA().GetTopBuss(); dpdSystem.DataSource = dt; dpdSystem.DataTextField = "DeviceName"; dpdSystem.DataValueField = "DeviceID"; dpdSystem.DataBind(); if (dt != null && dt.Rows.Count > 0) { LoadData(Convert.ToInt32(dt.Rows[0]["DeviceID"].ToString())); } } }
public void HeadOther(List<ApplListOR> list, string mtype) { string id = Request.QueryString["GUID"]; DataTable dt = null; switch (mtype) { case "server": dt = new PerfApplicationDA().GetSysLay(Convert.ToInt32(id), 1); break; case "use": dt = new PerfApplicationDA().GetSysLay(Convert.ToInt32(id), 10); break; case "web": dt = new PerfApplicationDA().GetSysLay(Convert.ToInt32(id), " (dt.typeid=2 or dt.typeid=3 )"); break; case "DB": dt = new PerfApplicationDA().GetSysLay(Convert.ToInt32(id), 4); break; } if (dt != null) { foreach (DataRow dr in dt.Rows) { ApplListOR obj = new ApplListOR(); obj.DeviceID = dr["DeviceID"].ToString(); obj.DeviceName = dr["DeviceName"].ToString(); obj.TypeName = dr["TypeName"].ToString(); obj.typeID = Convert.ToInt32(dr["typeid"].ToString()); obj.Status = Convert.ToInt32(dr["perf"].ToString()); obj.StatusShow = dr["Performance"].ToString(); obj.Warning = Convert.ToInt32(dr["WarningStatus"].ToString()); obj.WarningShow = dr["WarningStatusName"].ToString(); list.Add(obj); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { lblName.Text = base.UserName; lblDepart.Text = base.CurrentUser.DepartmentName; int NowYear=DateTime.Now.Year; for (int i = 0; i < 10; i++) { dpdYear.Items.Add(new ListItem((NowYear - i).ToString())); } for (int i = 1; i <= 12; i++) { dpdMonth.Items.Add(new ListItem(i.ToString().PadLeft(2,'0'))); } dpdMonth.SelectedValue = DateTime.Now.Month.ToString().PadLeft(2, '0'); //加载,应用系统 DataTable dt= new PerfApplicationDA().GetTopBuss(); dpdSystem.DataSource = dt; dpdSystem.DataTextField = "DeviceName"; dpdSystem.DataValueField = "DeviceID"; dpdSystem.DataBind(); } }
private void BindGraid() { DataTable dt = null; if (Request.QueryString["type"] == "top") { dt = BusDA.GetTopBuss();//(pg.PageIndex, pg.PageSize, out pageCount); } else { string id = Request.QueryString["GUID"]; switch (Request.QueryString["type"]) { case "host": dt = new PerfApplicationDA().GetSysLay(Convert.ToInt32(id), " (dt.typeid=1 or dt.typeid=9 )"); break; case "use": dt = new PerfApplicationDA().GetSysLay(Convert.ToInt32(id), 10); break; case "web": dt = new PerfApplicationDA().GetSysLay(Convert.ToInt32(id), " (dt.typeid=2 or dt.typeid=3 )"); break; case "db": dt = new PerfApplicationDA().GetSysLay(Convert.ToInt32(id), 4); break; } } this.gvDataList.DataSource = dt; gvDataList.DataBind(); }
public void HeadSoft(List<ApplListOR> list) { string id = Request.QueryString["GUID"]; DataTable objDev = new PerfApplicationDA().GetSysLay(Convert.ToInt32(id), " (dt.typeid=2 or dt.typeid=3 )"); if (objDev != null && objDev.Rows.Count > 0) { ApplListOR obj = HeadStatusAndWaring(objDev); obj.DeviceID = id; obj.DeviceName = "Web层"; obj.TypeName = "业务系统"; obj.TypeEN = "web"; list.Add(obj); } objDev = new PerfApplicationDA().GetSysLay(Convert.ToInt32(id), 10); if (objDev != null && objDev.Rows.Count > 0) { ApplListOR obj = HeadStatusAndWaring(objDev); obj.DeviceID = id; obj.DeviceName = "应用层"; obj.TypeName = "业务系统"; obj.TypeEN = "use"; list.Add(obj); } }
public void HeadTop(List<ApplListOR> list) { string id = Request.QueryString["GUID"]; DataTable objDev = new PerfApplicationDA().GetSysLay(Convert.ToInt32(id)); if (objDev != null) { objDev.DefaultView.RowFilter = string.Format(" typeid=2 or typeid=3 or typeid=10 "); DataTable dt = objDev.DefaultView.ToTable(); if (dt != null && dt.Rows.Count > 0) { ApplListOR obj = HeadStatusAndWaring(dt); obj.DeviceID = id; obj.DeviceName = "软件层"; obj.TypeName = "业务系统"; obj.TypeEN = "soft"; list.Add(obj); } objDev.DefaultView.RowFilter = string.Format(" typeid=4"); dt = objDev.DefaultView.ToTable(); if (dt != null && dt.Rows.Count > 0) { ApplListOR obj = HeadStatusAndWaring(dt); obj.DeviceID = id; obj.DeviceName = "数据库层"; obj.TypeName = "业务系统"; obj.TypeEN = "DB"; list.Add(obj); } objDev.DefaultView.RowFilter = string.Format(" typeid=1"); dt = objDev.DefaultView.ToTable(); if (dt != null && dt.Rows.Count > 0) { ApplListOR obj = HeadStatusAndWaring(dt); obj.DeviceID = id; obj.DeviceName = "硬件层"; obj.TypeName = "业务系统"; obj.TypeEN = "HD"; list.Add(obj); } } }
private void InitData() { BindGraidSystem(); BindGraidDetail(); BindGraidDisk(); BindGraidPageSpace(); BindGraidDiskStatistics(); string mDeviceID = Request.QueryString["id"]; int iDeviceID = Convert.ToInt32(Request.QueryString["id"]); DeviceOR _objDev = new DeviceDA().SelectDeviceORByID(mDeviceID); DeviceOREx _objDevEx = new DeviceDA().SelectDeviceORExByID(mDeviceID); PerfApplicationOR _pa = new PerfApplicationDA().SelectPerfApplication(mDeviceID); perf = _objDev.Performance; lblPerf.Text = _objDev.Performance; lblPerformance.Text = _objDev.Performance; lblDescribe.Text = _objDev.Describe; lblLastPollingTime.Text = _objDev.LastPollingTime.ToString(); lblNextPollingTime.Text = _objDev.NextPollingTime.ToString(); lblMonitorName.Text = _pa.MonitorName; lblHostName.Text = _pa.HostName; lblOperatingSystem.Text =_objDev.OperSystem; lblIP.Text = _objDev.IP; lblWarningStatus.Text = _objDevEx.WarningStatus; lblSwapMemoryUtilization.Text = _pa.SwapMemoryUtilization; lblSwapMemoryUtilizationMB.Text = _pa.SwapMemoryUtilizationMB; lblCPUMemoryUtilization.Text = _pa.CPUMemoryUtilization; lblPhysicalpMemoryUtilization.Text = _pa.PhysicalpMemoryUtilization; lblPhysicalpMemoryUtilizationMB.Text = _pa.PhysicalpMemoryUtilizationMB; lblFreePhysicalpMemory.Text = _pa.FreePhysicalpMemory; #region 绑定 可用性 DataPoint dp = new DataPoint(); dp.LegendText = string.Format("{0}({1}%)", "可用", _objDev.AvailableRate); double[] d = { Convert.ToDouble(_objDev.AvailableRate) }; dp.Color = Color.Green; dp.YValues = d; chtPerf.Series["Series1"].Points.Add(dp); dp = new DataPoint(); dp.LegendText = string.Format("{0}({1}%)", "不可用", 100 - _objDev.AvailableRate); double[] dno = { Convert.ToDouble(100 - _objDev.AvailableRate) }; dp.Color = Color.Red; dp.YValues = dno; chtPerf.Series["Series1"].Points.Add(dp); #endregion #region 绑定,曲线 HistoryValueDA mDA = new HistoryValueDA(); DateTime StartTime = DateTime.Now.AddHours(-6); DateTime EndTime = DateTime.Now; DateTime SystemStartTime = DateTime.Now.AddHours(-1); // CPU及内存使用率 - 最近六小时内 DataTable dte = mDA.GetDeviceChanncelValue(iDeviceID, 25301, StartTime, EndTime);//交换内存使用率 if (dte != null) { chLine.Series["Series1"].Points.DataBindXY(dte.Rows, "Time", dte.Rows, "MonitorValue"); } dte = mDA.GetDeviceChanncelValue(iDeviceID, 25302, StartTime, EndTime);//物理内存使用率 if (dte != null) { chLine.Series["Series2"].Points.DataBindXY(dte.Rows, "Time", dte.Rows, "MonitorValue"); } dte = mDA.GetDeviceChanncelValue(iDeviceID, 25303, StartTime, EndTime);//CPU使用率 if (dte != null) { chLine.Series["Series3"].Points.DataBindXY(dte.Rows, "Time", dte.Rows, "MonitorValue"); } // 系统负荷 - 近一小时 DataTable dt = mDA.GetDeviceChanncelValue(iDeviceID, 25501, SystemStartTime, EndTime);//每分钟的Job数 if (dt != null) { chSystemLoad.Series["Series1"].Points.DataBindXY(dt.Rows, "Time", dt.Rows, "MonitorValue"); } dt = mDA.GetDeviceChanncelValue(iDeviceID, 25502, SystemStartTime, EndTime);//5分钟的Job数 if (dt != null) { chSystemLoad.Series["Series2"].Points.DataBindXY(dt.Rows, "Time", dt.Rows, "MonitorValue"); } dt = mDA.GetDeviceChanncelValue(iDeviceID, 25503, SystemStartTime, EndTime);//15分钟的Job数 if (dt != null) { chSystemLoad.Series["Series3"].Points.DataBindXY(dt.Rows, "Time", dt.Rows, "MonitorValue"); } #endregion }
private void BindGraidSystem() { int PageCount = 0; DataTable dt = new PerfApplicationDA().selecSystemLoad(pg.PageIndex, pg.PageSize, out PageCount, Request.QueryString["id"]); gvSystemLoad.DataSource = dt; gvSystemLoad.DataBind(); this.pg.RecordCount = PageCount; }