task counter added

This commit is contained in:
2020-11-14 21:32:21 +01:00
parent e20abb0e61
commit e79cc5f54d
2 changed files with 3 additions and 3 deletions

View File

@ -40,8 +40,8 @@ static void mqttStatusPublisher(void *handle) {
logMsg("mqsp: publishing status");
t_mbusCommStats *mbusCommStats = mbusCommGetStats();
char buf[64];
snprintf(buf, 64, "{\"uptime\":\"%ld\", \"requests\":\"%d\", \"errors\":\"%d\"}",
HAL_GetTick()/1000, mbusCommStats->requestCnt, mbusCommStats->errorCnt);
snprintf(buf, 64, "{\"uptime\":\"%ld\", \"tasks\":\"%d\", \"requests\":\"%d\", \"errors\":\"%d\"}",
HAL_GetTick()/1000, schTaskCnt(), mbusCommStats->requestCnt, mbusCommStats->errorCnt);
bool res = publish(&mqttClient, StatusTopic, (const char*)buf, strlen(buf), false);
coloredMsg(LOG_YELLOW, "mqch, publish returned %d", res);