Have a look at the IOMedia object for each type of client this does provide the information you need.
A quick off the top of my head piece of code
IVHost ThisVHostIns = VHostSingleton.getInstance("_defaultVHost_");
IApplication ThisApp = ThisVHostIns.getApplication("myapplicationname");
// Warning you should iterate across Application Instances here not just
// _definst_, however this is just a framework example
IApplicationInstance ThisAppIns = ThisApp.getAppInstance("_definst_");
List<IClient> RTMPClients = ThisAppIns.getClients();
// Example only for RTMPClients
double rateOutAvg = 0;
double rateInAvg = 0;
Iterator<IClient> ClientIter = RTMPClients.iterator ( ) ;
while ( ClientIter.hasNext() )
{
try {
IClilent ThisClient = ClientIter.next();
if ( ThisClient == null )
continue;
IOPerformanceCounter Test = ThisClient.getMediaIOPerformanceCounter();
long ByteRateOut = Test.getMessagesOutBytes();
long ByteRateIn = Test.getMessagesInBytes();
double SecondsConnected = ThisClient.getTimeRunningSeconds();
rateOutAvg += ByteRateOut/SecondsConnected;
rateInAvg += ByteRateIn/SecondsConnected;
}
// Bitrate for RTMP clients average is
getLogger().info("Output rate is "+rateOutAvg);
getLogger().info("Input rate is "+rateInAvg);
you will need to do the HTTP and RTP clients as the above only shows RTMP being run through and calculated.
If you want it periodically then you would need to set up a work thread to run through this at set time intervals.
Shamrock