aboutsummaryrefslogtreecommitdiff
path: root/src/daemon
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/command_line_args.h4
-rw-r--r--src/daemon/main.cpp9
-rw-r--r--src/daemon/rpc_command_executor.cpp13
3 files changed, 11 insertions, 15 deletions
diff --git a/src/daemon/command_line_args.h b/src/daemon/command_line_args.h
index 506d75490..44505eb8f 100644
--- a/src/daemon/command_line_args.h
+++ b/src/daemon/command_line_args.h
@@ -86,10 +86,6 @@ namespace daemon_args
"daemon_command"
, "Hidden"
};
- const command_line::arg_descriptor<bool> arg_os_version = {
- "os-version"
- , "OS for which this executable was compiled"
- };
const command_line::arg_descriptor<unsigned> arg_max_concurrency = {
"max-concurrency"
, "Max number of threads to use for a parallel job"
diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp
index 23c313c9d..e2ff27daa 100644
--- a/src/daemon/main.cpp
+++ b/src/daemon/main.cpp
@@ -143,7 +143,6 @@ int main(int argc, char const * argv[])
command_line::add_arg(visible_options, command_line::arg_help);
command_line::add_arg(visible_options, command_line::arg_version);
- command_line::add_arg(visible_options, daemon_args::arg_os_version);
command_line::add_arg(visible_options, daemon_args::arg_config_file);
// Settings
@@ -159,6 +158,7 @@ int main(int argc, char const * argv[])
command_line::add_arg(core_settings, daemon_args::arg_zmq_rpc_bind_port);
command_line::add_arg(core_settings, daemon_args::arg_zmq_pub);
command_line::add_arg(core_settings, daemon_args::arg_zmq_rpc_disabled);
+ command_line::add_arg(core_settings, daemonizer::arg_non_interactive);
daemonizer::init_options(hidden_options, visible_options);
daemonize::t_executor::init_options(core_settings);
@@ -203,13 +203,6 @@ int main(int argc, char const * argv[])
return 0;
}
- // OS
- if (command_line::get_arg(vm, daemon_args::arg_os_version))
- {
- std::cout << "OS: " << tools::get_os_version_string() << ENDL;
- return 0;
- }
-
std::string config = command_line::get_arg(vm, daemon_args::arg_config_file);
boost::filesystem::path config_path(config);
boost::system::error_code ec;
diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp
index 0dcfc9d53..fbf26db85 100644
--- a/src/daemon/rpc_command_executor.cpp
+++ b/src/daemon/rpc_command_executor.cpp
@@ -644,7 +644,14 @@ bool t_rpc_command_executor::print_connections() {
}
}
- tools::msg_writer() << std::setw(30) << std::left << "Remote Host"
+ auto longest_host = *std::max_element(res.connections.begin(), res.connections.end(),
+ [](const auto &info1, const auto &info2)
+ {
+ return info1.address.length() < info2.address.length();
+ });
+ int host_field_width = std::max(15, 8 + (int) longest_host.address.length());
+
+ tools::msg_writer() << std::setw(host_field_width) << std::left << "Remote Host"
<< std::setw(8) << "Type"
<< std::setw(6) << "SSL"
<< std::setw(20) << "Peer id"
@@ -661,11 +668,11 @@ bool t_rpc_command_executor::print_connections() {
for (auto & info : res.connections)
{
std::string address = info.incoming ? "INC " : "OUT ";
- address += info.ip + ":" + info.port;
+ address += info.address;
//std::string in_out = info.incoming ? "INC " : "OUT ";
tools::msg_writer()
//<< std::setw(30) << std::left << in_out
- << std::setw(30) << std::left << address
+ << std::setw(host_field_width) << std::left << address
<< std::setw(8) << (get_address_type_name((epee::net_utils::address_type)info.address_type))
<< std::setw(6) << (info.ssl ? "yes" : "no")
<< std::setw(20) << info.peer_id