com.bigdata.counters.linux
Class VMStatCollector

java.lang.Object
  extended by com.bigdata.counters.AbstractProcessCollector
      extended by com.bigdata.counters.linux.VMStatCollector
All Implemented Interfaces:
ICounterHierarchy, IHostCounters, IRequiredHostCounters, IStatisticsCollector

public class VMStatCollector
extends AbstractProcessCollector
implements ICounterHierarchy, IRequiredHostCounters, IHostCounters

Collects some counters using vmstat.

Version:
$Id: VMStatCollector.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Field Summary
protected  boolean cpuStats
          true iff you want collect the user time, system time, and IO WAIT time using vmstat (as opposed to sar).
protected static Pattern pattern
          The Pattern used to split apart the rows read from vmstat.
 
Fields inherited from class com.bigdata.counters.AbstractProcessCollector
activeProcess, log
 
Fields inherited from interface com.bigdata.counters.IHostCounters
CPU_PercentIOWait, CPU_PercentSystemTime, CPU_PercentUserTime, Info_NumProcessors, Info_ProcessorInfo, Memory_Bytes_Available, Memory_Bytes_Free, Memory_MinorFaultsPerSec, Memory_SwapBytesAvailable, Memory_SwapBytesUsed, PhysicalDisk_ReadsPerSec, PhysicalDisk_WritesPerSec
 
Fields inherited from interface com.bigdata.counters.IRequiredHostCounters
CPU_PercentProcessorTime, Info_Architecture, Info_OperatingSystemName, Info_OperatingSystemVersion, LogicalDisk_PercentFreeSpace, Memory_majorFaultsPerSecond, PhysicalDisk_BytesReadPerSec, PhysicalDisk_BytesWrittenPerSec
 
Fields inherited from interface com.bigdata.counters.ICounterHierarchy
CPU, Info, LogicalDisk, Memory, Memory_GarbageCollectors, PhysicalDisk, ps
 
Constructor Summary
VMStatCollector(int interval, boolean cpuStats)
           
 
Method Summary
 List<String> getCommand()
           
 CounterSet getCounters()
          Declares the counters that we will collect
 AbstractProcessReader getProcessReader()
           
 
Methods inherited from class com.bigdata.counters.AbstractProcessCollector
getInterval, setEnvironment, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cpuStats

protected final boolean cpuStats
true iff you want collect the user time, system time, and IO WAIT time using vmstat (as opposed to sar).


pattern

protected static final Pattern pattern
The Pattern used to split apart the rows read from vmstat.

Constructor Detail

VMStatCollector

public VMStatCollector(int interval,
                       boolean cpuStats)
Parameters:
interval - The interval for the collected statistics.
cpuStats - true iff you want collect the user time, system time, and IO WAIT time using vmstat (as opposed to sar).
Method Detail

getCommand

public List<String> getCommand()
Specified by:
getCommand in class AbstractProcessCollector

getCounters

public CounterSet getCounters()
Declares the counters that we will collect

Specified by:
getCounters in interface IStatisticsCollector

getProcessReader

public AbstractProcessReader getProcessReader()
Specified by:
getProcessReader in class AbstractProcessCollector


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.