1. System requirement
Update gcc to 4.1.1, and make sure libxml and libbz2 are installed. BGPMon uses packed structures for all the source file except XMLUtil.c which works together libxml. The reason is that the libxml cannot work with the compile option'-fpack-struct in a 64bit machine.
2.Download
Download the BGPMon source package here.
3. Compile
You can extract the downloaded BGPMon source package to anywhere you like. Then go to the directory you just extracted the package.
> cd <some-directory-of-you-extract-package>
> make clean
> make
"make clean" is used to clean all existing object files. "make" compiles bgpmon and bgpmonclient. bgpmonclient is a sample
client.
4. Run
4-1. Start the bgpmon
> cd <some-directory-of-you-extract-package>
> bgpmon -f config.xml -d
Before start the bgpmon, please create your own config.xml at first. You can create your own config.xml based on bgpmon_sample_conf.xml.
'-d' is a optional parameter. It means all the debug info output to screen. Otherwise all the debug info will be outputed to system log. Then you can check the two folders which are specified in config.xml.
4-2. Start the bgpmonclinent in order to the bgpmon is working.
> cd <some-directory-of-you-extract-package>
> bgpmonclient bgpmon-ip bgpmon-port request_type
Notes:
bgpmon-ip = ip address of the running bgpmon
bgpmon-port = port number for the running bgpmon
request_type = summary, message, table
*summary is not implemented yet.
*table needs the 2 following parameters:
peer-ip = ip address of a bgp peer monitored by bgpmon
peer-as = as number of the bgp peer
5. Build your own client
If you want to build you own client, you can built it based on the sample client ' bgpmonclinent'. Please remember that you are monitoring a real-time
stream and need to process it in real-time! Slow clients will be terminated! The requests are sent to the bgpmon in XML
format. For the details of request format, refer to the BGPMon XML interface.
|