afunms

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

#

fix a bug

       突然发现链路的接口描述都是vlan,而不是实际的物理口,为了找出出错的原因,又浪费我几乎一天的时间。还好,终于去掉了一个严重的bug。原来fdb表经常变化,每次提取的结果都不一样,我修改程序,仅在需求时提取fdb表信息,这样数据就比较准确了。

posted @ 2007-07-28 21:26 afunms 阅读(85) | 评论 (0)编辑 收藏

weekend

下午跟用户沟通了一下,得知我们的软件能自动画出拓扑图,对我们的软件很感兴。

终于到周末了,这周可真累坏了。但是收获还是很大,呵呵。

posted @ 2007-07-27 18:56 afunms| 编辑 收藏

discovery result

       今天做了四次发现,每次耗时约50分钟。每次发现的结果不同,大概都是55到60台设备。还有好些设备没有发现,我想是因为没有开SNMP协议或者community未知。

       不论怎样,在发现过程中,没有抛出空指针错误已经让我很满意了。
   

posted @ 2007-07-26 19:14 afunms 阅读(118) | 评论 (0)编辑 收藏

Test topo discovery

今天对发现程序作了如下改动:
1、加入IP范围,限制发现的范围,昨天程序跑了两个小时没结束,就是这个原因。因为有的IP是别的城市的。
2、这里的maipu设备全是路由,所以遇到maipu设备默认它是路由,就不用再判断了,加快速度。
3、修改了对子网的处理。
4、增加了确认链路带宽程序。

posted @ 2007-07-25 21:45 afunms 阅读(126) | 评论 (0)编辑 收藏

测试新产品

今天到**公安局测试我们的新产品,又遇到安奈特的设备,拓扑发现还是有问题,很郁闷。

posted @ 2007-07-24 21:04 afunms| 编辑 收藏

modified discovery algorithm

    I ignored the importance of subnets.I knew a switch can possess many subnets,whereas,
I did not handle this situation.So the discovery result would be inaccurate.
    Therefore,I modified my discovery algorithm.A switch belongs to many subnets.
After discovering all devices in the lan,program probes every subnet in order to find
out all link roads among those switches.
    Additional,I had a fault thought,the gateway must locate on a router,so I excluded
the router from the subnet.Today,I found the gateway can be also locate on a 3 layer
switch,and this switch is a member of this subnet.

posted @ 2007-07-23 14:15 afunms 阅读(136) | 评论 (0)编辑 收藏

第一个SOAP程序

我的第一个SOAP程序,这将成为我研究web service的开始

public class HelloClient
{
 public String getName(String name)
    {
        return "你好" + name + ",欢迎来到Web服务的世界!";
    }
}


import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.namespace.QName;
import java.net.URL;

public class SayHelloClient
{
    public static void main(String[] args)
    {
        try
        {
            String endpoint = "http://localhost:8080/axis/HelloClient.jws";
            Service service = new Service();
            Call call = (Call) service.createCall();
            call.setOperationName(new QName(endpoint,"getName"));
            call.setTargetEndpointAddress(new URL(endpoint));

            String ret = (String) call.invoke(new Object[]{"zhangsan"});
            System.out.println("return value is:" + ret);
        }
        catch (Exception ex)
        {
            ex.printStackTrace();
        }
    }
}

posted @ 2007-07-22 19:50 afunms 阅读(204) | 评论 (0)编辑 收藏

The Fight Against Crime

  PETS5  第三课作文题目 (从网上转摘)

The Fight Against Crime
 Today the crime rate in some of our cities seems to be rising. Many citizens complain about the
thefts and robberies that take place in their street blocks. Therefore, more and more people are
appealing to the authorities to take strong measures to reduce the crime rate.
 
 Faced with criminals, different people have different attitudes towards them. Some become so
frightened that they tend to give up fighting or to turn a blind eye to the criminals. Others, however,
are brave enough to fight the criminals even at the risk of their own lives. In their eyes, responsibility
is the most important of all the values that hold honest people together. Without it there can be no
self-respect, no trust, no law,ultimately, no society. There is no doubt that they set a good example
for all of us to follow.
    As far as I am concerned, my suggestions are as follows. In the first place, every one of us should
receive a law education. Secondly, criminals must be punished severely. Finally, it is urgent to set up a
foundation to reward those who fight criminals. In the way we can stand up to any crime and smash it.

posted @ 2007-07-04 17:33 afunms 阅读(685) | 评论 (0)编辑 收藏

Health or Wealth?

PETS5  第二课作文题目 (从网上转摘)
Health or Wealth


Which is more important, health or wealth? When given this question, different people

have varied answers. Some insist that health plays a more important role in our life, while

others see more advantages arising from wealth.

The first group of people quote the old saying "Health is above wealth" to prove their

idea. They argue that, on the one hand, a strong person can do almost anything as long as

he/she tries hard. On the other hand, however, rich people will not be able to enjoy the

wealth if their days are numbered.

Moreover,they may think that they can buy everything they like with money.For

example,beautiful clothes,delicious food,large houses and luxury cars can be afforded.

Therfore,their life is quite comfortable.Nowadays,many younggirls marry old rich men

for their money.They belive that they will be happier only with money.However,can they

be really happy?

In contrast, the advocates of wealth have such arguments as follows.in their opinion,

they can do more things includeearning more money with the help of health body.So,

they spend more time doing exercise and enjoying a health diet.Thus,their life is regular and
colouful.Firstly, wealthy people will be able to buy more healthful food. Secondly
, they can
enjoy better facilities to improve their health. Take my neighbor, Lao
Wang, as an example.
He had a heart attack and is in hospital. However, he cannot afford
the expensive operation,
which costs as much as 100,000 yuan. Therefore, he has to lie in
bed hopelessly. If he were
a rich man, his life could be saved.

In short, we cann't draw a conclusion easily that which one is important. For one thing, it

is true that we can do many things when we are very rich, but we can never buy our health

and healthy relationship with others. For another, we can enjoy a more healthy life with

money. Thererore, we should try to strike a balance between them and gain wealth with a

health body.



posted @ 2007-07-03 17:50 afunms 阅读(869) | 评论 (0)编辑 收藏

Studying Abroad or Home

PETS5  第一课作文题目 (从网上转摘)
Whether students should be encouraged to study abroad as early as possible

Nowadays, with the development of science and technology, more and more people want to study abroad.
There are students from colleges and universities, from the middle schools, from the primary schools, and people
 from all walks of life. What difference does it make between studying abroad and studying home ?
Though many students are crazy about going abroad to pursue their higher education, I think studying home is
preferable. For one thing, you don’t have to take foreign language tests such as TOEFL and GRE . This can
save you a tremendous amount of time, money and effort, allowing much of your energy to be devoted to your
academic foals. In addition, if you study home ,you can stay with your family and old friends. Meanwhile , while
studying home ,you can enjoy the kind of intimate friendship and comfortable family atmosphere which you can
only dream of in a foreign university , where you will be accompanied by your own shadow most of the time.
For these reasons, pursuing one’s higher education at home is a more realistic and sensible choice.
In a word, I prefer to study home.

posted @ 2007-07-02 13:41 afunms 阅读(721) | 评论 (0)编辑 收藏

2007读书(5)

对于网管软件开发人员很实用的一本书。

posted @ 2007-07-01 11:42 afunms 阅读(137) | 评论 (0)编辑 收藏

2007读书(4)


进一步了解SNMP。

posted @ 2007-05-18 14:21 afunms 阅读(84) | 评论 (0)编辑 收藏

CDP: Cisco Discovery Protocol

Cisco Discovery Protocol (CDP) is primarily used to obtain protocol addresses of neighboring devices and discover the platform of those devices. CDP can also be used to show information about the interfaces your router uses. CDP is media- and protocol-independent, and runs on all Cisco-manufactured equipment including routers, bridges, access servers, and switches.

Use of SNMP with the CDP Management Information Base (MIB) allows network management applications to learn the device type and the SNMP agent address of neighboring devices, and to send SNMP queries to those devices. Cisco Discovery Protocol uses the CISCO-CDP-MIB.

CDP runs on all media that support Subnetwork Access Protocol (SNAP), including local-area network (LAN), Frame Relay, and Asynchronous Transfer Mode (ATM) physical media. CDP runs over the data link layer only. Therefore, two systems that support different network-layer protocols can learn about each other.

Each device configured for CDP sends periodic messages, known as advertisements, to a multicast address. Each device advertises at least one address at which it can receive SNMP messages. The advertisements also contain time-to-live, or holdtime, information, which indicates the length of time a receiving device should hold CDP information before discarding it. Each device also listens to the periodic CDP messages sent by others in order to learn about neighboring devices and determine when their interfaces to the media go up or down

CDP Version-2 (CDPv2), the most recent release of the protocol, provides more intelligent device tracking features. These features include a reporting mechanism which allows for more rapid error tracking, thereby reducing costly downtime. Reported error messages can be sent to the console or to a logging server, and cover instances of unmatching native VLAN IDs (IEEE 802.1Q) on connecting ports, and unmatching port duplex states between connecting devices.


Protocol Structure - CDP: Cisco DiscoveryProtocol
CDPv2 show commands can provide detailed output on VLAN Trunking Protocol (VTP) management domain and duplex modes of neighbor devices, CDP-related counters, and VLAN IDs of connecting ports. The following table lists the CDP commands:

Command

Purpose

clear cdp counters

Resets the traffic counters to zero.

clear cdp table

Deletes the CDP table of information about neighbors.

show cdp

Displays the interval between transmissions of CDP advertisements, the number of seconds the CDP advertisement is valid for a given port, and the version of the advertisement.

show cdp entryentry-name [protocol| version]

Displays information about a specific neighbor. Display can be limited to protocol or version information.

show cdp interface[type number]

Displays information about interfaces on which CDP is enabled.

show cdp neighbors[type number] [detail]

Displays the type of device that has been discovered, the name of the device, the number and type of the local interface (port), the number of seconds the CDP advertisement is valid for the port, the device type, the device product number, and the port ID. Issuing the detailkeyword displays information on the native VLAN ID, the duplex mode, and the VTP domain name associated with neighbor devices.

show cdp traffic

Displays CDP counters, including the number of packets sent and received and checksum errors.

show debugging

Displays information about the types of debugging that are enabled for your router. See the Cisco IOS Debug Command Reference for more information about CDP debugcommands.


Related Protocols
SNMP , SNAP

posted @ 2007-05-17 11:10 afunms 阅读(307) | 评论 (0)编辑 收藏

report2.0 vs 1.0

     摘要:  从xml就可以看出sourceview2.0 report与1.0 report有很大的区别。 从齐鲁ens到sv1.0,再到现在的sv2.0,我的报表设计越来越成熟,越来越简洁和灵活。 更重要的是,做完sv2.0,我又有了新的想法,我甚至想专门研究BI。我完全有理由相信 到sv3.0时,我的报表模块会更好。 -----SourceView2.0 reports-c...  阅读全文

posted @ 2007-05-16 16:16 afunms 阅读(173) | 评论 (0)编辑 收藏

Builder 4 report

http://www.jdon.com/designpatterns/builder.htm
Builder模式定义
:
将一个复杂对象的构建与它的表示分离,使得同样的构建过程可以创建不同的表示.

Builder模式是一步一步创建一个复杂的对象,它允许用户可以只通过指定复杂对象的类型和内容就可以构建它们.用户不知道内部的具体构建细节.Builder模式是非常类似抽象工厂模式,细微的区别大概只有在反复使用中才能体会到.

为何使用?
是为了将构建复杂对象的过程和它的部件解耦.注意: 是解耦过程部件.

因为一个复杂的对象,不但有很多大量组成部分,如汽车,有很多部件:车轮 方向盘 发动机还有各种小零件等等,部件很多,但远不止这些,如何将这些部件装配成一辆汽车,这个装配过程也很复杂(需要很好的组装技术),Builder模式就是为了将部件和组装过程分开.

如何使用?
首先假设一个复杂对象是由多个部件组成的,Builder模式是把复杂对象的创建和部件的创建分别开来,分别用Builder类和Director类来表示.

首先,需要一个接口,它定义如何创建复杂对象的各个部件:

public interface Builder {

  //创建部件A  比如创建汽车车轮
  void buildPartA();
  //创建部件B 比如创建汽车方向盘
  void buildPartB();
  //创建部件C 比如创建汽车发动机
  void buildPartC();

  //返回最后组装成品结果 (返回最后装配好的汽车)
  //成品的组装过程不在这里进行,而是转移到下面的Director类中进行.
  //从而实现了解耦过程部件
  Product getResult();

}

用Director构建最后的复杂对象,而在上面Builder接口中封装的是如何创建一个个部件(复杂对象是由这些部件组成的),也就是说Director的内容是如何将部件最后组装成成品:

public class Director {

  private Builder builder;

  public Director( Builder builder ) {
    this.builder = builder;
  }
  // 将部件partA partB partC最后组成复杂对象
  //这里是将车轮 方向盘和发动机组装成汽车的过程
  public void construct() {
    builder.buildPartA();
    builder.buildPartB();
    builder.buildPartC();

  }

}

Builder的具体实现ConcreteBuilder:
通过具体完成接口Builder来构建或装配产品的部件;
定义并明确它所要创建的是什么具体东西;
提供一个可以重新获取产品的接口:

public class ConcreteBuilder implements Builder {

  Part partA, partB, partC;
  public void buildPartA() {
    //这里是具体如何构建partA的代码

  };
  public void buildPartB() {
    //这里是具体如何构建partB的代码
  };
   public void buildPartC() {
    //这里是具体如何构建partB的代码
  };
   public Product getResult() {
    //返回最后组装成品结果
  };

}

复杂对象:产品Product:

public interface Product { }

复杂对象的部件:

public interface Part { }


我们看看如何调用Builder模式:
ConcreteBuilder builder = new ConcreteBuilder();
Director director = new Director( builder );

director.construct();
Product product = builder.getResult();


突然意识到,其实用builder pattern来创建报表是最好的选择。

posted @ 2007-05-15 21:40 afunms 阅读(81) | 评论 (0)编辑 收藏

仅列出标题
共25页: First 上一页 17 18 19 20 21 22 23 24 25 下一页 

My Links

News

留言簿(18)

随笔档案

相册

搜索

最新评论

阅读排行榜