Added/tweaked debug messages for stats
This commit is contained in:
parent
54b9079ab1
commit
ed982b9eb3
3 changed files with 9 additions and 5 deletions
|
@ -1105,6 +1105,7 @@ namespace IPC {
|
||||||
if (hasCounter) {
|
if (hasCounter) {
|
||||||
myPage.mapped[offset] = 1;
|
myPage.mapped[offset] = 1;
|
||||||
*((uint32_t *)(myPage.mapped + 1 + offset + len - 4)) = getpid();
|
*((uint32_t *)(myPage.mapped + 1 + offset + len - 4)) = getpid();
|
||||||
|
HIGH_MSG("sharedClient received ID %d", offsetOnPage/(payLen+1));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1127,8 +1128,6 @@ namespace IPC {
|
||||||
///\brief The deconstructor
|
///\brief The deconstructor
|
||||||
sharedClient::~sharedClient() {
|
sharedClient::~sharedClient() {
|
||||||
mySemaphore.close();
|
mySemaphore.close();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///\brief Writes data to the shared data
|
///\brief Writes data to the shared data
|
||||||
|
@ -1151,6 +1150,7 @@ namespace IPC {
|
||||||
if (myPage.mapped) {
|
if (myPage.mapped) {
|
||||||
semGuard tmpGuard(&mySemaphore);
|
semGuard tmpGuard(&mySemaphore);
|
||||||
myPage.mapped[offsetOnPage] = 126;
|
myPage.mapped[offsetOnPage] = 126;
|
||||||
|
HIGH_MSG("sharedClient finished ID %d", offsetOnPage/(payLen+1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -274,8 +274,12 @@ void Controller::statSession::update(unsigned long index, IPC::statExchange & da
|
||||||
}
|
}
|
||||||
long long currDown = getDown();
|
long long currDown = getDown();
|
||||||
long long currUp = getUp();
|
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;
|
servUpBytes += currUp - prevUp;
|
||||||
servDownBytes += currDown - prevDown;
|
servDownBytes += currDown - prevDown;
|
||||||
|
}
|
||||||
if (currDown + currUp > COUNTABLE_BYTES){
|
if (currDown + currUp > COUNTABLE_BYTES){
|
||||||
std::string streamName = data.streamName();
|
std::string streamName = data.streamName();
|
||||||
if (prevUp + prevDown < COUNTABLE_BYTES){
|
if (prevUp + prevDown < COUNTABLE_BYTES){
|
||||||
|
|
|
@ -1300,7 +1300,7 @@ namespace Mist {
|
||||||
if (now == lastStats && !force){return;}
|
if (now == lastStats && !force){return;}
|
||||||
lastStats = now;
|
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()){
|
if (statsPage.getData()){
|
||||||
/*LTS-START*/
|
/*LTS-START*/
|
||||||
if (!statsPage.isAlive()){
|
if (!statsPage.isAlive()){
|
||||||
|
|
Loading…
Add table
Reference in a new issue