private void InitData()
 {
     string mDeviceID = Request.QueryString["id"];
     DeviceOR _objDev = new DeviceDA().SelectDeviceORByID(mDeviceID);
     PerfNetAlarmOR _obj = new PerfNetDA().SelectErrorNews(mDeviceID);
     switch (_objDev.Performance)
     {
         case "正常":
             perf = "1";
             break;
         case "故障":
             perf = "0";
             break;
         case "报警":
             perf = "2";
             break;
         case "未启动":
             perf = "3";
             break;
     }
     lblName.Text = _objDev.DeviceName;
     lblLastPollingTime.Text = _objDev.LastPollingTime.ToString();
     lblPerformance.Text = _objDev.Performance;
     if (_obj != null)
     {
         lblContent.Text = _obj.Content;
         lblHappenTime.Text = _obj.HappenTime.ToString();
     }
     else
     {
         return;
     }
 }
Example #2
0
 public string GetDeviceName(int deviceID)
 {
     DeviceOR  obj= new DeviceDA().SelectDeviceORByID(deviceID.ToString());
     if (obj != null)
         return obj.DeviceName;
     return "";
 }
 private void InitPage()
 {
     //btnAdd.Visible = base.HasPermission("Admin");
     //aBtnAdd.Visible = gvHealthConfig.Columns[1].Visible = base.HasPermission("Edit");
     //gvHealthConfig.Columns[2].Visible = base.HasPermission("Delete");
     string strID = Request.QueryString["DeviceID"];
     DeviceOR m_DeviceOR = new DeviceDA().SelectDeviceORByID(strID);
     if (m_DeviceOR != null)
         lblName.Text = m_DeviceOR.DeviceName;
 }
Example #4
0
 /// <summary>
 /// 查询刷新数据
 /// </summary>
 /// <returns></returns>
 public DeviceANDItemRefOR SelectRefData(string mDeviceID)
 {
     DeviceOREx obj = new DeviceDA().SelectDeviceORExByID(mDeviceID);
     if (obj == null)
     {
         DeviceItemOREx objItem = new DeviceDA().SelectDeviceItemORExByID(mDeviceID);
         if (objItem == null)
             return null;
         return new DeviceANDItemRefOR(objItem);
     }
     return new DeviceANDItemRefOR(obj);
 }
Example #5
0
        public string GetTableName(int DeviceID)
        {
            DeviceOR _objOR = new DeviceDA().SelectDeviceORByID(DeviceID.ToString());
              if (_objOR == null)
              return string.Empty;

              string TableName = string.Empty;
              if (TalbleIsExist(_objOR.StationID, _objOR.DeviceName, out TableName))
              {
              return TableName;
              }
              return null;
        }
Example #6
0
        private void InitData()
        {
            string mDeviceID= Request.QueryString["id"];
            PerfNetDetailOR _Obj = new PerfNetDA().SelectDeviceDetail(mDeviceID);
            DeviceOR _objDev = new DeviceDA().SelectDeviceORByID(mDeviceID);
            DeviceOREx _objDevEx = new DeviceDA().SelectDeviceORExByID(mDeviceID);
            switch (_objDevEx.State)
            {
                case "正常":
                    State = "1";
                    break;
                case "故障":
                    State = "0";
                    break;
            }
            lblClass.Text = _objDevEx.ClassName;
            lblType.Text = _objDevEx.TypeName;

            lblDeviceName.Text = _objDev.DeviceName;

            lblIP.Text = _objDev.IP;
            lblFirm.Text = _Obj.Firm;
            lblFlowCalculator.Text = _Obj.FlowCalculator;
            lblDependence.Text = _Obj.Dependence;
            lblPollingProtocol.Text = _Obj.PollingProtocol;
            lblMonitor.Text = _Obj.Monitor;
            lblSystemDescription.Text = _objDev.Describe;
            lblResponseTime.Text = _Obj.ResponseTime;
            lblPacketLossRate.Text = _Obj.LoseRate;

            #region 绑定 今天的使用率
            DataPoint dp = new DataPoint();
            dp.LegendText = string.Format("{0}({1}%)", "今天的使用率", _Obj.NetUtilityRate);
            double[] d = { Convert.ToDouble(_Obj.NetUtilityRate) };
            dp.Color = Color.Green;
            dp.YValues = d;
            chtPerf.Series["Series1"].Points.Add(dp);

            dp = new DataPoint();
            dp.LegendText = string.Format("{0}({1}%)", "今天的未使用率", 100 - _Obj.NetUtilityRate);
            double[] dno = { Convert.ToDouble(100 - _Obj.NetUtilityRate) };
            dp.Color = Color.Red;
            dp.YValues = dno;
            chtPerf.Series["Series1"].Points.Add(dp);
            #endregion

            //接口列表
            gvPortList.DataSource = _Obj.SubProts;
            gvPortList.DataBind();
        }
        private void ShowChannel()
        {
            DeviceDA m_DeviceTypedao = new DeviceDA();
            try
            {
                //string stationName =

              rpDepartment.DataSource=  m_DeviceTypedao.GetAllGenerdDevice(dpdStationID.SelectedItem.Value);
              rpDepartment.DataBind();
            }
            catch (Exception ex)
            {

                //comboBox1.Text = string.Empty;
               // MessageBox.Show(ex.ToString());
            }
        }
 private void InitData()
 {
     string mDeviceID = Request.QueryString["id"];
     int iDeviceID = Convert.ToInt32(Request.QueryString["id"]);
     DeviceOR _objDev = new DeviceDA().SelectDeviceORByID(mDeviceID);
     DeviceOREx _objDevEx = new DeviceDA().SelectDeviceORExByID(mDeviceID);
     StateCompRoomEnviOR _Obj = new StateCompRoomEnviDA().SelectDeviceDetail(mDeviceID);
     lblName.Text = _objDev.DeviceName;
     lblState.Text = _objDevEx.State;
     switch (_objDevEx.State)
     {
         case "正常":
             state = "1";
             break;
         case "故障":
             state = "0";
             break;
         case "未启动":
             state = "3";
             break;
     }
     lblLastPollingTime.Text = _objDev.LastPollingTime.ToString();
     switch (_Obj.Leak)
     {
         case "正常":
             Leak = "1";
             break;
         case "异常":
             Leak = "0";
             break;
     }
     switch (_Obj.DUANXIAN)
     {
         case "正常":
             DUANXIAN = "1";
             break;
         case "异常":
             DUANXIAN = "0";
             break;
     }
     lblLeak.Text = _Obj.Leak;
     lblDUANXIAN.Text = _Obj.Leak;
     lblWEIZHI.Text = _Obj.WEIZHI;
 }
Example #9
0
        private void InitData()
        {
            BindGraid();
            string mDeviceID = Request.QueryString["id"];
            int iDeviceID = Convert.ToInt32(Request.QueryString["id"]);
            DeviceOR _objDev = new DeviceDA().SelectDeviceORByID(mDeviceID);
            PerfDBOR _Obj = new PerfDBDA().SelectDeviceDetail(mDeviceID);
            DeviceOREx _objDevEx = new DeviceDA().SelectDeviceORExByID(mDeviceID);

            State = _objDevEx.StatusVal;

            Health = _objDevEx.HealthStatusVal;

            lblState.Text = _objDevEx.State;

            lblServName.Text =  _objDev.DeviceName;
            lblAuthType.Text = _objDev.AuthType;
            lblVersion.Text = _objDev.Version;
            lblStartUpTime.Text = _Obj.StartUpTime;
            lblPort.Text = _objDev.Port;
            lblHostName.Text = _objDev.OperSystem;
            lblSystem.Text = _objDev.HostName;
            lblLastPollingTime.Text = _objDev.LastPollingTime.ToString();
            lblNextPollingTime.Text = _objDev.NextPollingTime.ToString();

            lblValue.Text = _Obj.ConnectionTime;
            lblUserNO.Text = _Obj.UserNO;

            lblServerSize.Text = _Obj.ServerSize;
            lblAverageExecutionTime.Text = _Obj.AverageExecutionTime;
            lblReadingTimes.Text = _Obj.ReadingTimes;
            lblWritingTimes.Text = _Obj.WritingTimes;
            lblBlockSize.Text = _Obj.BlockSize;

            #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 绑定 共享的SGA
            DataPoint dpSGA = new DataPoint();
            dpSGA.LegendText = string.Format("{0}({1}M)", "库存储器大小", _Obj.LibraryMemorySize);
            double[] dSGA = { _Obj.LibraryMemorySize };
            dpSGA.Color = Color.Green;
            dpSGA.YValues = dSGA;
            chtSGA.Series["Series1"].Points.Add(dpSGA);

            dpSGA = new DataPoint();
            dpSGA.LegendText = string.Format("{0}({1}M)", "数据字典存储器", _Obj.DataDictionaryMemory);
            double[] dSGA2 = { _Obj.DataDictionaryMemory };
            dpSGA.Color = Color.Red;
            dpSGA.YValues = dSGA2;
            chtSGA.Series["Series1"].Points.Add(dpSGA);

            dpSGA = new DataPoint();
            dpSGA.LegendText = string.Format("{0}({1}M)", "SG区域大小", _Obj.SGSize);
            double[] dSGA3 = { _Obj.SGSize };
            dpSGA.Color = Color.Blue;
            dpSGA.YValues = dSGA3;
            chtSGA.Series["Series1"].Points.Add(dpSGA);

            dpSGA = new DataPoint();
            dpSGA.LegendText = string.Format("{0}({1}M)", "固定的区域大小", _Obj.FixedRegionSize);
            double[] dSGA4 = { _Obj.FixedRegionSize };
            dpSGA.Color = Color.Yellow;
            dpSGA.YValues = dSGA4;
            chtSGA.Series["Series1"].Points.Add(dpSGA);

            dpSGA = new DataPoint();
            dpSGA.LegendText = string.Format("{0}({1}M)", "缓冲存储器大小", _Obj.BufferMemorySize);
            double[] dSGA5 = { _Obj.BufferMemorySize };
            dpSGA.Color = Color.Orange;
            dpSGA.YValues = dSGA5;
            chtSGA.Series["Series1"].Points.Add(dpSGA);

            dpSGA = new DataPoint();
            dpSGA.LegendText = string.Format("{0}({1}M)", "共享池大小", _Obj.ShareSize);
            double[] dSGA6 = { _Obj.ShareSize };
            dpSGA.Color = Color.OldLace;
            dpSGA.YValues = dSGA6;
            chtSGA.Series["Series1"].Points.Add(dpSGA);
            #endregion

            #region 绑定,曲线
            HistoryValueDA mDA = new HistoryValueDA();

            DateTime StartTime = DateTime.Now.AddHours(-1);
            DateTime EndTime = DateTime.Now;

            // 连接时间-最后一小时
            DataTable dte = mDA.GetDeviceChanncelValue(iDeviceID, 41101, StartTime, EndTime);//流入错误数
            if (dte != null)
            {
                chLine.Series["Series1"].Points.DataBindXY(dte.Rows, "Time", dte.Rows, "MonitorValue");
            }

            // 用户活动性-最后一小时
            DataTable dt = mDA.GetDeviceChanncelValue(iDeviceID, 41201, StartTime, EndTime);//流入错误数
            if (dt != null)
            {
                chUserActivity.Series["Series1"].Points.DataBindXY(dt.Rows, "Time", dt.Rows, "MonitorValue");
            }

            #endregion
        }
        private void InitData()
        {
            BindGraidConversationDetail();
            BindGraidThreadDetail();
            BindGraidPoolingDetails();
            BindGraidServerResponseTime();
            //BindGraidUndecided();
            BindGraidThreadWait();
            BindGraidJVMHeap();

            string mDeviceID = Request.QueryString["id"];
            int iDeviceID = Convert.ToInt32(Request.QueryString["id"]);
            DeviceOR _objDev = new DeviceDA().SelectDeviceORByID(mDeviceID);
            DeviceOREx _objDevEx = new DeviceDA().SelectDeviceORExByID(mDeviceID);
            PerfMiddlewareOR _pm = new PerfMiddlewareDA().SelectDeviceDetail(mDeviceID);
            lblState.Text = _objDev.Performance;
            State = _objDevEx.StatusVal;
            health = _objDevEx.HealthStatusVal;

            lblName.Text = _objDev.DeviceName;
            //lblWarningStatus.Text = _objDevEx.WarningStatus;
            lblType.Text = _objDevEx.TypeName;
            lblWeblogic.Text = _objDev.Version;
            lblPort.Text = _objDev.Port;
            lblHostName.Text = _pm.HostName;
            lblSystem.Text = _objDev.ServName;
            lblLastPollingTime.Text = _objDev.LastPollingTime.ToString();
            lblNextPollingTime.Text = _objDev.NextPollingTime.ToString();

            #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

            //绑定,曲线
            HistoryValueDA mDA = new HistoryValueDA();

            #region 三个图形,绑定值
            DateTime StartTime = DateTime.Now.AddHours(-1);
            DateTime EndTime = DateTime.Now;

            // Web应用 -最近1小时最高用户会话(前5位)
            DataTable dte = new PerfMiddlewareDA().SelectWebSessionImg(iDeviceID, StartTime, EndTime);
            if (dte != null)
            {
                chLine.Series["Series1"].Points.DataBindXY(dte.Rows, "DeviceName", dte.Rows, "maxval");
                chLine.Series["Series1"].ChartType = SeriesChartType.Column;
                chLine.Series["Series1"]["DrawingStyle"] = "Cylinder";
            }
            //线程使用-最后1小时
            dte = new PerfMiddlewareDA().SelectWebSessionImg(iDeviceID, StartTime, EndTime);
            if (dte != null)
            {
                chThread.Series["Series1"].Points.DataBindXY(dte.Rows, "DeviceName", dte.Rows, "maxval");
                chThread.Series["Series1"].ChartType = SeriesChartType.Column;
                chThread.Series["Series1"]["DrawingStyle"] = "Cylinder";
            }

            //最近1小时的JVM堆使用情况图表
            dte = mDA.GetDeviceChanncelValue(iDeviceID, 22505, StartTime, EndTime);
            if (dte != null)
            {
                chJVMHeap.Series["Series1"].Points.DataBindXY(dte.Rows, "Time", dte.Rows, "MonitorValue");
                //chJVMHeap.ChartAreas[0].AxisY.LabelStyle.Format = "{0}KB";
            }
            #endregion
        }
Example #11
0
 /// <summary>
 /// 保存业务信息
 /// </summary>
 /// <param name="ID"></param>
 /// <param name="ParentID"></param>
 /// <returns></returns>
 public bool SaveBus(int ID, int ParentID)
 {
     string devceName = new DeviceDA().SelectDeviceORByID(ID.ToString()).DeviceName;
     string sql = string.Format(@"INSERT INTO t_Bussiness  ([Id],[BussinessName],[ParentId],[Description])
     VALUES({0},'{1}',{2},'')", ID, devceName, ParentID);
     return db.ExecuteNoQuery(sql) > 0;
 }
Example #12
0
        public void SecondMiddlewareInit(int DeviceID, DateTime begin, DateTime end)
        {
            ReportSeachWhereOR whereOR = new ReportSeachWhereOR();
            whereOR.StartTime = begin;
            whereOR.EndTime = end;

            DeviceOR devObj = new DeviceDA().SelectDeviceORByID(DeviceID.ToString());
            if (devObj == null)
            {
                throw new Exception("设备不存!");
            }
            List<int> ListDevs = new List<int>();
            ListDevs.Add(devObj.DeviceID);
            //获取中间件
            whereOR.ListDevices = GetBussMiddleware(DeviceID);
            whereOR.StationID = devObj.StationID;
            whereOR.ReportType = "day";
            /*
             * web	活动会话数	21102
             * 数据库连接池 活动连接	22603
             * 当前 JVM堆大小(kb)	22505
             * */
            whereOR.ListChanncel = new List<SearchChanncelOR>() {
            new SearchChanncelOR(){ ChanncelNo= 21102}//--活动会话数
            ,new SearchChanncelOR(){ ChanncelNo= 22603}//--活动连接
            ,new SearchChanncelOR(){ ChanncelNo= 22505}	//JVM堆大小
              };

            PDFReportSearch DataDA = new PDFReportSearch();
            DataDA.SearchReportDataToTemp(whereOR);
        }
        private void InitData()
        {
            //BindGraidDiskUsage();
            BindGraidVirtualSystem();
            string mDeviceID = Request.QueryString["id"];
            int iDeviceID = Convert.ToInt32(Request.QueryString["id"]);
            DeviceOR _objDev = new DeviceDA().SelectDeviceORByID(mDeviceID);
            DeviceOREx _objDevEx = new DeviceDA().SelectDeviceORExByID(mDeviceID);
            PerfVirtualOR _pv = new PerfVirtualMachineDA().SelectVirtualDetail(mDeviceID);

            lblMonitorName.Text = _objDev.DeviceName;
            lblDescribe.Text = _objDev.Describe;
            Health = _objDevEx.HealthStatusVal;
            State = _objDevEx.StatusVal;

            lblLastPollingTime.Text = _objDev.LastPollingTime.ToString();
            lblNextPollingTime.Text = _objDev.NextPollingTime.ToString();
            lblPerformance.Text = _objDevEx.State;

            lblPerf.Text = _objDevEx.State;

            lblCPUUtilizationRatio.Text = _pv.CPUUtilizationRatio.ToString();
            lblMemoryUtilization.Text = _pv.MemoryUtilization.ToString();
            lblCPUUtilization.Text = _pv.CPUUsage.ToString();
            //if (_pv.CPUUtilizationRatio > 50)
            //{
            //    lblCPUUtilization.Text = "异常";
            //}
            //else if (_pv.CPUUtilizationRatio < 50)
            //{
            //    lblCPUUtilization.Text = "正常";
            //}

            lblDiskUsage.Text = _pv.DiskUsage.ToString();
            lblNetworkUsage.Text = _pv.NetUsage.ToString();

            #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

            //绑定,曲线
            HistoryValueDA mDA = new HistoryValueDA();
            #region 今天接收、发送
            DateTime StartTime = Convert.ToDateTime(string.Format("{0} 00:00:00", DateTime.Now.ToString("yyyy-MM-dd")));
            DateTime EndTime = Convert.ToDateTime(string.Format("{0} 23:59:59", DateTime.Now.ToString("yyyy-MM-dd")));

            // 磁盘、网络使用情况
            DataTable dte = mDA.GetDeviceChanncelValue(iDeviceID, 91303, StartTime, EndTime);//磁盘使用率
            if (dte != null)
            {
                chLine.Series["Series1"].Points.DataBindXY(dte.Rows, "Time", dte.Rows, "MonitorValue");
            }
            dte = mDA.GetDeviceChanncelValue(iDeviceID, 91403, StartTime, EndTime);//网络使用率
            if (dte != null)
            {
                chLine.Series["Series2"].Points.DataBindXY(dte.Rows, "Time", dte.Rows, "MonitorValue");
            }
            #endregion
        }
Example #14
0
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public void InitHostInfo(int DeviceID, DateTime begin, DateTime end)
        {
            ReportSeachWhereOR whereOR = new ReportSeachWhereOR();
            whereOR.StartTime = begin;
            whereOR.EndTime = end;

            DeviceOR devObj = new DeviceDA().SelectDeviceORByID(DeviceID.ToString());
            if (devObj == null)
            {
                throw new Exception("设备不存!");
            }
            List<int> ListDevs = new List<int>();
            ListDevs.Add(devObj.DeviceID);
            //获取数据库设备
            whereOR.ListDevices = GetBussDataHost(DeviceID);

            whereOR.StationID = devObj.StationID;
            whereOR.ReportType = "day";

            whereOR.ListChanncel = new List<SearchChanncelOR>() {
            new SearchChanncelOR(){ ChanncelNo= 25201}//--主机CPU利用率
            ,new SearchChanncelOR(){ ChanncelNo= 25202}//--内存压力
            ,new SearchChanncelOR(){ ChanncelNo= 25203}	//磁盘
              };

            PDFReportSearch DataDA = new PDFReportSearch();
            DataDA.SearchReportDataToTemp(whereOR);
        }
Example #15
0
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public void SecondDBInit(int DeviceID, DateTime begin, DateTime end)
        {
            ReportSeachWhereOR whereOR = new ReportSeachWhereOR();
            whereOR.StartTime = begin;
            whereOR.EndTime = end;

            DeviceOR devObj = new DeviceDA().SelectDeviceORByID(DeviceID.ToString());
            if (devObj == null)
            {
                throw new Exception("设备不存!");
            }
            List<int> ListDevs = new List<int>();
            ListDevs.Add(devObj.DeviceID);
            //获取数据库设备
            whereOR.ListDevices = GetBussDataBase(DeviceID);

            // whereOR.DeviceName = devObj.DeviceName;

            // whereOR.DeviceType = devObj.DeviceTypeID;
            whereOR.StationID = devObj.StationID;
            whereOR.ReportType = "day";

            whereOR.ListChanncel = new List<SearchChanncelOR>() {
            new SearchChanncelOR(){ ChanncelNo= 42109}//--连接数
            ,new SearchChanncelOR(){ ChanncelNo= 42105}//--%可用
            ,new SearchChanncelOR(){ ChanncelNo= 41601}	//缓冲器
            ,new SearchChanncelOR(){ ChanncelNo= 41602}	//数据字典
            ,new SearchChanncelOR(){ ChanncelNo= 41603}	//库
            ,new SearchChanncelOR(){ ChanncelNo= 41101}	//连接时间
              };

            PDFReportSearch DataDA = new PDFReportSearch();
            DataDA.SearchReportDataToTemp(whereOR);
        }
Example #16
0
        private void InitData()
        {
            BindGraidSystem();
            BindGraidDetail();
            BindGraidDisk();
            BindGraidPageSpace();
            BindGraidDiskStatistics();
            divNetworkPort.Visible = false;
            divServiceDetail.Visible = false;
            divEvent.Visible = false;

            string mDeviceID = Request.QueryString["id"];
            int iDeviceID = Convert.ToInt32(Request.QueryString["id"]);

            // 判断操作系统是否为Windows2000
            DeviceOREx _objDevEx = new DeviceDA().SelectDeviceORExByID(mDeviceID);
            if (_objDevEx.TypeName == "Windows2000")
            {
                BindGraidPort();
                BindGraidServiceDetail();
                BindGraidEvent();

                divNetworkPort.Visible = true;
                divServiceDetail.Visible = true;
                divEvent.Visible = true;
            }

            DeviceOR _objDev = new DeviceDA().SelectDeviceORByID(mDeviceID);
            PerfHostOR _ph = new PerfHostDA().SelectHostDetail(mDeviceID);

            state = _objDevEx.StatusVal;
            health = _objDevEx.HealthStatusVal;

            lblPerf.Text = _objDevEx.State;
            lblPerformance.Text = _objDevEx.State;
            lblDescribe.Text = _objDev.Describe;
            lblLastPollingTime.Text = _objDev.LastPollingTime.ToString();
            lblNextPollingTime.Text = _objDev.NextPollingTime.ToString();

            lblMonitorName.Text = _objDev.DeviceName;
            lblHostName.Text = _objDev.HostName;
            lblOperatingSystem.Text = _objDev.OperSystem;
            lblIP.Text = _objDev.IP;
            lblResponseTime.Text = _ph.ResponseTime;

            lblSwapMemoryUtilization.Text = _ph.SwapMemoryUtilization;
            lblSwapMemoryUtilizationMB.Text = _ph.SwapMemoryUtilizationMB;
            lblCPUMemoryUtilization.Text = _ph.CPUMemoryUtilization;
            lblPhysicalpMemoryUtilization.Text = _ph.PhysicalpMemoryUtilization;
            lblPhysicalpMemoryUtilizationMB.Text = _ph.PhysicalpMemoryUtilizationMB;
            lblFreePhysicalpMemory.Text = _ph.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(-2);
            DateTime EndTime = DateTime.Now;

            DateTime SystemStartTime = DateTime.Now.AddHours(-1);

            // CPU及内存使用率 - 最近六小时内
            DataTable dte = mDA.GetDeviceChanncelValue(iDeviceID, 14202, StartTime, EndTime);//交换内存使用率
            if (dte != null)
            {
                chLine.Series["Series1"].Points.DataBindXY(dte.Rows, "Time", dte.Rows, "MonitorValue");
            }
            dte = mDA.GetDeviceChanncelValue(iDeviceID, 14203, StartTime, EndTime);//物理内存使用率
            if (dte != null)
            {
                chLine.Series["Series2"].Points.DataBindXY(dte.Rows, "Time", dte.Rows, "MonitorValue");
            }
            dte = mDA.GetDeviceChanncelValue(iDeviceID, 14102, StartTime, EndTime);//CPU使用率
            if (dte != null)
            {
                chLine.Series["Series3"].Points.DataBindXY(dte.Rows, "Time", dte.Rows, "MonitorValue");
            }

            // 系统负荷 - 近一小时
            DataTable dt = mDA.GetDeviceChanncelValue(iDeviceID, 13101, SystemStartTime, EndTime);//每分钟的Job数
            if (dt != null)
            {
                chSystemLoad.Series["Series1"].Points.DataBindXY(dt.Rows, "Time", dt.Rows, "MonitorValue");
            }
            dt = mDA.GetDeviceChanncelValue(iDeviceID, 13102, SystemStartTime, EndTime);//5分钟的Job数
            if (dt != null)
            {
                chSystemLoad.Series["Series2"].Points.DataBindXY(dt.Rows, "Time", dt.Rows, "MonitorValue");
            }
            dt = mDA.GetDeviceChanncelValue(iDeviceID, 13103, SystemStartTime, EndTime);//15分钟的Job数
            if (dt != null)
            {
                chSystemLoad.Series["Series3"].Points.DataBindXY(dt.Rows, "Time", dt.Rows, "MonitorValue");
            }

            #endregion
        }
Example #17
0
        private void LoadData()
        {
            try
            {
                string m_id = Request.QueryString["id"];
                HealthConfigOR m_Heal = new HealthConfigDA().selectARowDate(m_id);
                DeviceOR m_DeviceOR = new DeviceDA().SelectDeviceORByID(m_Heal.Sdid.ToString());

                dpdStationID.SelectedValue = m_DeviceOR.StationID.ToString();//站点
                BindDeviceid(m_DeviceOR.StationID.ToString());

                dpdDeviceid.SelectedValue = m_Heal.Sdid.ToString();//
                BindChannel(m_Heal.Sdid.ToString());

                if (m_Heal.Channelno.HasValue)
                    dpdchannelno.SelectedValue = m_Heal.Channelno.Value.ToString();//

                txtEffectlevel.Text = m_Heal.Effectlevel.ToString();//
            }
            catch (Exception e)
            {
                Alert(e);
            }
        }
        private void InitData()
        {
            string mDeviceID = Request.QueryString["id"];
            int iDeviceID = Convert.ToInt32(Request.QueryString["id"]);
            //DeviceOR _objDev = new DeviceDA().SelectDeviceORByID(mDeviceID);
            PerNetPortDetailOR _Obj = new PerfNetDA().SelectNetPortDetail(mDeviceID);
            DeviceItemOREx _objDevEx = new DeviceDA().SelectDeviceItemORExByID(mDeviceID);
            ParentDevID = _objDevEx.ParentDevID;

            lblPort.Text = _objDevEx.Port;
            lblIpAddresses.Text = _objDevEx.IP;
            lblDescription.Text = _objDevEx.Describe;
            lblName.Text = _objDevEx.DeviceName;

            lblType.Text = _objDevEx.TypeName;

            Performance = _objDevEx.Performance;
            switch (_objDevEx.HealthStatus)
            {
                case "正常":
                    health = "1";
                    break;
                case "故障":
                    health = "0";
                    break;
                case "报警":
                    health = "2";
                    break;
            }

            lblPhysicalAddress.Text = _objDevEx.StationName;//这个有错

            lblCircuitID.Text = _Obj.CircuitID;
            lblSuperiorName.Text = _Obj.SuperiorName;
            lblIndex.Text = _Obj.Index;

            lblManagementState.Text = _Obj.ManagementState;
            lblOperatingStatus.Text = _Obj.OperatingStatus;

            lblReceiveBroadband.Text = _Obj.ReceiveBroadband;
            lblSendBroadband.Text = _Obj.SendBroadband;
            lblCurrentlyReceivingTraffic.Text = _Obj.CurrentlyReceivingTraffic;
            lblCurrentSendTraffic.Text = _Obj.CurrentSendTraffic;
            lblReceiveUtilization.Text = _Obj.UtilizationReceive;
            lblSendUtilization.Text = _Obj.UtilizationSend;
            lblReceivePacketsNumber.Text = _Obj.ReceiveNoS;
            lblSendPacketsNumber.Text = _Obj.SendNos;
            lblReceiveAverageSize.Text = _Obj.AverageSizeReceive;
            lblSendAverageSize.Text = _Obj.AverageSizeSend;

            #region 绑定 可用性
            if (_objDevEx != null)
            {
                DataPoint dp = new DataPoint();
                dp.LegendText = string.Format("{0}({1}%)", "可用", _objDevEx.AvailableRate);
                double[] d = { Convert.ToDouble(_objDevEx.AvailableRate) };
                dp.Color = Color.Green;
                dp.YValues = d;
                chtPerf.Series["Series1"].Points.Add(dp);

                dp = new DataPoint();
                dp.LegendText = string.Format("{0}({1}%)", "不可用", 100 - _objDevEx.AvailableRate);
                double[] dno = { Convert.ToDouble(100 - _objDevEx.AvailableRate) };
                dp.Color = Color.Red;
                dp.YValues = dno;
                chtPerf.Series["Series1"].Points.Add(dp);
            }
            #endregion

            //绑定,曲线
            HistoryValueDA mDA=new HistoryValueDA();
            #region 今天接收、发送
            DateTime StartTime= Convert.ToDateTime( string.Format("{0} 00:00:00",DateTime.Now.ToString("yyyy-MM-dd")));
            DateTime EndTime= Convert.ToDateTime(string.Format("{0} 23:59:59",DateTime.Now.ToString("yyyy-MM-dd")));

            // 流量-今天
            DataTable dt = mDA.GetDeviceChanncelValue(this.deviceID, ParentDevID, 33001, StartTime, EndTime);//接收
            if (dt != null)
            {
                chLine.Series["Series1"].Points.DataBindXY(dt.Rows, "Time", dt.Rows, "MonitorValue");//接收
            }

            dt = mDA.GetDeviceChanncelValue(this.deviceID, ParentDevID, 33002, StartTime, EndTime);//发送
            if (dt != null)
            {
                chLine.Series["Series2"].Points.DataBindXY(dt.Rows, "Time", dt.Rows, "MonitorValue");
            }

            // 错误数和丢包数-今天
            DataTable dte = mDA.GetDeviceChanncelValue(this.deviceID, ParentDevID, 37001, StartTime, EndTime);//流入错误数
            if (dte != null)
            {
                chtErrorSum.Series["Series1"].Points.DataBindXY(dte.Rows, "Time", dte.Rows, "MonitorValue");
            }

            dte = mDA.GetDeviceChanncelValue(this.deviceID, ParentDevID, 37002, StartTime, EndTime);//流出错误数
            if (dte != null)
            {
                chtErrorSum.Series["Series2"].Points.DataBindXY(dte.Rows, "Time", dte.Rows, "MonitorValue");
            }
            dte = mDA.GetDeviceChanncelValue(this.deviceID, ParentDevID, 37003, StartTime, EndTime);//流入丢包数
            if (dte != null)
            {
                chtErrorSum.Series["Series3"].Points.DataBindXY(dte.Rows, "Time", dte.Rows, "MonitorValue");
            }

            dte = mDA.GetDeviceChanncelValue(this.deviceID, ParentDevID, 37004, StartTime, EndTime);//流出丢包数
            if (dte != null)
            {
                chtErrorSum.Series["Series4"].Points.DataBindXY(dte.Rows, "Time", dte.Rows, "MonitorValue");
            }

            // 发送字数总量-今天
            DataTable dts = mDA.GetDeviceChanncelValue(this.deviceID, ParentDevID, 38001, StartTime, EndTime);//InBytes
            if (dts != null)
            {
                chtSendSum.Series["Series1"].Points.DataBindXY(dts.Rows, "Time", dts.Rows, "MonitorValue");
            }

            dts = mDA.GetDeviceChanncelValue(this.deviceID, ParentDevID, 38002, StartTime, EndTime);//OutBytes
            if (dts != null)
            {
                chtSendSum.Series["Series2"].Points.DataBindXY(dts.Rows, "Time", dts.Rows, "MonitorValue");
            }

            #endregion
        }
        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 InitData()
        {
            BindGraid();
            string mDeviceID = Request.QueryString["id"];
            int iDeviceID = Convert.ToInt32(Request.QueryString["id"]);
            DeviceOR _objDev = new DeviceDA().SelectDeviceORByID(mDeviceID);
            DeviceOREx _objDevEx = new DeviceDA().SelectDeviceORExByID(mDeviceID);

            lblName.Text = _objDev.DeviceName;
            Health = _objDevEx.HealthStatusVal;
            //switch (_objDevEx.HealthStatus)
            //{
            //    case "正常":
            //        Health = "1";
            //        break;
            //    case "故障":
            //        Health = "0";
            //        break;
            //    case "报警":
            //        Health = "2";
            //        break;
            //}
            lblType.Text = _objDevEx.TypeName;
            lblInterval.Text = _objDev.Interval;
            lblLastPollingTime.Text = _objDev.LastPollingTime.ToString();
            lblNextPollingTime.Text = _objDev.NextPollingTime.ToString();

            //lblAverageResponseTime.Text =
            //lblResponseTime.Text =

            #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(-1);
            DateTime EndTime = DateTime.Now;

            // 最近一小时性能
            DataTable dte = mDA.GetDeviceChanncelValue(iDeviceID, 24104, StartTime, EndTime);
            if (dte != null)
            {
                chLine.Series["Series1"].MarkerStyle = MarkerStyle.Circle;
                chLine.Series["Series1"].MarkerSize = 4;
                chLine.Series["Series1"].Points.DataBindXY(dte.Rows, "Time", dte.Rows, "MonitorValue");
            }

            // 特定URL响应时间(应答时间/ms)本视图5分钟自动最新数据
            DataTable dt = mDA.GetDeviceChanncelValue(iDeviceID, 24201, StartTime, EndTime);//应答时间/ms
            if (dt != null)
            {
                chtURL.Series["Series1"].Points.DataBindXY(dt.Rows, "Time", dt.Rows, "MonitorValue");
                chtURL.Series["Series1"].MarkerStyle = MarkerStyle.Circle;
                chtURL.Series["Series1"].MarkerSize = 4;
            }

            #endregion
        }