public synchronized void stop() { log.debug("Stopping Table Stats collection thread for {}", sw.getStringId()); task.cancel(); task = null; }
public synchronized void stop() { log.debug("Stopping Stats collection thread for {}", sw.getStringId()); task.cancel(); task = null; }
/** * Stops the collector. */ public void stop() { log.info("Stopping Group Stats collection thread for {}", sw.getStringId()); this.stopTimer = true; timeout.cancel(); } }
/** * Starts the collector. */ public synchronized void start() { log.info("Starting Port Stats collection thread for {}", sw.getStringId()); stopped = false; timeout = timer.newTimeout(this, 1, TimeUnit.SECONDS); }
/** * Starts the collector. */ public void start() { log.info("Starting Group Stats collection thread for {}", sw.getStringId()); timeout = timer.newTimeout(this, 1, TimeUnit.SECONDS); }
/** * Stops the collector. */ public synchronized void stop() { log.info("Stopping Port Stats collection thread for {}", sw.getStringId()); stopped = true; timeout.cancel(); } }
@Override public void run() { if (sw.getRole() == RoleState.MASTER) { log.trace("LongFlowsTask Collecting AdaptiveStats for {}", sw.getStringId()); // skip collecting because CalAndShortFlowsTask collects entire flow stats from a given switch sw if (callCountLongFlowsTask == ENTIRE_POLL_TIMES) { callCountLongFlowsTask = LONG_POLL_TIMES; } else { longFlowsTaskInternal(); callCountLongFlowsTask += LONG_POLL_TIMES; } } } }
@Override public void run() { if (sw.getRole() == RoleState.MASTER) { log.trace("MidFlowsTask Collecting AdaptiveStats for {}", sw.getStringId()); // skip collecting because CalAndShortFlowsTask collects entire flow stats from a given switch sw if (callCountMidFlowsTask == ENTIRE_POLL_TIMES) { callCountMidFlowsTask = MID_POLL_TIMES; } else { midFlowsTaskInternal(); callCountMidFlowsTask += MID_POLL_TIMES; } } } }
/** * Stops adaptive flow statistic collection. */ public synchronized void stop() { log.debug("Stopping AdaptiveStats collection thread for {}", sw.getStringId()); if (calAndShortFlowsThread != null) { calAndShortFlowsThread.cancel(true); } if (midFlowsThread != null) { midFlowsThread.cancel(true); } if (longFlowsThread != null) { longFlowsThread.cancel(true); } adaptiveFlowStatsScheduler.shutdownNow(); isFirstTimeStart = false; log.info("Stopped"); }
@Override public void run(Timeout timeout) throws Exception { log.trace("Collecting stats for {}", sw.getStringId()); sendGroupStatistic(); if (!this.stopTimer) { log.trace("Scheduling stats collection in {} seconds for {}", this.refreshInterval, this.sw.getStringId()); timeout.getTimer().newTimeout(this, refreshInterval, TimeUnit.SECONDS); } }
public synchronized void start() { // Initially start polling quickly. Then drop down to configured value log.debug("Starting Stats collection thread for {}", sw.getStringId()); task = new InternalTimerTask(); SharedExecutors.getTimer().scheduleAtFixedRate(task, 1 * SECONDS, pollInterval * SECONDS); }
public synchronized void start() { // Initially start polling quickly. Then drop down to configured value log.debug("Starting Table Stats collection thread for {}", sw.getStringId()); task = new InternalTimerTask(); SharedExecutors.getTimer().scheduleAtFixedRate(task, 1 * SECONDS, pollInterval * SECONDS); }
@Override public void run(Timeout to) throws Exception { if (stopped || timeout.isCancelled()) { return; } log.trace("Collecting stats for {}", sw.getStringId()); sendPortStatistic(); if (!stopped && !timeout.isCancelled()) { log.trace("Scheduling stats collection in {} seconds for {}", this.refreshInterval, this.sw.getStringId()); timeout.getTimer().newTimeout(this, refreshInterval, TimeUnit.SECONDS); } }
private void connectInitialDevices() { for (OpenFlowSwitch sw: controller.getSwitches()) { try { listener.switchAdded(new Dpid(sw.getId())); } catch (Exception e) { log.warn("Failed initially adding {} : {}", sw.getStringId(), e.getMessage()); log.debug("Error details:", e); } } }
/** * Adds the typed flow entry into table, and calculates and set the flow live type, * and then add it into a corresponding typed flow table. * * @param rule the flow rule */ public synchronized void addWithCalAndSetFlowLiveType(TypedStoredFlowEntry rule) { checkNotNull(rule); //rule have to be new DefaultTypedFlowEntry boolean result = getFlowEntriesInternal(rule.id()).add(rule); if (result) { calAndSetFlowLiveTypeInternal(rule); addWithSetFlowLiveTypeCount++; } else { if (log.isDebugEnabled()) { log.debug("FlowId {} ADD failed, it may already exist in table - {}", rule.id(), sw.getStringId()); } } }
@Override public void run() { if (sw.getRole() == RoleState.MASTER) { log.trace("Collecting stats for {}", sw.getStringId()); OFTableStatsRequest request = sw.factory().buildTableStatsRequest() .build(); sw.sendMsg(request); } } }
private void connectInitialDevices() { for (OpenFlowSwitch sw : controller.getSwitches()) { try { listener.switchAdded(new Dpid(sw.getId())); } catch (Exception e) { LOG.warn("Failed initially adding {} : {}", sw.getStringId(), e.getMessage()); LOG.debug("Error details:", e); // disconnect to trigger switch-add later sw.disconnectSwitch(); } PortStatsCollector psc = new PortStatsCollector(sw, portStatsPollFrequency); psc.start(); collectors.put(new Dpid(sw.getId()), psc); } }
@Override public void run() { if (sw.getRole() == RoleState.MASTER) { log.trace("Collecting stats for {}", sw.getStringId()); OFFlowStatsRequest request = sw.factory().buildFlowStatsRequest() .setMatch(sw.factory().matchWildcardAll()) .setTableId(TableId.ALL) .setOutPort(OFPort.NO_MASK) .build(); sw.sendMsg(request); } } }
private void ofFlowStatsRequestAllSend() { OFFlowStatsRequest request = sw.factory().buildFlowStatsRequest() .setMatch(sw.factory().matchWildcardAll()) .setTableId(TableId.ALL) .setOutPort(OFPort.NO_MASK) .build(); synchronized (this) { // set the request xid to check the reply in OpenFlowRuleProvider // After processing the reply of this request message, // this must be set to NO_FLOW_MISSING_XID(-1) by provider setFlowMissingXid(request.getXid()); log.debug("ofFlowStatsRequestAllSend: request={}, dpid={}", request.toString(), sw.getStringId()); sw.sendMsg(request); } }
private void sendGroupStatistic() { if (log.isTraceEnabled()) { log.trace("sendGroupStatistics {}:{}", sw.getStringId(), sw.getRole()); } if (sw.getRole() != RoleState.MASTER) { return; } Long statsXid = OpenFlowGroupProvider.getXidAndAdd(2); OFGroupStatsRequest statsRequest = sw.factory().buildGroupStatsRequest() .setGroup(OFGroup.ALL) .setXid(statsXid) .build(); sw.sendMsg(statsRequest); Long descXid = statsXid + 1; OFGroupDescStatsRequest descStatsRequest = sw.factory().buildGroupDescStatsRequest() .setXid(descXid) .build(); sw.sendMsg(descStatsRequest); }