pxf
pxf copied to clipboard
Improve PXF status check
In addition to using curl to see if the server is up and responding to HTTP requests, pxf status now includes checks of the pid file.
Co-authored-by: Bradford D. Boyle [email protected] Co-authored-by: Yiming Li [email protected]
Moved the checks for the PID file and process into the block where checkWebapp
returns an error.
Here is the output when PXF is up
$ pxf status
Checking if PXF is up and running...
PXF is listening on port 5888
Here is the output when PXF is down because pxf stop
was called
$ pxf stop
Stopping PXF [pid=2574499]...
PXF stopped [pid=2574499]
$ pxf status
Checking if PXF is up and running...
ERROR: PXF is down - the application is not running
PID file '/home/bboyle/pxf-base/run/pxf-app.pid' not found
Here is the output when PXF is down because it stopped someway other than the PXF CLI
$ kill $(cat $PXF_BASE/run/pxf-app.pid)
$ pxf status
Checking if PXF is up and running...
ERROR: PXF is down - the application is not running
Process with PID=2574880 not found
Closing this in favor of #881