opennms discovery模塊中的兩個問題.
DiscoveryLink.java1.對ARP表發現時,以下代碼有問題:



















posted @ 2009-07-25 08:48 afunms 閱讀(261) | 評論 (0) | 編輯 收藏
My Software,My Dream—Forge a more perfect NMS product.
posted @ 2009-07-25 08:48 afunms 閱讀(261) | 評論 (0) | 編輯 收藏
與你同事一年多,你的敬業精神和技術水平都給大家留下很深的印象。
今天見你最后一眼,突然間,我哭了。
明天是父親節,初為人父的你,還沒來得及享受這個天倫之樂就匆匆離去.....
但愿你在另一個世界不再受病魔的折磨!
同時祝你的家人平安幸福。
posted @ 2009-06-20 23:10 afunms 閱讀(138) | 評論 (0) | 編輯 收藏
7:30:起床。英國威斯敏斯特大學的研究人員發現,那些在早上5:22—7:21分起床的人,其血液中有一種能引起心 臟病的物質含量較高,因此,在7:21之后起床對身體健康更加有益。打開臺燈。“一醒來,就將燈打開,這樣將會重新調整體內的生物鐘,調整睡眠和醒來模式。”拉夫堡大學睡眠研究中心教授吉姆·霍恩說。喝一杯水。水是身體內成千上萬化學反應得以進行的必需物質。早上喝一杯清水,可以補充晚上的缺水狀態。
7:30—8:00:在早飯之前刷牙。“在早飯之前刷牙可以防止牙齒的腐蝕,因為刷牙之后,可以在牙齒外面涂上一層含氟的保護層。要么,就等早飯之后半小時再刷牙。”英國牙齒協會健康和安全研究人員戈登·沃特金斯說。
8:00—8:30:吃早飯。“早飯必須吃,因為它可以幫助你維持血糖水平的穩定,”倫敦大學國王學院營養師凱文·威爾倫說。早飯可以吃燕麥粥等,這類食物具有較低的血糖指數。
8:30—9:00:避免運動。來自布魯奈爾大學的研究人員發現,在早晨進行鍛煉的運動員更容易感染疾病,因為免疫系統在這個時間的功能最弱。步行上班。馬薩諸塞州大學醫學院的研究人員發現,每天走路的人,比那些久坐不運動的人患感冒病的幾率低25%。
9:30:開始一天中最困難的工作。紐約睡眠中心的研究人員發現,大部分人在每天醒來的一兩個小時內頭腦最清醒 。
10:30:讓眼睛離開屏幕休息一下。如果你使用電腦工作,那么每工作一小時,就讓眼睛休息3分鐘。
11:00:吃點水果。這是一種解決身體血糖下降的好方法。吃一個橙子或一些紅色水果,這樣做能同時補充體內的鐵含量和維生素C含量。
13:00:在面包上加一些豆類蔬菜。你需要一頓可口的午餐,并且能夠緩慢地釋放能量。“烘烤的豆類食品富含纖維素,番茄醬可以當作是蔬菜的一部分。”維倫博士說。
14:30—15:30:午休一小會兒。雅典的一所大學研究發現,那些每天中午午休30分鐘或更長時間,每周至少午休3次的人,因心臟病死亡的幾率會下降37%。
16:00:喝杯酸奶。這樣做可以穩定血糖水平。在每天三餐之間喝些酸牛奶,有利于心臟健康。
17:00—19:00:鍛煉身體。根據體內的生物鐘,這個時間是運動的最佳時間,舍菲爾德大學運動學醫生瑞沃·尼克說。
19:30:晚餐少吃點。晚飯吃太多,會引起血糖升高,并增加消化系統的負擔,影響睡眠。晚飯應該多吃蔬菜,少吃富含卡路里和蛋白質的食物。吃飯時要細嚼慢咽。
21:45:看會電視。這個時間看會兒電視放松一下,有助于睡眠,但要注意,盡量不要躺在床上看電視,這會影響睡眠質量。
23:00:洗個熱水澡。“體溫的適當降低有助于放松和睡眠。”拉夫堡大學睡眠研究中心吉姆·霍恩教授說。
23:30:上床睡覺。如果你早上7點30起床,現在入睡可以保證你享受8小時充足的睡眠。
posted @ 2009-06-14 11:47 afunms 閱讀(139) | 評論 (0) | 編輯 收藏
例:select * from tbl where uyear='''06'
請注意其中紅色背景的單引號,它即表示轉義字符,如果我們省略,則整個語句會出錯,轉義字符不會輸出,上例中 uyear 的實際條件值為 '06,而不是 ''06
為什么不能省略呢,假如我們省略,上句變成:select * from tbl where uyear=''06'
由于在 SQL 中單引號表示字符串的開始和結束符號,于是 SQL 解釋器會認為語句中灰色背景的為字符串,其后的語句顯然是個錯誤的語句,當然會報錯,為了解決字符串的單引號問題,就出現了轉義字符單。
posted @ 2009-06-13 21:16 afunms 閱讀(557) | 評論 (0) | 編輯 收藏
Source: CCTV.com
04-21-2009 13:29
Oracle Corporation has snapped up computer server and software maker Sun Microsystems for 7.4 billion US dollars. It trumped rival IBM's attempt to buy one of Silicon Valley's best known, and most troubled, companies.
Monday's deal comes after a month-long drama that entered its final chapter last week. IBM had retracted an earlier buyout offer after the two sides couldn't agree on key details.
Oracle has traditionally been a business software maker. It will now be able to use Sun's assets to build a more comprehensive one-stop technology shop. The deal gives Oracle ownership of the Java programming language, which runs on more than a billion devices around the world.
今天在電視上聽到這消息,真是挺吃驚的。對于一個長期從事Java開發的程序員來說,對Sun有一種特殊的感情。現在Sun突然從地球上消失了。。。。,很難接受這樣的事實。
posted @ 2009-04-21 21:53 afunms 閱讀(184) | 評論 (1) | 編輯 收藏
A workflow is a depiction of a sequence of operations, declared as work of a person, work of a simple or complex mechanism, work of a group of persons,work of an organization of staff, or machines. Workflow may be seen as any abstraction of real work, segregated in workshare, work split or whatever types of ordering. For control purposes, workflow may be a view on real work under a chosen aspect,thus serving as a virtual representation of actual work. The flow being described often refers to a document that is being transferred from one step to another.
A workflow is a model to represent real work for further assessment, e.g., for describing a reliably repeatable sequence of operations. More abstractly, a workflow is a pattern of activity enabled by a systematic organization of resources, defined roles and mass, energy and information flows, into a work process that can be documented and learned.Workflows are designed to achieve processing intents of some sort, such as physical transformation, service provision, or information processing.
Workflow concepts are closely related to other concepts used to describe organizational structure, such as silos, functions, teams, projects, policies and hierarchies. Workflows may be viewed as one primitive building block of organizations. The relationships among these concepts are described later in this entry.
The term workflow is used in computer programming to capture and develop human to machine interaction. Workflow software aims to provide end users with an easier way to orchestrate or describe complex processing of data in a visual form, much like flow charts but without the need to understand computers or programming.
posted @ 2009-03-07 10:23 afunms 閱讀(166) | 評論 (0) | 編輯 收藏
(1) 創建MySQL數據庫osworkflow
新建osworkflow數據庫,然后導入osworkflow\src\etc\deployment\jdbc\mysql.sql
(2) 在Tomcat下創建配置文件
tomcat5.5.23\conf\Catalina\localhost\osworkflow.xml
<?xml version='1.0' encoding='utf-8'?>
<Context path="/osworkflow" debug="0" reloadable="true">
<Resource
name="jdbc/DefaultDS"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
maxIdle="10"
maxWait="5000"
username="root"
password="root"
url="jdbc:mysql://localhost:3306/osworkflow?useUnicode=true&characterEncoding=utf-8"
maxActive="20"/>
</Context>
(3)修改WEB-INF\classes\osuser.xml
<opensymphony-user>
<provider class="com.opensymphony.user.provider.jdbc.JDBCAccessProvider">
<property name="user.table">os_user</property>
<property name="group.table">os_group</property>
<property name="membership.table">os_membership</property>
<property name="user.name">username</property>
<property name="user.password">passwordhash</property>
<property name="group.name">groupname</property>
<property name="membership.userName">username</property>
<property name="membership.groupName">groupname</property>
<property name="datasource">jdbc/DefaultDS</property>
</provider>
<provider class="com.opensymphony.user.provider.jdbc.JDBCCredentialsProvider">
<property name="user.table">os_user</property>
<property name="group.table">os_group</property>
<property name="membership.table">os_membership</property>
<property name="user.name">username</property>
<property name="user.password">passwordhash</property>
<property name="group.name">groupname</property>
<property name="membership.userName">username</property>
<property name="membership.groupName">groupname</property>
<property name="datasource">jdbc/DefaultDS</property>
</provider>
<provider class="com.opensymphony.user.provider.jdbc.JDBCProfileProvider">
<property name="user.table">os_user</property>
<property name="group.table">os_group</property>
<property name="membership.table">os_membership</property>
<property name="user.name">username</property>
<property name="user.password">passwordhash</property>
<property name="group.name">groupname</property>
<property name="membership.userName">username</property>
<property name="membership.groupName">groupname</property>
<property name="datasource">jdbc/DefaultDS</property>
</provider>
<authenticator class="com.opensymphony.user.authenticator.SmartAuthenticator" />
</opensymphony-user>
posted @ 2009-02-22 21:24 afunms 閱讀(513) | 評論 (0) | 編輯 收藏
posted @ 2009-02-21 12:01 afunms 閱讀(141) | 評論 (0) | 編輯 收藏
A test case in software engineering is a set of conditions or variables under which a tester will determine whether an application or software system meets specifications. The mechanism for determining whether a software program or system has passed or failed such a test is known as a test oracle. In some settings an oracle could be a requirement or use case. It may take many test cases to determine that a software program or system is functioning correctly. Test cases are often referred to as test scripts, particularly when written. Written test cases are usually collected into test suites.
Formal, requirement-based test cases
In order to fully test that all the requirements of an application are met, there must be at least one test case for each requirement unless a requirement has sub-requirements. In that situation, each sub-requirement must have at least one test case. This is frequently done using a traceability matrix. Some methodologies, like RUP, recommend creating at least two test cases for each requirement. One of them should perform positive testing of requirement and other should perform negative testing. Written test cases should include a description of the functionality to be tested, and the preparation required to ensure that the test can be conducted.
What characterizes a formal, written test case is that there is a known input and an expected output, which is worked out before the test is executed. The known input should test a precondition and the expected output should test a postcondition.
posted @ 2009-02-19 22:07 afunms 閱讀(200) | 評論 (0) | 編輯 收藏
Tested configuration and discovery modules,this is the first time I test my program so carefully.Since SV2.0 has much bug,now I am aware of the importance of testing.
I tested the following cases:
Configuration
1. Add a network device to the network device list
2. Add a server to the server list
3. Remove a network device from the network device list
4. Remove a server from the server list
5. Add a network device to the server list(failure is correct)
6. Add a server to the network device list(failure is correct)
7. Add a link road
8. Remove a link road
9. Query a server/network device/link according to the given condition
Discovery
10. Totally new discover a network configuration
11. Re-discover a network configuration
12. Remove a network configurationposted @ 2009-02-18 22:09 afunms 閱讀(137) | 評論 (0) | 編輯 收藏
行程:
2月11日 下午 惠州ZFW 給客戶培訓SourceView基本操作
2月11日 下午 惠州GA 產品推廣
2月12日 上午 惠州JCY 產品推廣
bug:
1. IP資源沒有數據;
2. 數據庫某個表字段太短,字值插不進去;
3. 報表頁面上有-1,沒有處理;
4. 子網網關有NULL,干脆在頁面上隱藏“網關”這列。
另,用戶要求增加短信報警的功能。
總結:
1. 現在用戶的技術水平也在提高,這對我們的專業水平、我們的產品質量都提出了更高的要求;
2. 市場潛力大,但不同的用戶需求可能差別很大,這就要求我們的產品要有很強的擴展性。
posted @ 2009-02-12 12:02 afunms 閱讀(116) | 評論 (0) | 編輯 收藏
posted @ 2009-01-25 17:06 afunms 閱讀(366) | 評論 (0) | 編輯 收藏
1. 解決了有時發現程序結束不了的問題,根本原因在于有一個set沒有同步,改為
hasDetected = Collections.synchronizedSet(new HashSet<String>())
后,問題解決。
2. 更改了路由發現中關于子網的一個bug:
原代碼:
if(!pool.existSubnet(subnet)){
engine.addSubnet(subnet);
router.addSubnet(subnet);
}
改為:
Subnet subnet = pool.getSubnetByIP(item.getDest());
if(subnet==null){ //if subnet doesn't exist
subnet = new Subnet();
subnet.setNetAddress(item.getDest());
subnet.setNetMask(item.getNetMask());
engine.addSubnet(subnet);
}
router.addSubnet(subnet);
3. 2.0中只能對一個網絡進行發現,3.0可以對多個網絡進行發現,畫出多個拓撲圖。
4. 2.0中只能有一個發現范圍,3.0可以增加多個發現范圍。
5. 2.0中各表之間沒有關聯,初始化時要執行多條SQL代碼,3.0中利用表外鍵,
只要刪除一條記錄,就可以刪除所有相關數據。
6. 3.0在發現完之后,保存所有設備的SNMP表數據。
7. 3.0為再發現留有接口,使拓撲再發現成為可能,只是暫時沒時間去實現。
8. 拓撲節點排序算法以及拓撲圖的生成
排序算法 MapCompositor 給它節點以及連接,按一定算法計算出各節點的位置坐標。
DefaultCompositor實現接口computeCoordinate,把節點按排成若干個圓。
用DefaultMapBuilder dmb = new DefaultMapBuilder();
dmb.buildMap(config.getId());
來測試排序算法,因為它不要用到內存中的數據,直接取數據庫的數據。
發現執行的是 NewDiscoveryVisitor.buildDefaultMap()
調用發現后內存中的數據。
9.增加網絡設備的服務器時,可以重用發現模塊中的代碼。在2.0中是專門寫了一長串代碼,
與發現模塊沒關系。
posted @ 2009-01-24 22:21 afunms 閱讀(297) | 評論 (1) | 編輯 收藏
目前的代碼是按我的想法實現的,在公司的網絡環境中測試中通過了。但不能保證在其他復雜的環境中得到一樣的結果。
posted @ 2009-01-21 11:34 afunms 閱讀(174) | 評論 (0) | 編輯 收藏
Modules of SourceView3.0: 1. Topology Discovery:System initializes,discovering all devices and the links among them.Devices includes routers,switches,route switches,ATM Switches and servers. 2. Configuration Management:Manages all of IT elements in NMS,including network devices,servers,DBs,midwares and web-servers.Add elements intoNMS,remove elements from it and so on. 3. Report Management:Defines some useful reports,users can review the performance data of any IT elements through these reports. 4. Business View:Users can define a view by themselves.The elements associate with the specified business system that they concern would be dragged into this view. 5. Topology View: Shows network topology and reflects real running status of the entire network.e.g.traffic of links. 6. Fault Management:Analyses the performance data collected by monitors,if it violates the rules defined by users,NMS would alarm immediately. 7. Performance Management:Collects performance data from IT elements by all Kinds of monitors. |
posted @ 2009-01-20 21:49 afunms 閱讀(218) | 評論 (0) | 編輯 收藏