opennms discovery模塊中的兩個(gè)問(wèn)題.
DiscoveryLink.java1.對(duì)ARP表發(fā)現(xiàn)時(shí),以下代碼有問(wèn)題:



















posted @ 2009-07-25 08:48 afunms 閱讀(260) | 評(píng)論 (0) | 編輯 收藏
My Software,My Dream—Forge a more perfect NMS product.
posted @ 2009-07-25 08:48 afunms 閱讀(260) | 評(píng)論 (0) | 編輯 收藏
與你同事一年多,你的敬業(yè)精神和技術(shù)水平都給大家留下很深的印象。
今天見(jiàn)你最后一眼,突然間,我哭了。
明天是父親節(jié),初為人父的你,還沒(méi)來(lái)得及享受這個(gè)天倫之樂(lè)就匆匆離去.....
但愿你在另一個(gè)世界不再受病魔的折磨!
同時(shí)祝你的家人平安幸福。
posted @ 2009-06-20 23:10 afunms 閱讀(137) | 評(píng)論 (0) | 編輯 收藏
7:30:起床。英國(guó)威斯敏斯特大學(xué)的研究人員發(fā)現(xiàn),那些在早上5:22—7:21分起床的人,其血液中有一種能引起心 臟病的物質(zhì)含量較高,因此,在7:21之后起床對(duì)身體健康更加有益。打開(kāi)臺(tái)燈。“一醒來(lái),就將燈打開(kāi),這樣將會(huì)重新調(diào)整體內(nèi)的生物鐘,調(diào)整睡眠和醒來(lái)模式。”拉夫堡大學(xué)睡眠研究中心教授吉姆·霍恩說(shuō)。喝一杯水。水是身體內(nèi)成千上萬(wàn)化學(xué)反應(yīng)得以進(jìn)行的必需物質(zhì)。早上喝一杯清水,可以補(bǔ)充晚上的缺水狀態(tài)。
7:30—8:00:在早飯之前刷牙。“在早飯之前刷牙可以防止牙齒的腐蝕,因?yàn)樗⒀乐螅梢栽谘例X外面涂上一層含氟的保護(hù)層。要么,就等早飯之后半小時(shí)再刷牙。”英國(guó)牙齒協(xié)會(huì)健康和安全研究人員戈登·沃特金斯說(shuō)。
8:00—8:30:吃早飯。“早飯必須吃,因?yàn)樗梢詭椭憔S持血糖水平的穩(wěn)定,”倫敦大學(xué)國(guó)王學(xué)院營(yíng)養(yǎng)師凱文·威爾倫說(shuō)。早飯可以吃燕麥粥等,這類(lèi)食物具有較低的血糖指數(shù)。
8:30—9:00:避免運(yùn)動(dòng)。來(lái)自布魯奈爾大學(xué)的研究人員發(fā)現(xiàn),在早晨進(jìn)行鍛煉的運(yùn)動(dòng)員更容易感染疾病,因?yàn)槊庖呦到y(tǒng)在這個(gè)時(shí)間的功能最弱。步行上班。馬薩諸塞州大學(xué)醫(yī)學(xué)院的研究人員發(fā)現(xiàn),每天走路的人,比那些久坐不運(yùn)動(dòng)的人患感冒病的幾率低25%。
9:30:開(kāi)始一天中最困難的工作。紐約睡眠中心的研究人員發(fā)現(xiàn),大部分人在每天醒來(lái)的一兩個(gè)小時(shí)內(nèi)頭腦最清醒 。
10:30:讓眼睛離開(kāi)屏幕休息一下。如果你使用電腦工作,那么每工作一小時(shí),就讓眼睛休息3分鐘。
11:00:吃點(diǎn)水果。這是一種解決身體血糖下降的好方法。吃一個(gè)橙子或一些紅色水果,這樣做能同時(shí)補(bǔ)充體內(nèi)的鐵含量和維生素C含量。
13:00:在面包上加一些豆類(lèi)蔬菜。你需要一頓可口的午餐,并且能夠緩慢地釋放能量。“烘烤的豆類(lèi)食品富含纖維素,番茄醬可以當(dāng)作是蔬菜的一部分。”維倫博士說(shuō)。
14:30—15:30:午休一小會(huì)兒。雅典的一所大學(xué)研究發(fā)現(xiàn),那些每天中午午休30分鐘或更長(zhǎng)時(shí)間,每周至少午休3次的人,因心臟病死亡的幾率會(huì)下降37%。
16:00:喝杯酸奶。這樣做可以穩(wěn)定血糖水平。在每天三餐之間喝些酸牛奶,有利于心臟健康。
17:00—19:00:鍛煉身體。根據(jù)體內(nèi)的生物鐘,這個(gè)時(shí)間是運(yùn)動(dòng)的最佳時(shí)間,舍菲爾德大學(xué)運(yùn)動(dòng)學(xué)醫(yī)生瑞沃·尼克說(shuō)。
19:30:晚餐少吃點(diǎn)。晚飯吃太多,會(huì)引起血糖升高,并增加消化系統(tǒng)的負(fù)擔(dān),影響睡眠。晚飯應(yīng)該多吃蔬菜,少吃富含卡路里和蛋白質(zhì)的食物。吃飯時(shí)要細(xì)嚼慢咽。
21:45:看會(huì)電視。這個(gè)時(shí)間看會(huì)兒電視放松一下,有助于睡眠,但要注意,盡量不要躺在床上看電視,這會(huì)影響睡眠質(zhì)量。
23:00:洗個(gè)熱水澡。“體溫的適當(dāng)降低有助于放松和睡眠。”拉夫堡大學(xué)睡眠研究中心吉姆·霍恩教授說(shuō)。
23:30:上床睡覺(jué)。如果你早上7點(diǎn)30起床,現(xiàn)在入睡可以保證你享受8小時(shí)充足的睡眠。
posted @ 2009-06-14 11:47 afunms 閱讀(139) | 評(píng)論 (0) | 編輯 收藏
例:select * from tbl where uyear='''06'
請(qǐng)注意其中紅色背景的單引號(hào),它即表示轉(zhuǎn)義字符,如果我們省略,則整個(gè)語(yǔ)句會(huì)出錯(cuò),轉(zhuǎn)義字符不會(huì)輸出,上例中 uyear 的實(shí)際條件值為 '06,而不是 ''06
為什么不能省略呢,假如我們省略,上句變成:select * from tbl where uyear=''06'
由于在 SQL 中單引號(hào)表示字符串的開(kāi)始和結(jié)束符號(hào),于是 SQL 解釋器會(huì)認(rèn)為語(yǔ)句中灰色背景的為字符串,其后的語(yǔ)句顯然是個(gè)錯(cuò)誤的語(yǔ)句,當(dāng)然會(huì)報(bào)錯(cuò),為了解決字符串的單引號(hào)問(wèn)題,就出現(xiàn)了轉(zhuǎn)義字符單。
posted @ 2009-06-13 21:16 afunms 閱讀(555) | 評(píng)論 (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.
今天在電視上聽(tīng)到這消息,真是挺吃驚的。對(duì)于一個(gè)長(zhǎng)期從事Java開(kāi)發(fā)的程序員來(lái)說(shuō),對(duì)Sun有一種特殊的感情。現(xiàn)在Sun突然從地球上消失了。。。。,很難接受這樣的事實(shí)。
posted @ 2009-04-21 21:53 afunms 閱讀(183) | 評(píng)論 (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 閱讀(165) | 評(píng)論 (0) | 編輯 收藏
(1) 創(chuàng)建MySQL數(shù)據(jù)庫(kù)osworkflow
新建osworkflow數(shù)據(jù)庫(kù),然后導(dǎo)入osworkflow\src\etc\deployment\jdbc\mysql.sql
(2) 在Tomcat下創(chuàng)建配置文件
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) | 評(píng)論 (0) | 編輯 收藏
posted @ 2009-02-21 12:01 afunms 閱讀(141) | 評(píng)論 (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) | 評(píng)論 (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 閱讀(136) | 評(píng)論 (0) | 編輯 收藏
行程:
2月11日 下午 惠州ZFW 給客戶(hù)培訓(xùn)SourceView基本操作
2月11日 下午 惠州GA 產(chǎn)品推廣
2月12日 上午 惠州JCY 產(chǎn)品推廣
bug:
1. IP資源沒(méi)有數(shù)據(jù);
2. 數(shù)據(jù)庫(kù)某個(gè)表字段太短,字值插不進(jìn)去;
3. 報(bào)表頁(yè)面上有-1,沒(méi)有處理;
4. 子網(wǎng)網(wǎng)關(guān)有NULL,干脆在頁(yè)面上隱藏“網(wǎng)關(guān)”這列。
另,用戶(hù)要求增加短信報(bào)警的功能。
總結(jié):
1. 現(xiàn)在用戶(hù)的技術(shù)水平也在提高,這對(duì)我們的專(zhuān)業(yè)水平、我們的產(chǎn)品質(zhì)量都提出了更高的要求;
2. 市場(chǎng)潛力大,但不同的用戶(hù)需求可能差別很大,這就要求我們的產(chǎn)品要有很強(qiáng)的擴(kuò)展性。
posted @ 2009-02-12 12:02 afunms 閱讀(116) | 評(píng)論 (0) | 編輯 收藏
posted @ 2009-01-25 17:06 afunms 閱讀(366) | 評(píng)論 (0) | 編輯 收藏
1. 解決了有時(shí)發(fā)現(xiàn)程序結(jié)束不了的問(wèn)題,根本原因在于有一個(gè)set沒(méi)有同步,改為
hasDetected = Collections.synchronizedSet(new HashSet<String>())
后,問(wèn)題解決。
2. 更改了路由發(fā)現(xiàn)中關(guān)于子網(wǎng)的一個(gè)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中只能對(duì)一個(gè)網(wǎng)絡(luò)進(jìn)行發(fā)現(xiàn),3.0可以對(duì)多個(gè)網(wǎng)絡(luò)進(jìn)行發(fā)現(xiàn),畫(huà)出多個(gè)拓?fù)鋱D。
4. 2.0中只能有一個(gè)發(fā)現(xiàn)范圍,3.0可以增加多個(gè)發(fā)現(xiàn)范圍。
5. 2.0中各表之間沒(méi)有關(guān)聯(lián),初始化時(shí)要執(zhí)行多條SQL代碼,3.0中利用表外鍵,
只要?jiǎng)h除一條記錄,就可以刪除所有相關(guān)數(shù)據(jù)。
6. 3.0在發(fā)現(xiàn)完之后,保存所有設(shè)備的SNMP表數(shù)據(jù)。
7. 3.0為再發(fā)現(xiàn)留有接口,使拓?fù)湓侔l(fā)現(xiàn)成為可能,只是暫時(shí)沒(méi)時(shí)間去實(shí)現(xiàn)。
8. 拓?fù)涔?jié)點(diǎn)排序算法以及拓?fù)鋱D的生成
排序算法 MapCompositor 給它節(jié)點(diǎn)以及連接,按一定算法計(jì)算出各節(jié)點(diǎn)的位置坐標(biāo)。
DefaultCompositor實(shí)現(xiàn)接口computeCoordinate,把節(jié)點(diǎn)按排成若干個(gè)圓。
用DefaultMapBuilder dmb = new DefaultMapBuilder();
dmb.buildMap(config.getId());
來(lái)測(cè)試排序算法,因?yàn)樗灰玫絻?nèi)存中的數(shù)據(jù),直接取數(shù)據(jù)庫(kù)的數(shù)據(jù)。
發(fā)現(xiàn)執(zhí)行的是 NewDiscoveryVisitor.buildDefaultMap()
調(diào)用發(fā)現(xiàn)后內(nèi)存中的數(shù)據(jù)。
9.增加網(wǎng)絡(luò)設(shè)備的服務(wù)器時(shí),可以重用發(fā)現(xiàn)模塊中的代碼。在2.0中是專(zhuān)門(mén)寫(xiě)了一長(zhǎng)串代碼,
與發(fā)現(xiàn)模塊沒(méi)關(guān)系。
posted @ 2009-01-24 22:21 afunms 閱讀(294) | 評(píng)論 (1) | 編輯 收藏
目前的代碼是按我的想法實(shí)現(xiàn)的,在公司的網(wǎng)絡(luò)環(huán)境中測(cè)試中通過(guò)了。但不能保證在其他復(fù)雜的環(huán)境中得到一樣的結(jié)果。
posted @ 2009-01-21 11:34 afunms 閱讀(173) | 評(píng)論 (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) | 評(píng)論 (0) | 編輯 收藏