On Tue, May 11, 2021 at 8:45 PM Huji Lee <firstname.lastname@example.org> wrote:
> @Bryan: this is great! In fact, https://sge-jobs.toolforge.org/tool/huji completely serves my current needs. I added the links to the Grid page on the Wikitech wiki.
> @Brooke: thanks for the -xml idea. As it turns out, that is what Bryan's code uses too. Nevertheless, I cannot get it to work. The PHP code shown below returns a blank page at https://huji.toolforge.org/status.php
> $out = shell_exec('qstat -xml');
> In fact, I even went so far as using the exact command I found in Bryan's code which is /usr/bin/qstat -xml -j '*' | /bin/sed -e 's/JATASK:[^>]*/jatask/g' but even that results in a blank output on the web. On the command line, both of those return an XML as expected. Any ideas as to how that could be the case?
There's no qstat command on k8s which your webservice is running from:
02:25:25 1 ✗ zhuyifei1999@tools-sgebastion-08: ~$ cat
# This file is used by Toolforge infrastructure.
# Please do not edit manually at this time.
# Mon Oct 12 19:49:38 2020
02:25:29 0 ✓ zhuyifei1999@tools-sgebastion-08: ~$ sudo -- sudo -Hu
tools.huji kubectl get po
NAME READY STATUS RESTARTS AGE
huji-[...] 1/1 Running 0 74d
02:25:36 0 ✓ zhuyifei1999@tools-sgebastion-08: ~$ sudo -- sudo -Hu
tools.huji kubectl exec -it huji-[..] /bin/bash
bash: qstat: command not found
You must run on the grid to talk to the grid.
Wikimedia Cloud Services mailing list
To unsubscribe send an email to email@example.com (formerly firstname.lastname@example.org)