What would be the best way to check if Sandbox is running as a background process (with default parameters)? Would it be using ps x
?
“Best” will definitely depend on your context here. I personally like to check if the port is open, with something like:
while ! nc -z localhost:6865; do sleep 1; done
Well, I’m usually waiting for a sandbox; if you just wanted to check, you can change that while
into an if
.
This only tells you that something has that port open; if you’re in a context where you may not know whether that something is a sandbox, you may want to instead send a query to it with grpcrul, perhaps to an unauthenticated endpoint like ListKnownPackages or GetLedgerIdentityRequest.
Thnx for the super speedy reply @Gary_Verhaegen What would be the shell command for grpcrul
to ListKnownPackages
? I realise I’m being a but spoiled and ask for a full solution
I have no idea, I’ve never used grpcurl myself. Sorry, that’s as far as I’m able to take you tonight.
Rather than using the party management service which still requires a valid token (but no specific claims), I’d recommend the healthcheck endpoint. You can talk to that via grpcurl using the following command
grpcurl -plaintext localhost:6865 grpc.health.v1.Health/Check
Awesome, that did the trick! Running the command returns
{
"status": "SERVING"
}
Thnx for your help @Gary_Verhaegen and @cocreature!