Added/tweaked debug messages for stats

This commit is contained in:
Thulinma 2016-06-09 18:42:32 +02:00
parent 54b9079ab1
commit ed982b9eb3
3 changed files with 9 additions and 5 deletions

View file

@ -1105,6 +1105,7 @@ namespace IPC {
if (hasCounter) {
myPage.mapped[offset] = 1;
*((uint32_t *)(myPage.mapped + 1 + offset + len - 4)) = getpid();
HIGH_MSG("sharedClient received ID %d", offsetOnPage/(payLen+1));
}
break;
}
@ -1127,8 +1128,6 @@ namespace IPC {
///\brief The deconstructor
sharedClient::~sharedClient() {
mySemaphore.close();
}
///\brief Writes data to the shared data
@ -1151,6 +1150,7 @@ namespace IPC {
if (myPage.mapped) {
semGuard tmpGuard(&mySemaphore);
myPage.mapped[offsetOnPage] = 126;
HIGH_MSG("sharedClient finished ID %d", offsetOnPage/(payLen+1));
}
}

View file

@ -274,8 +274,12 @@ void Controller::statSession::update(unsigned long index, IPC::statExchange & da
}
long long currDown = getDown();
long long currUp = getUp();
if (currUp - prevUp < 0 || currDown-prevDown < 0){
ERROR_MSG("Negative data usage! %lldu/%lldd (u%lld->%lld) in %s over %s, #%lu", currUp-prevUp, currDown-prevDown, prevUp, currUp, data.streamName().c_str(), data.connector().c_str(), index);
}else{
servUpBytes += currUp - prevUp;
servDownBytes += currDown - prevDown;
}
if (currDown + currUp > COUNTABLE_BYTES){
std::string streamName = data.streamName();
if (prevUp + prevDown < COUNTABLE_BYTES){

View file

@ -1300,7 +1300,7 @@ namespace Mist {
if (now == lastStats && !force){return;}
lastStats = now;
EXTREME_MSG("Writing stats: %s, %s, %lu", getConnectedHost().c_str(), streamName.c_str(), crc & 0xFFFFFFFFu);
HIGH_MSG("Writing stats: %s, %s, %lu, %llu, %llu", getConnectedHost().c_str(), streamName.c_str(), crc & 0xFFFFFFFFu, myConn.dataUp(), myConn.dataDown());
if (statsPage.getData()){
/*LTS-START*/
if (!statsPage.isAlive()){