From 22652ddf097dfe8d2c161578fe2d849275c2aabb Mon Sep 17 00:00:00 2001 From: onefang Date: Wed, 11 Aug 2021 10:05:24 +1000 Subject: Get basic status of sims. --- src/sledjchisl/sledjchisl.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index 08ae17c..4b3527b 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -1848,11 +1848,21 @@ void doSimsThing(simData *simd, char *sim, char *type, int count, int window, in break; } - case STATUS : + case RESTART : // "restart 'Welcome sim'" "restart Welcome.shini" "Welcome.shini restart" "restart Welcome.ini" "restart Welcome" "restart" restart everything { break; } + case STATUS : // "status 'Welcome sim'" "status Welcome.shini" "Welcome.shini status" "status Welcome.ini" "status Welcome" "status" status everything + { +// TODO - report CPU and memory used as well. + if (checkSimIsRunning(simd->tab)) + I("%s is running in Tmux tab [%d:%s](pane %d) tmux ID %s, from %s/sim%d", simd->name, window, type, pane, simd->paneID, scTemp, count); + else + I("%s is not running.", simd->name); + break; + } + case STOP : // "stop 'Welcome sim'" "stop Welcome.shini" "Welcome.shini stop" "stop Welcome.ini" "stop Welcome" "stop" stop everything { if (checkSimIsRunning(simd->tab)) -- cgit v1.1