Implement the rdc_lib API to support the job stats
Add the function to start and stop the job recording. Add the function to get the job stats for each GPU and summary of multiple GPUs Add the function to remove the jobs. Add a class RdcLogger which can control the log level using the environment variable RDC_LOG. This is similar to GRPC_VERBOSITY gRPC. When the customer has the issues, he can enable the verbose log to help us to troubleshoot the issues. Add the -u support in the rdci group, fieldgroup and dmon for connecting to rdcd without authentication. Change-Id: I22c591823c1ee6485db106b911bed8271d1b2769
This commit is contained in:
committed by
Chris Freehill
parent
16bce67835
commit
a547dc7efd
@@ -58,6 +58,7 @@ void RdciDmonSubSystem::parse_cmd_opts(int argc, char ** argv) {
|
||||
const struct option long_options[] = {
|
||||
{"host", required_argument, nullptr, HOST_OPTIONS },
|
||||
{"help", optional_argument, nullptr, 'h' },
|
||||
{"unauth", optional_argument, nullptr, 'u' },
|
||||
{"list", optional_argument, nullptr, 'l' },
|
||||
{"field-group-id", required_argument, nullptr, 'f' },
|
||||
{"field-id", required_argument, nullptr, 'e' },
|
||||
@@ -73,7 +74,7 @@ void RdciDmonSubSystem::parse_cmd_opts(int argc, char ** argv) {
|
||||
std::string gpu_indexes;
|
||||
std::string field_ids;
|
||||
|
||||
while ((opt = getopt_long(argc, argv, "hlf:g:c:d:e:i:",
|
||||
while ((opt = getopt_long(argc, argv, "hluf:g:c:d:e:i:",
|
||||
long_options, &option_index)) != -1) {
|
||||
switch (opt) {
|
||||
case HOST_OPTIONS:
|
||||
@@ -82,9 +83,12 @@ void RdciDmonSubSystem::parse_cmd_opts(int argc, char ** argv) {
|
||||
case 'h':
|
||||
dmon_ops_ = DMON_HELP;
|
||||
return;
|
||||
case 'u':
|
||||
use_auth_ = false;
|
||||
break;
|
||||
case 'l':
|
||||
dmon_ops_ = DMON_LIST_FIELDS;
|
||||
return;
|
||||
break;
|
||||
case 'f':
|
||||
if (!IsNumber(optarg)) {
|
||||
show_help();
|
||||
@@ -130,6 +134,10 @@ void RdciDmonSubSystem::parse_cmd_opts(int argc, char ** argv) {
|
||||
}
|
||||
}
|
||||
|
||||
if (dmon_ops_ == DMON_LIST_FIELDS) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (options_.find(OPTIONS_FIELD_GROUP_ID) == options_.end()) {
|
||||
if (field_ids == "") {
|
||||
show_help();
|
||||
|
||||
Reference in New Issue
Block a user