Score:0

Checking tsp logs via ssh

in flag

I'm using task spooler to run a process on my server. Is there a way I can check the logs via ssh? It seems that the commands are run by user/session, so I when ssh via terminal, I don't see anything that was run by the server.

  • An API call to a PHP file
  • PHP files executes the bash script
...
$command = 'sh ./generate.sh "' . $url_to_capture . '" "' . $thumbnail_to_create . '" "' . $webpage_size . '" "' . $screenshot_size . '" "' . $slide_full_path . '" "' . $image_format . '" "' . $slides . '"';
exec($command, $output, $result_code);
...
#!/bin/bash

url_to_capture=$1
thumbnail_to_create=$2
webpage_size=$3
screenshot_size=$4
slide_full_path=$5
image_format=$6
slides=$7

tsp decktape reveal "$url_to_capture" "$thumbnail_to_create" --screenshots --size="$webpage_size" --screenshot_size="$screenshot_size" --screenshots-directory="$slide_full_path" --screenshots-format="$image_format" --slides="$slides" --chrome-arg=--no-sandbox --page-load-timeout=60000 --buffer-timeout=60000

I've installed mpm-itk to run the vhost as ubuntu (AssignUserId ubuntu ubuntu) but I still cannot see any logs via tsp when I ssh.

I know the script is executing and can check it via ps -aux

ubuntu     45670  0.0  0.0   2832   100 ?        Ss   10:54   0:00

but when I type tsp, I have an empty list;

ID   State      Output               E-Level  Times(r/u/s)   Command [run=0/5]

If I run the command directly on terminal;

sh ./generate.sh "{url}" "{name}" "603x339" "603x339" "{path}" "jpg" "1"
tsp
ID   State      Output               E-Level  Times(r/u/s)   Command [run=1/5]
2    running    /tmp/ts-out.JXy3oe                           decktape reveal {url} {name} --screenshots --size=603x339 --screenshot_size=603x339 --screenshots-directory=/{path} --screenshots-format=jpg --slides=1 --chrome-arg=--no-sandbox --page-load-timeout=60000 --buffer-timeout=60000
hr flag
Maybe try with `sudo -u`? ex. `sudo -u ubuntu tsp`
waltinator avatar
it flag
Look at `ts -h`, the help screen, especially `-l show the job list (default action)` and `-o [id] show the output file. Of last job run, if not specified.`
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.