2006 Dec 19 - Tue
Cisco Syslog Additions
I have once again updated ciscowatcher.pl.
A couple of primary additions:
- Additional events are processed
- Email messages can be sent as alerts based upon nature of event
Some of the events processed include:
- '%ISDN-6-CONNECT'
- '%ISDN-6-DISCONNECT'
- '%VOIPAAA-5-VOIP_CALL_HISTORY'
- '%SEC-6-IPACCESSLOGDP'
- '%SEC-CLUSTER_MEMBER_1-6-IPACCESSLOGDP'
- '%SEC-6-IPACCESSLOGP'
- '%SEC-CLUSTER_MEMBER_1-6-IPACCESSLOGP'
- '%OSPF-5-ADJCHG'
- '%SYS-5-CONFIG_I'
- '%LINK-5-CHANGED'
- '%LINEPROTO-5-UPDOWN'
- '%LINK-3-UPDOWN'
- '%LINEPROTO-CLUSTER_MEMBER_1-5-UPDOWN'
- '%LINK-CLUSTER_MEMBER_1-3-UPDOWN'
- '%CRYPTO-4-PKT_REPLAY_ERR'
- '%SYS-6-CLOCKUPDATE'
- '%DOT11-6-ASSOC'
- '%DOT11-6-DISASSOC'
- '%DOT11-7-AUTH_FAILED'
- '%DOT11-6-ROAMED'
The email module example shows the the script sending email to the default service on the
same machine. By simply changing the mail accounts and server id's, email can be sent to
any SMTP capable server for distribution.
This script is configured to send notifications and save the results in a database
anytime an OSPF link changes state.
[/OpenSource/Debian/Monitoring]
permanent link
Volume At Price
It is said that, through the course of the day, trading trends will revert to the level
of highest volume.
The software at Ensign Software has a feature
which will chart a nice bar graph of the volume-at-price distribution for visual traders.
However, for a quick and dirty indicator at a single level only, fit for automated
trading, I wrote the following small class:
public class VolumeAtPrice {
SortedList slVolumeAtPrice;
public int LargestVolume = 0;
public double PriceAtLargestVolume = 0;
public VolumeAtPrice() {
slVolumeAtPrice = new SortedList( 400 );
}
public void Add( Trade trade ) {
if ( slVolumeAtPrice.ContainsKey( trade.Price ) ) {
int ix = slVolumeAtPrice.IndexOfKey( trade.Price );
int volume = (int) slVolumeAtPrice.GetByIndex( ix );
volume += trade.Size;
slVolumeAtPrice.SetByIndex( ix, volume );
if ( volume > LargestVolume ) {
LargestVolume = volume;
PriceAtLargestVolume = trade.Price;
}
}
else {
slVolumeAtPrice.Add( trade.Price, trade.Size );
if ( trade.Size > LargestVolume ) {
LargestVolume = trade.Size;
PriceAtLargestVolume = trade.Price;
}
}
}
}
After updating with the latest Trade, examine PriceAtLargestVolume to see where the
current highest volume trading level occurs.
[/Trading/SmartQuant/Articles]
permanent link
|