Skip to main content

All Questions

Tagged with
0 votes
1 answer
718 views

How to get PID of python3 working program

I want to write a program on bash that will restart my script once every some time. The program runs in an infinite loop and launch like this: Python3 main.py So to restart it, I need to do Kill [pid]...
ASDORDSAUSER's user avatar
1 vote
2 answers
403 views

Portable way to find all PIDs by cmdline

I want to find the PID of all processes which were run by a cmdline call which contains a certain string my_exec. For instance, with macOS or Ubuntu, open a terminal and run /bin/bash, and then in ...
Nisba's user avatar
  • 183
8 votes
1 answer
14k views

How do I determine the PID of my python program if there is more then one python program running?

I have two python programs running on my system, say they are called program x and program y. I want to get the pid of program y, but not x for my bash script. When using pgrep python, I get the pid ...
user3346931's user avatar
1 vote
1 answer
796 views

PID of background task is different to the listed task PID using ps

Note: I h ave moved this to stack-overflow, I think that is the right place: here I have a strange issue, I can't quite get my head around. What I do is run a function called fn_rundumper which ...
code_fodder's user avatar
  • 1,577
0 votes
1 answer
128 views

How to execute a script 20 at a time with different variables at a time in parallel?

I am trying to run 20 files at a time, using warc.sh or a better way to put it is 20 instances of warc.sh at a time with directory contents as the input. I am also trying to watch the PIDs in case bad ...
ehime's user avatar
  • 241
1 vote
1 answer
240 views

Red5 on Debian, output PID

I'm fumbling my way through with this one, as a novice with all things linux so please be patient :) I would like to output the process ID of a program to a file. From my readings this is generally ...
milks's user avatar
  • 113
2 votes
5 answers
7k views

Get PID of process started in screen by su

i have a simple script that starts quassel-core in a screen session as different user! The script is: #!/bin/sh su ircc -c 'screen -dmS quassel /home/ircc/quassel/quassel-core' I want to start and ...
Josef's user avatar
  • 1,345
0 votes
3 answers
2k views

How can I check the PID of a X-server in another virtual terminal?

I am trying to open a program in a naked X-server on a different virtual terminal. I am using ubuntu 9.10. The command I'm using is this. openvt -f -s -- `X :2 & '/path/to/program' -display :2`; ...
user19489's user avatar