I’m running a script that starts a load of other processes to do its work.

I’m running the script like

systemd-cat -t foo thescript

If two of these script runs happens at once, I can’t tell them apart because both will tag with foo and journalctl identifies as foo[123] but 123 seems to be the pid of the process that generated the content. So if 123 is the pid of the thescript process at the start, it changes during the run of that script when a process launched by that script generates output.

I’d like a solution like: the 123 is always the parent script’s pid. Or some other way to add field data in that could then be used to separate out the separate runs.

Anyone got any suggestions?

  • nettieOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    47 minutes ago

    This looks super helpful, thanks so much! I’ll have a play!