Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support health check when DCGM_INT64_BLANK found #328

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions dynolog/src/ServiceHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
namespace dynolog {

int ServiceHandler::getStatus() {
if (dcgm_) {
return dcgm_->getRpcStatus();
}
return 1;
}

Expand Down
1 change: 1 addition & 0 deletions dynolog/src/gpumon/DcgmGroupInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ void DcgmGroupInfo::update() {
}
}
metricsInt["dcgm_error"] = blank_value_field ? 1 : 0;
rpcStatus_ = blank_value_field ? 0 : 1;
metricsMapDouble_[entity.m_entityId] = metricsDouble;
metricsMapInt_[entity.m_entityId] = metricsInt;
}
Expand Down
4 changes: 4 additions & 0 deletions dynolog/src/gpumon/DcgmGroupInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ class DcgmGroupInfo {
void log(Logger& logger);
bool pauseProfiling(int duration_s);
bool resumeProfiling();
int getRpcStatus() const {
return rpcStatus_;
}

private:
DcgmGroupInfo(
Expand All @@ -49,6 +52,7 @@ class DcgmGroupInfo {
void watchProfFields(const std::vector<unsigned short>& prof_fields);

std::vector<unsigned int> gpuIdList_;
int rpcStatus_ = 1; // Default to 1, will be set to 0 when DCGM_INT64_BLANK is detected
int deviceCount_ = 0;
bool profEnabled_ = false;
int updateIntervalMs_;
Expand Down