diff options
| author | Dan Engelbrecht <[email protected]> | 2023-09-22 08:22:06 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-09-22 14:22:06 +0200 |
| commit | c7d4dc6a4d13881028d566f5ce501335e47e48bf (patch) | |
| tree | 493110da583a8e5d97fe05e14f23469ee6244d2b /src/zen/cmds/status.cpp | |
| parent | add trace command to enable/disable tracing at runtime (#416) (diff) | |
| download | archived-zen-c7d4dc6a4d13881028d566f5ce501335e47e48bf.tar.xz archived-zen-c7d4dc6a4d13881028d566f5ce501335e47e48bf.zip | |
Collect all zen admin-related commands into admin.h/.cpp (#418)
* move commands in scrub.h/cpp to admin_cmd.h/cpp
* move job command into admin_cmd.h/.cpp
* admin -> admin_cmd
* bench -> bench_cmd
* cache -> cache_cmd
* copy -> copy_cmd
* dedup -> dedup_cmd
* hash -> hash_cmd
* print -> print_cmd
* projectstore -> projectstore_cmd
* rpcreplay -> rpcreplay_cmd
* serve -> serve_cmd
* status -> status_cmd
* top -> top_cmd
* trace -> trace_cmd
* up -> up_cmd
* version -> version_cmd
Diffstat (limited to 'src/zen/cmds/status.cpp')
| -rw-r--r-- | src/zen/cmds/status.cpp | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/zen/cmds/status.cpp b/src/zen/cmds/status.cpp deleted file mode 100644 index 1afe191b7..000000000 --- a/src/zen/cmds/status.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright Epic Games, Inc. All Rights Reserved. - -#include "status.h" - -#include <zencore/fmtutils.h> -#include <zencore/logging.h> -#include <zencore/string.h> -#include <zencore/uid.h> -#include <zenutil/zenserverprocess.h> - -namespace zen { - -StatusCommand::StatusCommand() -{ -} - -StatusCommand::~StatusCommand() = default; - -int -StatusCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) -{ - ZEN_UNUSED(GlobalOptions, argc, argv); - - ZenServerState State; - if (!State.InitializeReadOnly()) - { - ZEN_CONSOLE("no Zen state found"); - - return 0; - } - - ZEN_CONSOLE("{:>5} {:>6} {:>24}", "port", "pid", "session"); - State.Snapshot([&](const ZenServerState::ZenServerEntry& Entry) { - StringBuilder<25> SessionStringBuilder; - Entry.GetSessionId().ToString(SessionStringBuilder); - ZEN_CONSOLE("{:>5} {:>6} {:>24}", Entry.EffectiveListenPort.load(), Entry.Pid.load(), SessionStringBuilder); - }); - - return 0; -} - -} // namespace zen |