com.bigdata.counters.linux
Class SarCpuUtilizationCollector

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

public class SarCpuUtilizationCollector
extends AbstractProcessCollector
implements ICounterHierarchy, IRequiredHostCounters, IHostCounters

Collects statistics on the CPU utilization for the entire host using sar -u.

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

Field Summary
 
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
SarCpuUtilizationCollector(int interval, KernelVersion kernelVersion)
           
 
Method Summary
 List<String> getCommand()
           
 CounterSet getCounters()
          Declares the counters that we will collect using sar.
 AbstractProcessReader getProcessReader()
           
protected  void setEnvironment(Map<String,String> env)
          Extended to force sar to use a consistent timestamp format regardless of locale by setting S_TIME_FORMAT="ISO" in the environment.
 
Methods inherited from class com.bigdata.counters.AbstractProcessCollector
getInterval, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SarCpuUtilizationCollector

public SarCpuUtilizationCollector(int interval,
                                  KernelVersion kernelVersion)
Parameters:
interval - The reporting interval in seconds.
kernelVersion -
Method Detail

getCommand

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

getCounters

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

Specified by:
getCounters in interface IStatisticsCollector

setEnvironment

protected void setEnvironment(Map<String,String> env)
Extended to force sar to use a consistent timestamp format regardless of locale by setting S_TIME_FORMAT="ISO" in the environment.

Overrides:
setEnvironment in class AbstractProcessCollector

getProcessReader

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


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