afunms

My Software,My Dream—Forge a more perfect NMS product.

#

HFC

今天到中山电视台,但根本没与用户深入交流的机会。
如果真是做HFC网络的监测,那我们肯定不行,只能放弃。

不过听他的意思,又好像是要做一般IP网络监测,那我们还有机会。

posted @ 2007-12-20 11:23 afunms 阅读(91) | 评论 (0)编辑 收藏

internal class

public class Category
{
    
private int id;
    
private String cnName;
    
private String enName;
    
private Map<String,Image> images;
    
    
public Category()
    
{
        images 
= new HashMap<String,Image>();
    }

    
    
public String getCnName() {
        
return cnName;
    }

    
    
public void setCnName(String cnName) {
        
this.cnName = cnName;
    }

    
    
public String getEnName() {
        
return enName;
    }

    
    
public void setEnName(String enName) {
        
this.enName = enName;
    }

    
    
public int getId() {
        
return id;
    }

    
    
public void setId(int id) {
        
this.id = id;
    }

    
    
public void addImage(String flag,String[] imageIcons) {        
        images.put(flag, 
new Image(imageIcons[0],imageIcons[1],imageIcons[2]));
    }

    
    
public String getNormalImages(String flag) {
        
if(images.containsKey(flag))
           
return images.get(flag).getNormal();
        
else
           
return null;    
    }
 

    
public String getAlarmImages(String flag) {
        
if(images.containsKey(flag))
           
return images.get(flag).getAlarm();
        
else
           
return null;    
    }
 

    
public String getDownImages(String flag) {
        
if(images.containsKey(flag))
           
return images.get(flag).getDown();
        
else
           
return null;    
    }
 
    
    
private class Image
    
{
        
private String normal;
        
private String alarm;
        
private String down;
        
        
public Image(String normal,String alarm,String down)
        
{
            
this.normal = normal;
            
this.alarm = alarm;
            
this.down = down;
        }


        
public String getNormal() {
            
return normal;
        }

        
        
public String getAlarm() {
            
return alarm;
        }

                
        
public String getDown() {
            
return down;
        }

    }

}
写了这么久java,还是第一次用到内部类

<category id="4">
     <name cn="服务器" en="server"/>
     <image normal="server.gif" alarm="server_alarm.gif" down="server_alarm.gif">
     <product flag="windows" normal="server_win2003.gif"

alarm="server_win2003_alarm.gif" down="server_win2003_alarm.gif"/>
     <product flag="linux" normal="server_linux.gif" alarm="server_linux_alarm.gif"

down="server_linux_alarm.gif"/>
        <product flag="solaris" normal="server_solaris.gif" alarm="server_solaris_alarm.gif"

down="server_solaris_alarm.gif"/>
        <product flag="aix" normal="server_aix.gif" alarm="server_aix_alarm.gif"

down="server_aix_alarm.gif"/>
        <product flag="tru64" normal="server_tru64.gif" alarm="server_tru64_alarm.gif"

down="server_tru64_alarm.gif"/>
     </image>
   </category>
要把这个xml存在一个类中,因此我设计了这个类


posted @ 2007-12-11 12:53 afunms 阅读(154) | 评论 (0)编辑 收藏

TreeMap

用TreeMap装载snmp的ifTable,真是个不错的选择
优点:能排序,又有hashMap的功能。

唯一的不好就是只能按主键排序


public class IfEntityTable extends TreeMap<String,IfEntity>
{
    private static final long serialVersionUID = 25611283245733824L;
  
    public void add(IfEntity ifObj)
   {
          put(ifObj.getIndex(),ifObj);
    }
}

public class IfEntity implements TableItem
{
 //------------property----------
     private String index;
     private String descr;
}

posted @ 2007-12-10 09:32 afunms 阅读(137) | 评论 (0)编辑 收藏

Sourceview Architecture

 

SourceView综合监控管理系统总体设计如下:


 

底层实现数据采集,系统通过多种方式对网络设备、服务器、数据库系统以及中间件进行数据采集。采集方式主要有SNMP、NetFlow、SysLog、SNMPTrap、Telnet、JDBC和JMX。

中间层负责数据处理和分析,包括系统的主要功能,实现了IT系统静态数据和动态数据的整合;并实现配置管理、事件管理、故障管理、性能管理等。这一层次中主要实现数据的集中分析和关联分析,将各个监控对象的故障数据和性能数据进行集中整合。

上层是综合监控管理系统的表现层,这一层主要包含拓扑视图、性能报表和故障提示等。用户可以通过web的方式,以图形的方式查询设备的运行情况,可以分为实时和历史两种模式;对于设备运行过程中出现的故障能够在图形上展现出来,并且按照用户设定的方式进行告警。

 

       以前画这个总体结构图都是copy别人的,但其实没有一个能真正反映我的设计思想,
所以今天专门花了好长时间用visio画了个自己的结构图。

posted @ 2007-12-09 15:08 afunms 阅读(319) | 评论 (1)编辑 收藏

Goal and Principle

 

根据用户需求,XX公安综合监控管理系统项目的建设目标如下:

1.建立面向运维业务需要的自动化监控管理体系,提高管理质量。

2.保证系统可靠性和可用性,为用户提供7×24小时不间断的可靠服务。

3.在复杂的异构环境中实现集中统一管理,轻松维护复杂的异构环境并使之有效运行。

4.把运维人员从管理产品的复杂负担中解放出来,系统能实现自动的检测和告警。

5.将错综复杂的系统信息,各类系统事件按照运行管理的需求进行过滤整理,帮助系统维护人员专注于重要事件的管理和响应。

6.总结出对系统管理、业务管理、服务管理有用的信息,为管理者提供更全面,更直接的管理信息,为制订相关决策提供依据。

系统设计原则:

1.标准化原则:遵循TCP/IP、SNMP和NetFlow等相关的国际标准或工业标准,支持对设备厂商通用MIB的管理;

2.开放性原则:支持对各种网络设备厂商管理工具的集成,具有开放的API接口,支持对网管系统的二次开发;

3.易用性原则:要求管理功能以良好直观的界面和图形方式实现,能通过浏览器方式进入系统;

4.健壮性原则:系统监控的设备多,数据量巨大,系统本身应健壮、易于维护;

   5.节省资源原则:系统设计在满足用户需求的基础上,应尽量减少对网络带宽及系统资源的占用。

posted @ 2007-12-06 20:51 afunms 阅读(110) | 评论 (0)编辑 收藏

Requestment Inquisition

 

   今天对XX公安进行需求调研。根据调研,XX公安主要有以下四个方面需求:

1.    网络

(1)XX公安的网络拓扑为星加环结构,其中星形结构作备份用。如果网络拓扑从环形变为星形,系统必须给出告警。

(2)对于汇接层的路由设备,如果其路由表发生变化,系统应给出告警。

(3)对于汇接层的路由设备,可以开启netflow协议,网管系统捕获netflow数据包,以分析网络流量以及带宽利用率,对于异常流量,系统应给出告警。

2.    服务器

XX公安服务器安装有多种操作系统,其中包括Windows2003、AIX、Hp-Ux和Fedora Linux。

对于这些服务器,主要监控:

服务器基本性能指标;

服务器进程;

服务器的错误日志;

3.    数据库

XX公安现有的数据库系统包括Oracle8i、Oracle9i、Oracle10g和MS SQL-Server2000。

对于这些数据库系统,主要监控:

数据库基本性能指标;

数据库错误日志。

4.    中间件

        XX公安现有的中间件系统包括WebLogic8.0和WebSphere5.0,主要监控中
    间件中数据库连接池当前工作状况。

posted @ 2007-12-05 20:43 afunms 阅读(352) | 评论 (0)编辑 收藏

Architecture Reconstruction

Architecture Reconstruction

Intended vs. realized architecture. Evaluation of an architecture's properties is critical to successful system development. However, reasoning about a system's intended architecture must be recognized as distinct from reasoning about its realized architecture. As design and eventually implementation of an architecture proceed, faithfulness to the assumptions of the intended architecture is not always achieved. This is particularly true in cases where the intended architecture is not completely specified, documented or disseminated to all of the project members. This problem is exacerbated during maintenance and evolutionary development, as architectural drift and erosion occur.

Why architecture reconstruction important. To apply reasoning about the properties of a system's intended architecture to the properties of the implemented system, we must either ensure that the realized architecture conforms to the intended architecture or change the intended architecture to match reality. Both cases may require reconstructing the architecture of the realized system.

Phases of reconstruction. Architecture reconstruction is an iterative and interactive process, comprising four phases.

  • The first phase is the extraction, from implementation artifacts (including source code and dynamic information such as event traces), of a set of extracted views that represent the system's fundamental structural and behavioral elements.
  • The second phase is fusion of the extracted views to create fused views that augment or improve the extracted views.
  • During the third phase, the analyst iteratively and interactively develops and applies patterns to the fused views to reconstruct architecture-level derived views. Patterns provide the medium for an analyst to express their understanding of a system's architecture as structural and attribute-based relationships among its components.
  • Finally, the derived views may be explored for the purposes of evaluating architectural conformance, identifying targets for reengineering or reuse and analyzing the architecture's qualities.

The reconstruction process can be most effectively supported by the integration of existing tools and techniques. There currently exist a large number of commercial and research tools that provide the basic mechanisms for view extraction. Similarly, there are several tools and techniques available for performing view fusion and reconstruction. The synthesis of these tools and techniques provides a support environment for software architects and analysts reconstructing architectures.

To compliment our previous work in reconstruction we are currently surveying tools that are available for reconstruction to determine the current state of the practice for reconstructing architectural representations. We will study the information that these tools extract with emphasis on how they present the extracted views and how they aid in analysis of legacy systems.

The SEI will assist organizations with architecture reconstruction exercises.

posted @ 2007-11-29 16:30 afunms 阅读(146) | 评论 (0)编辑 收藏

Architecture Design , Evaluation and Documentation

Methods for Software Architecture Design

Software architecture forms the backbone for any successful software-intensive system. An architecture is the primary carrier of a software system's quality attributes such as performance or reliability. Designing the right architecture is the linchpin for software project success. Designing the wrong one is a recipe for guaranteed disaster.

Methods for Software Architecture Evaluation

How do you know if a software architecture for a system is suitable without having to build the system first?

The answer is to conduct an evaluation of it. A formal software architecture evaluation should be a standard part of the architecture-based software development life cycle. Architecture evaluation is a cost-effective way of mitigating the substantial risks associated with this highly important artifact.

The achievement of a software system's qualities attributes depends much more on the software architecture than on code-related issues such as language choice, fine-grained design, algorithms, data structures, testing, and so forth. Most complex software systems are required to be modifiable and have good performance. They may also need to be secure, interoperable, portable, and reliable. But for any particular system, what precisely do these quality attributes - modifiability, security, performance, reliability - mean? Can a system be analyzed to determine these desired qualities? How soon can such an analysis occur? What happens these quality attributes are in conflict with each other? How can the tradeoffs be examined, analyzed, and captured?

Methods for Software Architecture Documentation

Because architectures are intellectual constructs of enduring and long-lived importance, communicating an architecture to its stakeholders becomes as important a job as creating it in the first place. If the architecture cannot be understood so that others can build systems from it, analyze it, maintain it, and learn from it, then the effort put into crafting it will by and large have been wasted.
Documenting a software architecture is a matter of choosing a set of relevant views of the architecture, documenting each of those views, and then documenting information that applies to more than one view or to the set of views as a whole.

posted @ 2007-11-28 15:10 afunms 阅读(154) | 评论 (0)编辑 收藏

work out netflow

琢磨了一个多星期,终于把netflow做出来了。
关键在于理解Cisco netflow v9白皮书《Cisco IOS NetFlow Version 9 Flow-Record Format》。

我想要的就是得到源IP、目标IP、源端口、目标端口以及使用的协议,
这是程序运行的结果:
Router IP=192.168.0.254
收到netflow包,包长=1420
version=9
count=29
unixSecs=2007-11-23 03:15:19
packageSequence=9329
源IP=59.41.62.50
目标IP=192.168.3.90
协议=6
源Port=7709
目标Port=2620
源IP=58.251.60.66
目标IP=58.253.18.208
协议=6
源Port=12000
目标Port=1469
源IP=192.168.2.20
目标IP=58.61.32.11
协议=17
源Port=4000
目标Port=8000
源IP=202.106.46.151
目标IP=58.253.18.208
协议=17
源Port=53
目标Port=1034
源IP=192.168.2.20
目标IP=219.133.60.243
协议=17
源Port=4000
目标Port=8000
源IP=219.133.60.153
目标IP=58.253.18.208
协议=17
源Port=8000
目标Port=1035
源IP=192.168.3.90
目标IP=61.152.112.125
协议=6
源Port=2633
目标Port=80
-------------------------/192.168.0.254
收到netflow包,包长=1424
version=9
count=29
unixSecs=2007-11-23 03:16:12
packageSequence=9354
源IP=58.251.60.182
目标IP=192.168.2.154
协议=6
源Port=80
目标Port=2244
源IP=219.133.49.75
目标IP=58.253.18.208
协议=17
源Port=8000
目标Port=2851
源IP=192.168.2.156
目标IP=219.133.49.75
协议=6
源Port=2851
目标Port=80
源IP=4.2.2.4
目标IP=58.253.18.208
协议=17
源Port=53
目标Port=2166
源IP=192.168.2.156
目标IP=222.141.220.165
协议=6
源Port=2981
目标Port=80

下一步就是把结果入库,然后分析,得出用户想要的东西。

 

posted @ 2007-11-27 13:18 afunms 阅读(205) | 评论 (0)编辑 收藏

用户意见

1. 设备管理中->查寻,要支持模糊查寻。
2. 拓扑图中可以无限滚动,不好。
3. 报警数据应该立即插入数据库,才能在告警平台上显示。
4. 报表上设备太多,没有查找功能。
5. 生成的excel报表中,没有设备名称以及查询时间
6. 修改了告警平台,压缩告警,以及删除告警(同时删除多条相同的记录)
7. 去掉Cisco的电源和风扇监视器(因为没什么用,而且耗资源)。
8. 要动态更新接口数据。
9. 如果ping不通,其它监视器则不运行。
10. 网络拓扑太大,应该按子网来分。

这些意见对我们系统改进很有帮助,将在2.0中一一改进。 

posted @ 2007-11-26 18:55 afunms 阅读(87) | 评论 (0)编辑 收藏

netflow

   In order to make a analysis of business applications,we decide to
add netflow feature into SourceView2.0.

   NetFlow, much like RMON-based probes, can give you information on where,
why, how and by whom specific applications are being used and how the usage
might affect the network. NetFlow is a part of Cisco’s IOS software, and the current
version, 9, is currently moving toward standardization in the IETF as IPFIX.
  Networking vendors other than Cisco, such as Enterasys and Juniper, are taking a
role in shaping the standard, and are already showing interest in adopting IPFIX.
This, of course, makes NetFlow/IPFIX far more attractive as a consistent source
for information about application flows over a network in heterogeneous environments.
 
NetFlow provides the following information:
* IP address source (who is sending an application service?)
* IP address destination (who is receiving service?)
* Source port (what application is it?)
* Destination port (what application is it?)
* Layer 3 protocol type
* Class of service

posted @ 2007-11-25 22:35 afunms 阅读(155) | 评论 (0)编辑 收藏

UML类图

http://blog.csdn.net/dylgsy/
UML的类图关系分为: 关联、聚合/组合、依赖、泛化(继承)。而其中关联又分为双向关联、
单向关联、自身关联;下面就让我们一起来看看这些关系究竟是什么,以及它们的区别在哪里。


1、关联


双向关联:
C1-C2:指双方都知道对方的存在,都可以调用对方的公共属性和方法。

在GOF 的设计模式书上是这样描述的:虽然在分析阶段这种关系是适用的,但我们觉得它对于描述设计模式内的类关系来说显得太抽象了,因为在设计阶段关联关系必须被 映射为对象引用或指针。对象引用本身就是有向的,更适合表达我们所讨论的那种关系。所以这种关系在设计的时候比较少用到,关联一般都是有向的。

使用ROSE 生成的代码是这样的:

class C1 
{
public
:
    C2
*
 theC2;

}
;

class
 C2 
{
public
:
    C1
*
 theC1;

}
;

双向关联在代码的表现为双方都拥有对方的一个指针,当然也可以是引用或者是值。


单向关联:
C3->C4:表示相识关系,指C3知道C4,C3可以调用C4的公共属性和方法。没有生命期的依赖。一般是表示为一种引用。

生成代码如下:

class C3 
{
public
:
    C4
*
 theC4;

}
;

class
 C4 
{

}
;

单向关联的代码就表现为C3有C4的指针,而C4对C3一无所知。



自身关联(反身关联):
自己引用自己,带着一个自己的引用。

代码如下:

class C14 
{
public
:
    C14
*
 theC14;

}
;

就是在自己的内部有着一个自身的引用。

2、聚合/组合

当类之间有整体-部分关系的时候,我们就可以使用组合或者聚合。



聚合:表示C9聚合C10,但是C10可以离开C9而独立存在(独立存在的意思是在某个应用的问题域中这个类的存在有意义。这句话怎么解,请看下面组合里的解释)。

代码如下:

class C9 
{
public
:
    C10 theC10;

}
;

class
 C10 
{

}
;

 



组 合(也有人称为包容):一般是实心菱形加实线箭头表示,如上图所示,表示的是C8被C7包容,而且C8不能离开C7而独立存在。但这是视问题域而定的,例 如在关心汽车的领域里,轮胎是一定要组合在汽车类中的,因为它离开了汽车就没有意义了。但是在卖轮胎的店铺业务里,就算轮胎离开了汽车,它也是有意义的, 这就可以用聚合了。在《敏捷开发》中还说到,A组合B,则A需要知道B的生存周期,即可能A负责生成或者释放B,或者A通过某种途径知道B的生成和释放。

他们的代码如下:

class C7 
{
public
:
    C8 theC8;

}
;

class
 C8 
{
}
;

 

可以看到,代码和聚合是一样的。具体如何区别,可能就只能用语义来区分了。

3、依赖

依赖:
指C5可能要用到C6的一些方法,也可以这样说,要完成C5里的所有功能,一定要有C6的方法协助才行。
C5依赖于C6的定义,一般是在C5类的头文件中包含了C6的头文件。ROSE对依赖关系不产生属性。

注意,要避免双向依赖。一般来说,不应该存在双向依赖。

ROSE生成的代码如下:

// C5.h
#include "C6.h"

class C5 
{

}
;

// C6.h

#include "C5.h"

class C6
{

}
;

虽然ROSE不生成属性,但在形式上一般是A中的某个方法把B的对象作为参数使用(假设A依赖于B)。如下:

#include "B.h"
class A
{
          
void Func(B &
b);
}

那依赖和聚合\组合、关联等有什么不同呢?

关联是类之间的一种关系,例如老师教学生,老公和老婆,水壶装水等就是一种关系。这种关系是非常明显的,在问题领域中通过分析直接就能得出。

依 赖是一种弱关联,只要一个类用到另一个类,但是和另一个类的关系不是太明显的时候(可以说是“uses”了那个类),就可以把这种关系看成是依赖,依赖也 可说是一种偶然的关系,而不是必然的关系,就是“我在某个方法中偶然用到了它,但在现实中我和它并没多大关系”。例如我和锤子,我和锤子本来是没关系的, 但在有一次要钉钉子的时候,我用到了它,这就是一种依赖,依赖锤子完成钉钉子这件事情。

组合是一种整体-部分的关系,在问题域中这种关系很明显,直接分析就可以得出的。例如轮胎是车的一部分,树叶是树的一部分,手脚是身体的一部分这种的关系,非常明显的整体-部分关系。

上述的几种关系(关联、聚合/组合、依赖)在代码中可能以指针、引用、值等的方式在另一个类中出现,不拘于形式,但在逻辑上他们就有以上的区别。

这 里还要说明一下,所谓的这些关系只是在某个问题域才有效,离开了这个问题域,可能这些关系就不成立了,例如可能在某个问题域中,我是一个木匠,需要拿着锤 子去干活,可能整个问题的描述就是我拿着锤子怎么钉桌子,钉椅子,钉柜子;既然整个问题就是描述这个,我和锤子就不仅是偶然的依赖关系了,我和锤子的关系 变得非常的紧密,可能就上升为组合关系(让我突然想起武侠小说的剑不离身,剑亡人亡...)。这个例子可能有点荒谬,但也是为了说明一个道理,就是关系和 类一样,它们都是在一个问题领域中才成立的,离开了这个问题域,他们可能就不复存在了。


4、泛化(继承)



泛化关系:如果两个类存在泛化的关系时就使用,例如父和子,动物和老虎,植物和花等。
ROSE生成的代码很简单,如下:

#include "C11.h"

class C12 : public C11
{
}
;


5、这里顺便提一下模板



上面的图对应的代码如下:

template<int>
class C13 
{
}
;

这里再说一下重复度,其实看完了上面的描述之后,我们应该清楚了各个关系间的关系以及具体对应到代码是怎么样的,所谓的重复度,也只不过是上面的扩展,例如A和B有着“1对多”的重复度,那在A中就有一个列表,保存着B对象的N个引用,就是这样而已。

posted @ 2007-11-24 22:37 afunms 阅读(117) | 评论 (0)编辑 收藏

snmp trap

   以前对SNMP Trap没有真正理解,今天收集到了Lucent ATM trap信息,
突然间有了收获,明白了两点:
   1. 以前看过的Trap都是公用的。而设备产商可自定义Trap,比如Lucent
ATM发出来的Trap就全是自定义的。generic=6(enterpriseSpecific)表示这
个Trap是自定义的。

   2. 这些Trap中的oid其实在acmib.mib中都有定义,查acmib就可以知道这
个trap是什么意思。所以,只要能把解析acmib,把acmib中symbol和oid都导
入数据库中,便可根据oid来查询symbol,从而知道这个trap的意思。

snmp trap from=172.16.1.36
generic=6
specific=5
oid=1.3.6.1.4.1.1751.2.18.8.3
version=V1TRAP
1.3.6.1.4.1.1751.2.18.15.2.0 = 905004
1.3.6.1.4.1.1751.2.18.15.3.0 = 12
1.3.6.1.4.1.1751.2.18.2.23.1.2.0 = 2

posted @ 2007-11-23 12:55 afunms 阅读(576) | 评论 (1)编辑 收藏

同类产品(10)—NetworkMapper

 

“NetworkMapper 是由本公司和清华大学联合研制的以太网络管理产品。系统采用具有自主知识产权的在国际上处于领先位置的核心技术”,不知有啥核心技术?

拓扑发现还可以,但其他基本没什么亮点,而且这个界面很久以前肯定看过,只是记不得是哪个产品了,呵呵。

posted @ 2007-11-22 14:11 afunms 阅读(155) | 评论 (0)编辑 收藏

同类产品(9)—安奈特SNMPc

 

很久以前一个网管给我的一个软件,系统为c/s程序。它的技术支持http://www.alliedtelesis.com.cn/support.htm已经不能访问了,呵呵。

最大的优点就是发现得比较全面,而且操作比较方便,在拓扑图上基本可以找到你想要的所有操作。
还有,可查看的内容也很丰富。

posted @ 2007-11-21 12:15 afunms 阅读(231) | 评论 (0)编辑 收藏

仅列出标题
共25页: First 上一页 9 10 11 12 13 14 15 16 17 下一页 Last 

My Links

News

留言簿(18)

随笔档案

相册

搜索

最新评论

阅读排行榜