SCOM 2012 Reference

寫Management Pack的幾個方法:
http://technet.microsoft.com/en-us/library/hh457569.aspx

1. 用SCOM Authoring寫 (Web Application Availability Monitoring – 簡單較沒彈性):
http://www.opsmanfan.com/index.php/6-use-scom-2012-to-monitor-a-webapi-without-using-scripts

2. 用SCOM Authoring寫(Web Application Transaction Monitoring – 困難較有彈性):
http://www.opsmanfan.com/index.php/8-scom-2012-actionable-web-application-alerts-a-scripted-solution

3. 用VS2012 Authoring Extentions寫 (困難最有彈性):
先安裝VS2012, 再安裝 VisualStudioAuthoringConsole_x64.msi(http://www.microsoft.com/en-us/download/details.aspx?id=30169)

TechEd SCOM 2012:

EPC Group.net

Management Pack Reference:
http://msdn.microsoft.com/en-us/library/jj130093.aspx
1. Elemnts:
http://msdn.microsoft.com/en-us/library/jj130347.aspx
2. Data Type:
http://msdn.microsoft.com/en-us/library/jj129838.aspx
3. Module Type:
http://msdn.microsoft.com/en-us/library/jj130161.aspx
4. Schema Type:
http://msdn.microsoft.com/en-us/library/jj130175.aspx

SCOM 2012 SDK:
https://msdn.microsoft.com/en-us/library/hh329086.aspx
https://msdn.microsoft.com/en-us/library/hh329022.aspx
https://msdn.microsoft.com/en-us/library/jj130058.aspx
SCOM 2007 SDK:
http://msdn.microsoft.com/en-us/library/cc268402.aspx
Key Concept:
https://technet.microsoft.com/zh-tw/library/ee957039.aspx
Entity Types:
https://msdn.microsoft.com/en-us/library/jj129881.aspx
Articles:
Self-study:
http://blogs.technet.com/b/musings_of_a_technical_tam/archive/2012/06/19/system-center-2012-self-study-guides-part-5-operations-manager.aspx
MP Dashboard:
http://social.technet.microsoft.com/wiki/contents/articles/12324.creating-a-widget-for-operations-manager-dashboard-walkthrough-1-custom-ui-control.aspx
SCOM set SessionID parameter:
http://technet.microsoft.com/en-us/library/gg494976.aspx
SQL:
SELECT * FROM [OperationsManager].[dbo].[ManagedType] — 列出可用 Type
SELECT * FROM [OperationsManager].[dbo].[PendingSdkDataSource] — 列出 SDK 塞的 Event & Performance Data

廣告

[Linux] 找出被佔用 port 的 PID

sudo netstat -l -n -p | grep <port number>  #找出佔用 port 的 PID
ps aux | egrep -w <pid> | grep -v grep  #印出 PID 的資訊
sudo kill <pid or process_name> #刪掉 process

java.util.Observer 與 java.util.EventListener 的比較

A. Observer 在 JDK 1.0 加入,比較單純,角色只有觀察者與被觀察者
B. EventListener 在 JDK 1.1 加入,比較複雜,角色有監聽者、事件與事件來源

417812_1304583414UuPo

417812_1304586849gPUL

觀察者 (監聽者):
A. interface Observer – 有 update(Observable o, Object arg) 方法
B. interface EventListener – 沒有宣告方法,通常會自定一個 subinterface 帶有 handleEvent() 方法

被觀察者 (事件):
A. class Observable – 有實做 addObserver(Observer o) 與 notifyObservers() 方法,當被觀察者要發送訊息時需呼叫 notifyObservers()
B. class EventObject – 有一個 EventSource 成員,它是產生這個 Event 的來源,addListener(EventListener l) 與 notifyListeners() 是定義在 EventSource 物件上。例如:ClickEvent 是來自 Button,Button 才有 addClickListener() 與 click() 方法,ClickEvent 僅作為傳遞消息的中介 (mediator)。

程式範例:
A. Observer:(略)

B. EventListener:
JButton button1 = new JButton();
ActionListener actionListener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent actionEvent) {
JButton jButton = (JButton) actionEvent.getSource();
int r = (int) (Math.random() * 100);
int g = (int) (Math.random() * 100);
int b = (int) (Math.random() * 100);
jButton.setBackground(new Color(r, g, b));
}
};
button1.addActionListener(actionListener);
button1.doClick();

參考文章:JAVA设计模式之Observer模式