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:
Bill(Shuzhou) Liu
2020-04-08 08:47:29 -04:00
gecommit door Chris Freehill
bovenliggende 16bce67835
commit a547dc7efd
26 gewijzigde bestanden met toevoegingen van 805 en 102 verwijderingen
@@ -62,19 +62,16 @@ rdc_status_t RdcStandaloneHandler::error_handle(::grpc::Status status,
// JOB RdcAPI
rdc_status_t RdcStandaloneHandler::rdc_job_start_stats(rdc_gpu_group_t groupId,
char job_id[64], uint64_t update_freq, double max_keep_age,
uint32_t max_keep_samples) {
char job_id[64], uint64_t update_freq) {
// TODO(bill_liu): implement
(void)(groupId);
(void)(job_id);
(void)(update_freq);
(void)(max_keep_age);
(void)(max_keep_samples);
return RDC_ST_OK;
}
rdc_status_t RdcStandaloneHandler::rdc_job_get_stats(char job_id[64],
rdc_status_t RdcStandaloneHandler::rdc_job_get_stats(char job_id[64],
rdc_job_info_t* p_job_info) {
// TODO(bill_liu): implement
(void)(job_id);
@@ -82,13 +79,25 @@ rdc_status_t RdcStandaloneHandler::rdc_job_get_stats(char job_id[64],
return RDC_ST_OK;
}
rdc_status_t RdcStandaloneHandler::rdc_job_stop_stats(char job_id[64] ) {
rdc_status_t RdcStandaloneHandler::rdc_job_stop_stats(char job_id[64]) {
// TODO(bill_liu): implement
(void)(job_id);
return RDC_ST_OK;
}
rdc_status_t RdcStandaloneHandler::rdc_job_remove(char job_id[64]) {
// TODO(bill_liu): implement
(void)(job_id);
return RDC_ST_OK;
}
rdc_status_t RdcStandaloneHandler::rdc_job_remove_all() {
// TODO(bill_liu): implement
return RDC_ST_OK;
}
// Discovery RdcAPI
rdc_status_t RdcStandaloneHandler::rdc_device_get_all(
uint32_t gpu_index_list[RDC_MAX_NUM_DEVICES], uint32_t* count) {