Showing posts from August, 2013

[BPDU] To understand BPDU Filtering an BPDU Guard

Quote from

Understanding BPDU Guard
The BPDU guard feature can be globally enabled on the switch or can be enabled per port, but the feature operates with some differences.
At the global level, you enable BPDU guard on Port Fast-enabled ports by using the spanning-tree portfast bpduguard default global configuration command. Spanning tree shuts down ports that are in a Port Fast-operational state if any BPDU is received on them. In a valid configuration, Port Fast-enabled ports do not receive BPDUs. Receiving a BPDU on a Port Fast-enabled port means an invalid configuration, such as the connection of an unauthorized device, and the BPDU guard feature puts the port in the error-disabled state. When this happens, the switch shuts down the entire port on which the violation occurred.
To prevent the port from shutting down, you can use the errdisa…

[Google Chart] Some examples of using Google Chart API in Python

Here are some example codes of using Google Chart APIs written in Python that I wrote several years ago. And some output image for reference.

To generate multi-line chart: def createMultiLineChart(rows, max_value):
urls = "" + \
"chs=" + str(300+24*rows.__len__()) + "x200" + \
"&chd=t:" + ",".join([str(i[1]) for i in rows]) + "|" + ",".join([str(i[2]) for i in rows]) + \
"&cht=lc" + \
"&chls=2,1,0|2,1,0" + \
"&chco=0000ff,ff0000" + \
"&chtt=SMT%20Scrap%20Rate" + \
"&chxt=x,y" + \
"&chg=20,20" + \
"&chds=0," + str(max_value * 1.4) + \
"&chxl=0:|" + "|".join([str(i[0]) for i in rows]) + "|1:|" + "|".join(
[str(i * max_value * 1.4 / 10.0) + '%' for i in range(0,11)]) + \
"&chdl=Day%20S/R(%)|Night%20S/R(%)" + \

[Linux Command] Redirect stderr to stdout and output to terminal and log into file at the same time

If you want to redirect stderr to stdout, append this at your command: 2>&1 , and also for outputting to terminal and logging into file you should use tee.
Both together would look like this:
$ yourcommand 2>&1 | tee yourlogfile.log

[Floodlight] A simle note from Floodlight dev discussion

For some kind of the reasons, I stopped tracking what's going on Floodlight for a while. I post my previous notes about Floodlight and OpenFlow from Floodlight dev discussion, and hope it is beneficial for those who are still working on it.
Floodlight by default gets full packets from switchOFPT_SET_CONFIG
GreenMST module for FloodlightGreenMST is a module used to build the Minimum Spanning Tree of an OpenFlow network, thus avoiding brodcast storm, using looped topologies with the LearningSwitch module and switches not supporting the Spanning Tree Protocol.
Wildcard Matching on network addressOFMatch mTo = new OFMatch();mTo.fromString("dl_type=0x800,nw_dst=");System.out.println(mTo.toString()); // This prints nw_dst as; //This prints destination mask length as 9But when I do dump-flows in the switch, it doesn't show any mask. It simply gives nw_dst as…

[SPC] SPC Demo

Here is a SPC System Demo Video that is related with the previous article: [SPC] A simple SPC system introduction

Check it out:

[SPC] A simple SPC system introduction

SPC SystemIntroductionStatistic Process Control (SPC) has adopted and widely used in many industries, such as, IC foundry, automobile, and so on. It provides the function to monitor the process(manufacturing) capacity and check if the monitor data violates SPC Rules. The following content explains how we build up the system architecture and what the basic items are inside this system. SPC Chart SettingTable: t1twsql1.mistw.dbo.SPC_CHART_SETTING This table contains all the SPC Chart Setting Data and is critical for message sending and receiving. Column definition: 5 categories(Category1, Category2, Category3, Category4, Category5) are combined with comma, for instance, "T3,37XX,LINEA,N/A,N/A". u_spec_limit: Upper SPEC Limit l_spec_limit: Lower SPEC Limit spc_rules: How many SPC Rules are adopted? For example => 20 + 21 + 2 2 + 23 = 1 + 2 + 4 + 8 = 15 = Rule1 + Rule2 + Rule3 + Rule4 sampling_rule: Only support SamplingRu…