publicstaticvoidCreateCounters() { CounterCreationDataCollection col = new CounterCreationDataCollection();
// Create custom counter objects CounterCreationData counter1 = new CounterCreationData(); counter1.CounterName = "Available Worker Threads"; counter1.CounterHelp = "The difference between the maximum number " + "of thread pool worker threads and the " + "number currently active."; counter1.CounterType = PerformanceCounterType.NumberOfItems32;
CounterCreationData counter2 = new CounterCreationData(); counter2.CounterName = "Available IO Threads"; counter2.CounterHelp = "The difference between the maximum number of " + "thread pool IO threads and the number "+ "currently active."; counter2.CounterType = PerformanceCounterType.NumberOfItems32;
CounterCreationData counter3 = new CounterCreationData(); counter3.CounterName = "Max Worker Threads"; counter3.CounterHelp = "The number of requests to the thread pool "+ "that can be active concurrently. All "+ "requests above that number remain queued until " + "thread pool worker threads become available."; counter3.CounterType = PerformanceCounterType.NumberOfItems32;
CounterCreationData counter4 = new CounterCreationData(); counter4.CounterName = "Max IO Threads"; counter4.CounterHelp = "The number of requests to the thread pool " + "that can be active concurrently. All "+ "requests above that number remain queued until " + "thread pool IO threads become available."; counter4.CounterType = PerformanceCounterType.NumberOfItems32;
// Add custom counter objects to CounterCreationDataCollection. col.Add(counter1); col.Add(counter2); col.Add(counter3); col.Add(counter4); // delete the category if it already exists if(PerformanceCounterCategory.Exists("MyAspNetThreadCounters")) { PerformanceCounterCategory.Delete("MyAspNetThreadCounters"); } // bind the counters to the PerformanceCounterCategory PerformanceCounterCategory category = PerformanceCounterCategory.Create("MyAspNetThreadCounters", "", col); } }
額外處理事項: 直接在 Jenkins server 發 pr 給 openshift 時,發生 503 錯誤。 使用 ssh 登入 openshift 看 log ,發現 Node Sass does not yet support your current environment 錯誤 必須登入執行以下語法修正模組問題 npm rebuild node-sass
建置作業,會得到錯誤訊息
1 2 3 4
上略... 19:44:46 Host key verification failed. 19:44:46 fatal: Could not read from remote repository. 下略...
原因:主機密鑰驗證失敗,這個錯誤的意思是我的 Jenkins Server 主機並不認得遠端的 Openshift Server 的 host key,主要的原因是 Jenkins Service 在執行的身份是 NT AUTHORITY\SYSTEM,由於我已經有合適權限的帳號,所以只需要切換執行 Jenkins Server 的身份即可。
一個處理器在一個時間段內其實只能做一件事,因為它只有一個個體、一個時空。而多任務操作系統把一個長時間段劃分成很多短小的時間片,每個時間片只讓處理器執行一個進程(Process)——儘管同時可能有多個進程需要處理。在第一個時間片裡,操作系統讓處理器處理 A 進程;時間片的時間用完之後,無論 A 進程處理到什麼程度,都要被“掛起”(即,A 進程這時不能再佔用處理器資源——儘管它還是被允許使用計算機的其他資源,如內存、磁盤、屏幕輸出等);在第二個時間片裡,處理器處理的是 B 進程,時間用完之後,B 進程將與 A 進程一樣被中途“掛起”;
優秀的領導,能夠把人們帶到他們想去的地方;而卓越的領導,能夠把人們帶到他們應該去但是沒想過要去的地方 A leader takes people where they want to go. A great leader takes people where they don’t necessarily want to go,but ought to be.