I'm having a issue trying to write input to linux process.
I run a shell command within PHP as
shell_exec("find / test.txt");
PHP initiates this process but does not kill it. If interrupting the PHP (e.g.
I am using tmpnam() to generate a temp file name in process 1.
Opening that file and sending the file name to another process 2.
The other process 2 opens and writes into that file.
But, simply I want to know if my process 1 dies, will the file be removed by the OS. Doesnt look like this is happening.
I used the init.d skeleton template to create an init.d script that starts up a basic java process. When I run my init.d script, the process starts up and works fine. The only problem is that the process doesn't produce the required log files while it's running.
I have a restart script that kills a process, starts the process, sleeps for a while, then kills the process again, and so on.
I want to be able to Strg + C the shell script when it's sleeping but still keep the created process around.
I tried this (simplified):
#!/bin/bash
while true; do
kill -SIGTERM $(pgrep foo)
(foo &)
sleep $((5*60*60))
done
However, the PPID of process f
Using Ubuntu 12.04. is there any way to hide a running process ? That process shouldn't' display in system monitor,top,htop . There is no problem to remember the process id (PID) so observation of the process can be done easily .but i want to hide the process completely . is there any way ?
What I want to know is PIDs that were assigned to a process before its last 2-3 restart.
Scenario is after this particular process crashes, a log file is generated and PID of the process is concatenated to the name of log file. I have such 5 log files with name as hs_err_PIDs.
Can someone please help me with a script that will help in identifying the CPU & memory usage by a process name, rather than a process id.This is to primarily analyze the consumption of resources, for performance tweaking.
G
I have a script which starts a daemon process and then sleeps for 20 seconds. If I run the script on SLES11 SP1 or RHEL6 then after the script exits the process is still running.
If I run the script on SLES11 SP3 or RHEL6.3 then after the script exits the process is no longer running.