rem This script illustrates the Monitor Admin service v1.0 (R4 chapter 109) rem (c) Apache Felix Project Team, 2006-2008 rem start the "run" command shell.scriptcmd.jar to run this script obr list-url obr remove-url file:///C:/Docume~1/Donsez/.m2/repository/repository.xml obr add-url file:///C:/Docume~1/Donsez/.m2/repository/repository.xml rem change the username in the following command line rem cd file:///C:/Docume~1/${username}/.m2/repository/org/apache/felix/ cd file:///C:/Docume~1/Donsez/.m2/repository/org/apache/felix/ obr list Monitor obr start "Apache Felix MonitorAdmin" rem obr start "Apache Felix EventAdmin" start org.apache.felix.eventadmin\1.0.1-SNAPSHOT\org.apache.felix.eventadmin-1.0.1-SNAPSHOT.jar obr start "Apache Felix EventAdmin Command" rem handlers for standard events eventadmin subscribe org/osgi/service/monitor obr start "Apache Felix Monitor Admin Command" obr start "Apache Felix Monitor Admin Sample : Memory Monitor" obr start "Apache Felix Monitor Admin Sample : Memory Monitor Job" obr start "Apache Felix Monitor Admin Sample : OS Memory and CPU Monitors" monitorjob help monitorjob variables monitorjob start java.lang.runtime/memory.free 5 10 monitorjob start java.lang.runtime/memory.total 5 10 monitorjob start monitoradmin.os.linux/memory.free 5 10 monitorjob jobs eventadmin list wait 60 monitorjob discard java.lang.runtime/memory.free monitorjob start java.lang.runtime/memory.free 5