diff --git a/ydb/tests/fq/control_plane_storage/ydb_test_bootstrap.h b/ydb/tests/fq/control_plane_storage/ydb_test_bootstrap.h index c38200ed6d68..425e4c2ff6e2 100644 --- a/ydb/tests/fq/control_plane_storage/ydb_test_bootstrap.h +++ b/ydb/tests/fq/control_plane_storage/ydb_test_bootstrap.h @@ -62,6 +62,23 @@ inline void AssertNoTopSort(TDebugInfoPtr debugInfo) { } } +namespace { + +TString Exec(const TString& cmd) { + std::array buffer; + TString result; + std::unique_ptr pipe(popen(cmd.c_str(), "r"), pclose); + if (!pipe) { + throw std::runtime_error("popen() failed!"); + } + while (fgets(buffer.data(), static_cast(buffer.size()), pipe.get()) != nullptr) { + result += buffer.data(); + } + return result; +} + +} + struct TTestBootstrap { NConfig::TControlPlaneStorageConfig Config; NFq::TYqSharedResources::TPtr YqSharedResources; @@ -79,6 +96,9 @@ struct TTestBootstrap { TTestBootstrap(std::string tablePrefix, const NConfig::TControlPlaneStorageConfig& config = {}) : Config(config) { + Cerr << "Netstat: " << Exec("netstat --all --program") << Endl; + Cerr << "Process stat: " << Exec("ps aux") << Endl; + Cerr << "YDB receipt endpoint: " << GetEnv("YDB_ENDPOINT") << ", database: " << GetEnv("YDB_DATABASE") << Endl; tablePrefix.erase(std::remove_if(tablePrefix.begin(), tablePrefix.end(), isspace), tablePrefix.end()); TablePrefix = tablePrefix; auto& storageConfig = *Config.MutableStorage();