Exemple #1
0
        /// <summary>
        ///     Dispatcher for the E14 Method[s]
        /// </summary>
        /// <param name="source">The source Object.</param>
        /// <param name="args">The passed Elapsed Event Arguments.</param>
        public void The14thDispatcher(object source, ElapsedEventArgs args)
        {
            // We check that the Dispatcher has access.
            CheckAccess();

            // We initialize a new instance of the DataAccess.
            DataAccess.E14ServerInformation srvInfoDataAccess = new DataAccess.E14ServerInformation();

            // We initialize a new instance of the Entities.
            Entities.E14ServerInformation srvInfo = srvInfoDataAccess.GetSystemInformation(this.systemName);

            // We initialize the Dispatcher to invoke.
            this.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.ApplicationIdle, new Dlg14UpdateInformation(this.Update14Information), srvInfo);
            GC.ReRegisterForFinalize(this.Dispatcher);
            GC.Collect();
        }
Exemple #2
0
        /// <summary>
        ///     Method to update the E14 information.
        /// </summary>
        /// <param name="srvInfo">Info from the Entities Class</param>
        private void Update14Information(Entities.E14ServerInformation srvInfo)
        {
            double processor       = Convert.ToDouble(srvInfo.StrProcessor);
            double memory          = Convert.ToDouble(srvInfo.StrMemory);
            double diskQueueLength = Convert.ToDouble(srvInfo.StrDiskQueue);

            SystemName.Content = srvInfo.StrSystemName;
            Row2Value.Text     = srvInfo.StrProcessor;

            // We cough-up a little red text if the processor's gettin' all karazy-like.
            if (processor >= 90)
            {
                Trace.TraceInformation("Creating red text for the Processor value at " + processor);
                Trace.Flush();
                Row2Value.Foreground = Brushes.Red;
                Row2Value.FontWeight = FontWeights.Bold;
            }
            else
            {
                Row2Value.Foreground = Brushes.White;
                Row2Value.FontWeight = FontWeights.Regular;
            }

            Row3Value.Text = srvInfo.StrMemory;

            // We cough-up a little red text if the memory's all gettin' used up and such.
            if (memory >= 90)
            {
                Trace.TraceInformation("Creating red text for the Memory value at " + memory);
                Trace.Flush();
                Row3Value.Foreground = Brushes.Red;
                Row3Value.FontWeight = FontWeights.Bold;
            }
            else
            {
                Row3Value.Foreground = Brushes.White;
                Row3Value.FontWeight = FontWeights.Regular;
            }

            Row4Value.Text = srvInfo.StrDiskQueue;

            // We cough-up a little red text if that, there disk queue length be getting a little redonk.
            if (diskQueueLength >= 2)
            {
                Trace.TraceInformation("Creating red text for the Disk Queue Length value at " + diskQueueLength);
                Trace.Flush();
                Row4Title.Foreground = Brushes.Red;
                Row4Title.FontWeight = FontWeights.Bold;
                Row4Value.Foreground = Brushes.Red;
                Row4Value.FontWeight = FontWeights.Bold;
            }
            else
            {
                Row4Title.Foreground = Brushes.White;
                Row4Title.FontWeight = FontWeights.Regular;
                Row4Value.Foreground = Brushes.White;
                Row4Value.FontWeight = FontWeights.Regular;
            }

            Row5Value.Text  = srvInfo.StrRPCCount;
            Row6Value.Text  = srvInfo.StrRPCOpsperSecond;
            Row7Value.Text  = srvInfo.StrRPCAveragedLatency;
            Row8Value.Text  = srvInfo.StrDocumentIndexingRate;
            Row9Value.Text  = srvInfo.StrFullCrawlModeStatus;
            Row10Value.Text = srvInfo.StrNumberOfDoxIndexed;
            Row11Value.Text = srvInfo.StrNumberOfIndexedAttachments;
            Row12Value.Text = srvInfo.StrSearchNumberofItemsInANotificationQueue;
            Row13Value.Text = srvInfo.StrSearchNumberOfMailboxesLeftToCrawl;
            Row14Value.Text = srvInfo.StrSearchNumberOfOutstandingBatches;
            Row15Value.Text = srvInfo.StrSearchNumberofOutstandingDox;
            Row16Value.Text = srvInfo.StrNumberOfFailedRetries;
            Row17Value.Text = srvInfo.StrMessagesQueuedforSubmission;
        }