1
vote
4answers
284 views

How to make a copy of /proc/xxxxx? [closed]

A users account have been hacked on one of my servers, where the hacker have started some spam binaries. Before I kill the processes would I like to make a copy of them, but when I tar czf ...
0
votes
1answer
75 views

Kill child process when the parent exits

I'm preparing a script for Docker, which allows only one top-level process, which should receive the signals so we can stop it. Therefore, I'm having a script like this: one application writes to ...
0
votes
2answers
29 views

Find PHP process that logs to file [duplicate]

I have started a PHP script via browser and due to a loop error the script continues to be executed even after closing the browser. I am noticing it since the script is logging error messages to my ...
1
vote
2answers
78 views

If I know the PID number of a process can I know its name?

If I have the PID number for a process (on a UNIX machine), how can I know the name of its associated process? What do I have to do?
1
vote
2answers
458 views

how to see process status with full details

I run the script - my_script.ksh as process with 5 long arguments on my solaris/linux machine ( example 1 ) , Later I verify the process by ps -ef | grep my_script.ksh I don't understand ...
0
votes
1answer
59 views

Interfacing strace with Process Name instead of PID

How do I implement a wrapper script pstrace in bash that changees the interface of [sudo] strace -c -p [PID] to [sudo] pstrace -c -p [PROCESS-NAME] similar to how killall [PROCESS-NAME] is ...
1
vote
2answers
666 views

Meaning of killall -0

I see from many place the follow command is used to check if a process exists, e.g. killall -0 nginx But from the documentation I can't see anything related to this argument, can anyone explain?
1
vote
1answer
111 views

why there are three(it should be two) process related to screen when using ps command?

you can see there are three processes which are related to screen command: [world]$ ps auxf USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND hugemeow 28938 0.0 0.0 66080 ...
1
vote
1answer
2k views

pgrep/pidof usage for complex process names?

I am trying to use pidof or pgrep to be able to send a HUP to a process in my system. The problem is that I only want to kill the process with a precise parameter. This is the output of 'ps awx' ...
4
votes
4answers
3k views

What's a proper way of checking if a PID is running?

I have a .pid file, and I need to check if the process is running. So far I found two options kill -0 `cat something.pid` which prints out an error if the pid isn't running. I know this can be ...
0
votes
1answer
348 views

PID of a command executed in bash

I need a linux / unix command that will execute another command and write the PID of the command it executes to a file... is there such a command? I am not looking for any scheme that puts processes ...
7
votes
3answers
197 views

How to safeguard a shell script against running out of control?

I've recently had an experience of writing a shell script which crashed a server (and damaged a partition) by consuming all resources. It was hooked up to a cron job, and it seems it took longer to ...
0
votes
1answer
256 views

linux + run script on other shell because script stuck - not return to linux prompt

In my Linux machine I have binary script (called transferNames.bin ) The problem is that when I run transferNames.bin with & script stuck and not returns to Linux prompt “#”, even if I wait 1 day ...
2
votes
1answer
253 views

What does the leading dash in process cmdline mean?

I noticed a process taking full CPU on my linux server, of which the COMMAND column from top -c is -bash. cat /proc/<pid>/cmdline shows -bash too. What does the leading dash mean? More info: ...
5
votes
1answer
675 views

Verify disown command

I issued the ^z; bg; disown sequence in order to allow me to close an ssh session in which I am running a super-important long-running process. This process writes status output to stderr, and it has ...
0
votes
1answer
645 views

Supervisor - how to get a program to run at intervals of time

Perhaps I'm misunderstanding with Supervisor does, but perhaps me asking this question will help clear that up. Basically, I have a Supervisor program in my /etc/supervisord.conf file that executes a ...
84
votes
9answers
20k views

Keeping a linux process running after I logout

I'm connecting to a linux machine through SSH, because I'm trying to run a heavy bash script that makes filesystem operations, and it's expected to keep running for hours. But I cannot leave the SSH ...
4
votes
5answers
11k views

How to get pid of just started process

I want to start process (eg. myCommand) and get its pid (to allow to kill it later). I tried ps and filter by name, but I can not distinguish process by names myCommand ps ux | awk ...
0
votes
2answers
93 views

Monitor processes solution

Scenario: Linux machine ; I need to "monitor" my processes: need to find every processes that is consuming >80% CPU over 20 seconds, and write the process info into a log . Is there already a ...
0
votes
3answers
219 views

launching several processes in a loop

In bash, I am trying to launch several xeyes at once. If I do this: for a in `seq 1 3`; do "xeyes"; done I get 1 xeye and the subsecuent xeyes comes up only when I close the previous xeye. ...
12
votes
3answers
4k views

Do background processes get a SIGHUP when logging off?

This is a followup to this question. I've run some more tests; looks like it really doesn't matter if this is done at the physical console or via SSH, neither does this happen only with SCP; I also ...
15
votes
6answers
14k views

If I launch a background process and then log out, will it continue to run?

Asking this after a prolonged discussion with a coworker, I'd really like a clarification here. I launch a background process, either by appending "&" to the command line or by stopping it with ...
10
votes
2answers
3k views

Linux - Find out the current working directory of a process?

If i have a process PID X, how can I find out what directory it was running in? I can see with ps aux | grep X the full command line that it was invoked with. However in this case it's ./script.sh, ...
0
votes
5answers
427 views

Way to kill frozen application

I have an application that freezes. I can't terminate it with ^C, so I have to do following: $ ./myapp ^C^Z [1]+ Stopped ./myapp $ pgrep -lf myapp 18479 bash ./myapp $ kill -9 18479 ...
2
votes
2answers
2k views

Can you screen a running programme? [duplicate]

Possible Duplicate: Can I nohup/screen an already-started process? GNU screen is great for long running programmes. You can start your programme in it and disconnect and bring your laptop ...
4
votes
5answers
2k views

Bash snippet for killing a process until it's dead?

I'm trying to write a robust bash script, and in it I create a background process. At the end of the script, I want to kill it. I have it's PID. I was thinking of somthing like this while [[ ps ef ...
0
votes
3answers
628 views

Why doesn't “jobs” show a ssh tunnel I opened in the background?

I'm starting a ssh tunnel like this: ssh -f -N $PORT:127.0.0.1:$port example.com the -f puts ssh into the background, which is what I want. This works, since there is a SSH tunnel set up. But if I ...