Examples of OFTableStatistics


Examples of org.openflow.protocol.statistics.OFTableStatistics

        }
        List<? extends OFStatistics> stats = statReply.getStatistics();
        // Assume a single table only
        OFStatistics stat = stats.get(0);
        if (stat instanceof OFTableStatistics) {
            OFTableStatistics tableStat = (OFTableStatistics) stat;
            int activeCount = tableStat.getActiveCount();
            int maxEntry = tableStat.getMaximumEntries();
            log.debug("Switch {} active entries {} max entries {}",
                    new Object[] { this.stringId, activeCount, maxEntry});
            int percentFull = activeCount * 100 / maxEntry;
            if (flowTableFull && percentFull < 90) {
                log.info("Switch {} flow table capacity is back to normal",
View Full Code Here

Examples of org.openflow.protocol.statistics.OFTableStatistics

  public static JSONArray toTableStat(List<OFStatistics> ofs){
   
    JSONArray jsonArray = new JSONArray();
    for (OFStatistics ofst : ofs) {

      OFTableStatistics st = (OFTableStatistics) ofst;
      // st.getPortNumber() st.getReceiveBytes();

      FlowscaleController.logger.debug(
          "Maximum Entries {} and and Table id {}",
          st.getMaximumEntries(), st.getTableId());
      FlowscaleController.logger.debug(
          "Name {} and and Table length {}", st.getName(),
          st.getLength());

      JSONObject jsonObject = new JSONObject();
      jsonObject.put("match_count", st.getMatchedCount());
      jsonObject.put("maximum_entries", st.getMaximumEntries());
      jsonObject.put("name", st.getName());
      jsonObject.put("table_id", st.getTableId());
      jsonObject.put("active_count", st.getActiveCount());

      jsonArray.add(jsonObject);

    }
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.