Open albertilagan opened 3 days ago
Hi @albertilagan,
Today we have:
>process-compose process list -owide
PID NAME NAMESPACE STATUS AGE HEALTH RESTARTS EXITCODE
80414 pc_log default Running 2h13m - 0 0
80415 postgresql default Launching 2h13m Ready 0 0
or
process-compose process list -ojson
[
{
"name": "pc_log",
"namespace": "default",
"status": "Running",
"system_time": "2h13m",
"age": 7998211577174,
"is_ready": "-",
"restarts": 0,
"exit_code": 0,
"pid": 80414,
"is_elevated": false,
"password_provided": false,
"mem": 2883584,
"cpu": 0,
"IsRunning": true
},
{
"name": "postgresql",
"namespace": "default",
"status": "Launching",
"system_time": "2h13m",
"age": 7998211618472,
"is_ready": "Ready",
"restarts": 0,
"exit_code": 0,
"pid": 80415,
"is_elevated": false,
"password_provided": false,
"mem": -1,
"cpu": -1,
"IsRunning": true
}
]
Are you interested in a get
command? Something like:
process-compose process get pc_log -owide
PID NAME NAMESPACE STATUS AGE HEALTH RESTARTS EXITCODE
80414 pc_log default Running 2h13m - 0 0
Hi @albertilagan,
Today we have:
>process-compose process list -owide PID NAME NAMESPACE STATUS AGE HEALTH RESTARTS EXITCODE 80414 pc_log default Running 2h13m - 0 0 80415 postgresql default Launching 2h13m Ready 0 0
or
process-compose process list -ojson
[ { "name": "pc_log", "namespace": "default", "status": "Running", "system_time": "2h13m", "age": 7998211577174, "is_ready": "-", "restarts": 0, "exit_code": 0, "pid": 80414, "is_elevated": false, "password_provided": false, "mem": 2883584, "cpu": 0, "IsRunning": true }, { "name": "postgresql", "namespace": "default", "status": "Launching", "system_time": "2h13m", "age": 7998211618472, "is_ready": "Ready", "restarts": 0, "exit_code": 0, "pid": 80415, "is_elevated": false, "password_provided": false, "mem": -1, "cpu": -1, "IsRunning": true } ]
Are you interested in a
get
command? Something like:process-compose process get pc_log -owide PID NAME NAMESPACE STATUS AGE HEALTH RESTARTS EXITCODE 80414 pc_log default Running 2h13m - 0 0
Hi, thanks for you reply, yes as you said would be nice to have a get
subcommand for getting specific process state.
Makes sense. Will add it to the next release.
Alternatively as mention above you can do this by doing a curl on the existing http server, problem is I want to use --unix-socket and afaik if it's enabled http server is disabled,
You can still use curl
on a unix socket, like curl --unix-socket <path> http://localhost/process/<process-name>
, only that the http://localhost
is dummy and can be anything, its only purpose is to tell curl that it is a HTTP request.
Anyways, would be nice to have a CLI command too.
Feature Request
Use Case:
Similar to how doing a curl on
/processes
or/process/<name>
can get you details about the process, e.gIsRunning
,status
, it would be nice to be able to do the same thing on cliProposed Change:
process-compose process state
process-compose process info
Who Benefits From The Change(s)?
Alternative Approaches
Alternatively as mention above you can do this by doing a
curl
on the existing http server, problem is I want to use--unix-socket
and afaik if it's enabledhttp
server is disabled,