gstatus
gstatus copied to clipboard
run gstatus in a crontab
Hi, I would like to use gstatus to generate a json that is delivered via a local webserver. When I start gstatus manually with the -o option, the output as json can be generated.
If I start gstatus in a one line script via crontab, the json can not be generated (file size = 0B).
My proxmox host then sends me the following error by email:

/usr/local/bin/gstatus -a -o json > /tmp/test.json
Any Ideas?
Thanks and regards, Thorsten
Looks like /usr/local/sbin is not available in the PATH when run as crontab. Is Gluster installed in /usr/local/sbin/gluster?
no, its installed in /usr/local/bin/gstatus
to exclude problems with $PATH i had specified the complete path in the crontab:
/usr/local/bin/gstatus -a -o json > /tmp/test.json
no, its installed in
/usr/local/bin/gstatusto exclude problems with $PATH i had specified the complete path in the crontab:
/usr/local/bin/gstatus -a -o json > /tmp/test.json
I mentioned about path of the gluster binary. Run which gluster to know the path. Or Use below command to run in crontab
PATH=$PATH:/usr/local/sbin /usr/local/bin/gstatus -a -o json > /tmp/test.json