Package org.alfresco.heartbeat
Class SystemUsageDataCollector
- java.lang.Object
-
- org.alfresco.heartbeat.HBBaseDataCollector
-
- org.alfresco.heartbeat.SystemUsageDataCollector
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
public class SystemUsageDataCollector extends HBBaseDataCollector implements org.springframework.beans.factory.InitializingBean
A collector of data related theRuntimedata of the system. Every Java application has a single instance of classRuntimethat allows the application to interface with the environment in which the application is running.- Collector ID: acs.repository.usage.system
- Data:
- mem: Object which contains memory information:
- free: Long - The amount of free memory in the Java Virtual Machine.
Runtime.freeMemory() - max: Long -T he maximum amount of memory that the Java virtual machine will
attempt to use.
Runtime.maxMemory() - total: Long - The total amount of memory in the Java virtual machine.
Runtime.totalMemory()
- free: Long - The amount of free memory in the Java Virtual Machine.
- openFileDescriptorCount: Long - The number of open file descriptors.
UnixOperatingSystemMXBean.getOpenFileDescriptorCount() - cpu: Object which contains processor information:
- percentageProcessLoad: Integer - The "recent cpu usage" for the JVM process (as a percentage).
OperatingSystemMXBean.getProcessCpuLoad() - percentageSystemLoad: Integer - The "recent cpu usage" for the whole system (as a percentage).
OperatingSystemMXBean.getSystemCpuLoad() - systemLoadAverage: Double - The system load average as returned by
OperatingSystemMXBean.getSystemLoadAverage() - availableProcessors: Integer - The number of available processors.
Runtime.availableProcessors()
- percentageProcessLoad: Integer - The "recent cpu usage" for the JVM process (as a percentage).
- db: Object which contains database usage information:
- idleConnections: Integer - The number of idle connections.
BasicDataSource.getNumIdle() - activeConnections: Integer - The number of active connections.
BasicDataSource.getNumActive()
- idleConnections: Integer - The number of idle connections.
- mem: Object which contains memory information:
- Author:
- eknizat
-
-
Constructor Summary
Constructors Constructor Description SystemUsageDataCollector(java.lang.String collectorId, java.lang.String collectorVersion, java.lang.String cronExpression, HeartBeatJobScheduler hbJobScheduler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()java.util.List<org.alfresco.heartbeat.datasender.HBData>collectData()This method returns data to be collected.voidsetCurrentRepoDescriptorDAO(DescriptorDAO currentRepoDescriptorDAO)voidsetDataSource(javax.sql.DataSource dataSource)-
Methods inherited from class org.alfresco.heartbeat.HBBaseDataCollector
deregister, getCollectorId, getCollectorVersion, getCronExpression, getHbJobScheduler, register, setHbDataCollectorService, setHbJobScheduler
-
-
-
-
Constructor Detail
-
SystemUsageDataCollector
public SystemUsageDataCollector(java.lang.String collectorId, java.lang.String collectorVersion, java.lang.String cronExpression, HeartBeatJobScheduler hbJobScheduler)
-
-
Method Detail
-
setCurrentRepoDescriptorDAO
public void setCurrentRepoDescriptorDAO(DescriptorDAO currentRepoDescriptorDAO)
-
setDataSource
public void setDataSource(javax.sql.DataSource dataSource)
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
java.lang.Exception
-
collectData
public java.util.List<org.alfresco.heartbeat.datasender.HBData> collectData()
Description copied from class:HBBaseDataCollectorThis method returns data to be collected.- Specified by:
collectDatain classHBBaseDataCollector- Returns:
- List of
HBData
-
-