forked from mindspore-Ecosystem/mindspore
!18439 Enhance cache server's log path and spilling path display
Merge pull request !18439 from lixiachen/minor_cache_fix
This commit is contained in:
commit
48e384c5bd
|
@ -494,14 +494,15 @@ Status CacheAdminArgHandler::ShowServerInfo() {
|
|||
int value_w = 50;
|
||||
std::cout << "Cache Server Configuration: " << std::endl;
|
||||
std::cout << std::string(name_w + value_w, '-') << std::endl;
|
||||
std::cout << std::setw(name_w) << "config name" << std::setw(value_w) << "value" << std::endl;
|
||||
std::cout << std::left << std::setw(name_w) << "config name" << std::setw(value_w) << "value" << std::endl;
|
||||
std::cout << std::string(name_w + value_w, '-') << std::endl;
|
||||
std::cout << std::setw(name_w) << "hostname" << std::setw(value_w) << hostname_ << std::endl;
|
||||
std::cout << std::setw(name_w) << "port" << std::setw(value_w) << port_ << std::endl;
|
||||
std::cout << std::setw(name_w) << "number of workers" << std::setw(value_w) << std::to_string(num_workers)
|
||||
std::cout << std::left << std::setw(name_w) << "hostname" << std::setw(value_w) << hostname_ << std::endl;
|
||||
std::cout << std::left << std::setw(name_w) << "port" << std::setw(value_w) << port_ << std::endl;
|
||||
std::cout << std::left << std::setw(name_w) << "number of workers" << std::setw(value_w)
|
||||
<< std::to_string(num_workers) << std::endl;
|
||||
std::cout << std::left << std::setw(name_w) << "log level" << std::setw(value_w) << std::to_string(log_level)
|
||||
<< std::endl;
|
||||
std::cout << std::setw(name_w) << "log level" << std::setw(value_w) << std::to_string(log_level) << std::endl;
|
||||
std::cout << std::setw(name_w) << "spill dir" << std::setw(value_w) << spill_dir << std::endl;
|
||||
std::cout << std::left << std::setw(name_w) << "spill dir" << std::setw(value_w) << spill_dir << std::endl;
|
||||
std::cout << std::string(name_w + value_w, '-') << std::endl;
|
||||
|
||||
std::cout << "Active sessions: " << std::endl;
|
||||
|
|
|
@ -56,7 +56,7 @@ constexpr static uint32_t kDataIsInSharedMemory = 2;
|
|||
/// \brief Size of each message used in message queue.
|
||||
constexpr static int32_t kSharedMessageSize = 2048;
|
||||
/// \brief The default common path for all users
|
||||
const char kDefaultCommonPath[] = "/tmp/mindspore/";
|
||||
const char kDefaultCommonPath[] = "/tmp/mindspore";
|
||||
|
||||
/// \brief State of CacheService at the server.
|
||||
enum class CacheServiceState : int8_t {
|
||||
|
@ -83,7 +83,7 @@ inline std::string DefaultUserDir() {
|
|||
char user[LOGIN_NAME_MAX];
|
||||
int rc = getlogin_r(user, sizeof(user));
|
||||
if (rc == 0) {
|
||||
return kDefaultCommonPath + std::string(user);
|
||||
return kDefaultCommonPath + std::string("/") + std::string(user);
|
||||
} else {
|
||||
return kDefaultCommonPath;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue