Beispiel #1
0
        private void BindData()
        {
            DataTable dt_Memory   = new DataTable();
            DataTable dt_ProcHit  = new DataTable();
            DataTable dt_ProcSize = new DataTable();

            cloud.w_SQLMemory(ServerNum, Convert.ToInt32(ConfigurationManager.AppSettings["ChartDataDuration"]));
            //dt_Memory = Func_SetColum_SqlMemory(cloud.dsReturn.Tables[0]);
            dt_Memory = cloud.dsReturn.Tables[0];
            int numDuration = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["ChartDataDuration"]);

            cloud.w_PCID_Instance(ServerNum, numDuration, "P091");
            dt_ProcSize         = Lib.ConvertingProc.Pivot(cloud.dsReturn.Tables[0], "Instancename", "TimeIn", "PValue");
            strColumn_CacheSize = Lib.ConvertingProc.GetColumname(dt_ProcSize.Columns);

            cloud.w_PCID_Instance(ServerNum, numDuration, "P138");
            dt_ProcHit         = Lib.ConvertingProc.Pivot(cloud.dsReturn.Tables[0], "Instancename", "TimeIn", "PValue");
            strColumn_CacheHit = Lib.ConvertingProc.GetColumname(dt_ProcHit.Columns);

            //챠트바인드
            List <Lib.chartProperty> cplst = new List <Lib.chartProperty>();
            StringBuilder            sb    = new StringBuilder();

            cplst = SetChartProperty();
            cplst = Lib.Flotr2.SetArrayString_Lines(dt_Memory, cplst);
            cplst = Lib.Flotr2.SetArrayString_Lines(dt_ProcSize, cplst, "PROCCACHESIZE_LINE_CHART");
            cplst = Lib.Flotr2.SetArrayString_Lines(dt_ProcHit, cplst, "PROCCACHEHIT_LINE_CHART");
            sb    = Lib.Flotr2.SetStringValue(cplst, sb, ServerNum.ToString());
            litScript_Pop.Text += Lib.Util.BoxingScript(sb.ToString());
        }
        private void BindData()
        {
            DataTable dt_DISKTIME               = new DataTable();
            DataTable dt_DISKIDLETIME           = new DataTable();
            DataTable dt_CURRENTDISKQUEUELENGTH = new DataTable();
            DataTable dt_AVGDISKQUEUE           = new DataTable();
            DataTable dt_AVGDISKBYTESREAD       = new DataTable();
            DataTable dt_AVGDISKBYTESWRITE      = new DataTable();
            DataTable dt_FREEDISKSPACEMB        = new DataTable();
            DataTable dt_FREEDISKSPACEPER       = new DataTable();

            int numDuration = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["ChartDataDuration"]);

            cloud.w_PCID_Instance(ServerNum, numDuration, "P015");
            dt_DISKTIME        = Lib.ConvertingProc.Pivot(cloud.dsReturn.Tables[0], "Instancename", "TimeIn", "PValue");
            strColumn_DISKTIME = Lib.ConvertingProc.GetColumname(dt_DISKTIME.Columns);

            cloud.w_PCID_Instance(ServerNum, numDuration, "P190");
            dt_DISKIDLETIME        = Lib.ConvertingProc.Pivot(cloud.dsReturn.Tables[0], "Instancename", "TimeIn", "PValue");
            strColumn_DISKIDLETIME = Lib.ConvertingProc.GetColumname(dt_DISKIDLETIME.Columns);

            cloud.w_PCID_Instance(ServerNum, numDuration, "P194");
            dt_CURRENTDISKQUEUELENGTH        = Lib.ConvertingProc.Pivot(cloud.dsReturn.Tables[0], "Instancename", "TimeIn", "PValue");
            strColumn_CURRENTDISKQUEUELENGTH = Lib.ConvertingProc.GetColumname(dt_CURRENTDISKQUEUELENGTH.Columns);

            cloud.w_PCID_Instance(ServerNum, numDuration, "P017");
            dt_AVGDISKQUEUE        = Lib.ConvertingProc.Pivot(cloud.dsReturn.Tables[0], "Instancename", "TimeIn", "PValue");
            strColumn_AVGDISKQUEUE = Lib.ConvertingProc.GetColumname(dt_AVGDISKQUEUE.Columns);

            cloud.w_PCID_Instance(ServerNum, numDuration, "P191");
            dt_AVGDISKBYTESREAD        = Lib.ConvertingProc.Pivot(cloud.dsReturn.Tables[0], "Instancename", "TimeIn", "PValue");
            strColumn_AVGDISKBYTESREAD = Lib.ConvertingProc.GetColumname(dt_AVGDISKBYTESREAD.Columns);

            cloud.w_PCID_Instance(ServerNum, numDuration, "P193");
            dt_AVGDISKBYTESWRITE        = Lib.ConvertingProc.Pivot(cloud.dsReturn.Tables[0], "Instancename", "TimeIn", "PValue");
            strColumn_AVGDISKBYTESWRITE = Lib.ConvertingProc.GetColumname(dt_AVGDISKBYTESWRITE.Columns);

            cloud.w_PCID_Instance(ServerNum, numDuration, "P018");
            dt_FREEDISKSPACEMB        = Lib.ConvertingProc.Pivot(cloud.dsReturn.Tables[0], "Instancename", "TimeIn", "PValue");
            strColumn_FREEDISKSPACEMB = Lib.ConvertingProc.GetColumname(dt_FREEDISKSPACEMB.Columns);

            cloud.w_PCID_Instance(ServerNum, numDuration, "P164");
            dt_FREEDISKSPACEPER        = Lib.ConvertingProc.Pivot(cloud.dsReturn.Tables[0], "Instancename", "TimeIn", "PValue");
            strColumn_FREEDISKSPACEPER = Lib.ConvertingProc.GetColumname(dt_FREEDISKSPACEPER.Columns);


            //챠트바인드
            List <Lib.chartProperty> cplst = new List <Lib.chartProperty>();
            StringBuilder            sb    = new StringBuilder();

            cplst = SetChartProperty();
            cplst = Lib.Flotr2.SetArrayString_Lines(dt_DISKTIME, cplst, "DISKTIME_LINE_CHART");
            cplst = Lib.Flotr2.SetArrayString_Lines(dt_DISKIDLETIME, cplst, "DISKIDLETIME_LINE_CHART");
            cplst = Lib.Flotr2.SetArrayString_Lines(dt_CURRENTDISKQUEUELENGTH, cplst, "CURRENTDISKQUEUELENGTH_LINE_CHART");
            cplst = Lib.Flotr2.SetArrayString_Lines(dt_AVGDISKQUEUE, cplst, "AVGDISKQUEUE_LINE_CHART");
            cplst = Lib.Flotr2.SetArrayString_Lines(dt_AVGDISKBYTESREAD, cplst, "AVGDISKBYTESREAD_LINE_CHART");
            cplst = Lib.Flotr2.SetArrayString_Lines(dt_AVGDISKBYTESWRITE, cplst, "AVGDISKBYTESWRITE_LINE_CHART");
            cplst = Lib.Flotr2.SetArrayString_Lines(dt_FREEDISKSPACEMB, cplst, "FREEDISKSPACEMB_LINE_CHART");
            cplst = Lib.Flotr2.SetArrayString_Lines(dt_FREEDISKSPACEPER, cplst, "FREEDISKSPACEPER_LINE_CHART");
            sb    = Lib.Flotr2.SetStringValue(cplst, sb, ServerNum.ToString());
            litScript_Pop.Text += Lib.Util.BoxingScript(sb.ToString());
        }