Originally Posted by djfog
Hi to all Linux Users.I'm looking for commands for process management,as an example a command to simulate a process for 60seconds,a command to pause a process and one to restart it...something like that..
Thanks in advance.
Not sure what you mean by "simulating a process".
To restart a process, if its associated with a corresponding service, you should be able to just do a:
service stop <servicename>
service start <servicename>
Some processes/programs you can just send a:
kill -HUP <processid>
To restart it. See documentation for associated process/program.
If all else fails, just do it the old fashioned way...find the pid and kill it, then start the program again.
You can find the processid with:
ps -ef | grep <name or command>
ps -aux | grep <name or command>
or better yet
ps -fC <name or command>
To pause a process:
kill -s SIGSTOP processid
kill -STOP <processid>
To continue a process:
kill -s SIGCONT <processid>
kill -CONT <processid>
I'm sure some of the other gurus have additional tips and tricks to add to this, but this should get you started. Hope this helps.