05-09-2008
[REQ] Automatic script kill process
HI,
I'm using CentOS 5.1 x86_64, CPanel ..
a lot of my users used too much resource, i want to write a script to kill all of them.
Eg: LFD always notify me:
Time: Sun Apr 27 07:40:08 2008
Account: xxxx (my user)
Resource: Virtual Memory Size
Exceeded: 110 > 100 (MB)
Executable: /usr/bin/php
Command Line: php /home/xxxx/public_html/import.php
PID: 20897
Killed: No
or .
Time: Sat Apr 26 18:40:50 2008
Account: xxxx (my user)
Resource: Process Time
Exceeded: 7305 > 1800 (seconds)
Executable: /usr/bin/php
Command Line: /usr/bin/php /home/xxxx/public_html/index.php
PID: 27308
Killed: No
Now, can you help me ??
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello guys,
I have a process named monitoreo, with 'monitoreo start' my process start until i kill them, now i want to do 'monitoreo stop' to kill them.
After 'monitoreo start' i have this process running:
ps -af
UID PID PPID C STIME TTY TIME CMD
ati 10958 1495 ... (5 Replies)
Discussion started by: Lestat
5 Replies
2. UNIX for Dummies Questions & Answers
Hello
We are using UNIX, (?) there were reports to us thAt their login was automatically killed, however we (root) did not issue a kill -9 PID, can anyone give me an idea what happen. To add, the user is not idled, he is actually doing something.
also, i search all the thread, donno if i... (5 Replies)
Discussion started by: lancemendioro
5 Replies
3. Shell Programming and Scripting
HI All
Im new to shell scripting...kindly plz help me...
I need a shell script for:
We have to take export of all db's on daily basis from all svr's and keep these export backups on diffrent server.
Plz help.
Regards
Gaurav (5 Replies)
Discussion started by: ergauravtaneja
5 Replies
4. Shell Programming and Scripting
hello Bros,
I need to write some script that i can put it on crontab which checks for a process X if running. If the process X is ruuning then take the PID and kill it or display message that says process X is not running.
I am using AIX 5.3
Thanks guys.:b: (2 Replies)
Discussion started by: malcomex999
2 Replies
5. Shell Programming and Scripting
Hi Experts, we do have a shell script for Unix Solaris, which will kill all the process manullay, it used to work in my previous env, but now it is throwing this error.. could some one please help me to resolve it
This is how we execute the script (and this is the requirement) ... (2 Replies)
Discussion started by: jonnyvic
2 Replies
6. Shell Programming and Scripting
Hello all... new to these forums and a bit of a newbie with linux aswell.
I need to figure out how to write a shell script to kill a process by name as given to the script as an argument. I've got that part working OK, but i need to make sure that the script does not allow processes that are... (6 Replies)
Discussion started by: cannon1707
6 Replies
7. UNIX for Dummies Questions & Answers
What I need to learn is how to use a script that launches background processes, and then kills those processes as needed.
The script successfully launches the script. But how do I check to see if the job exists before I kill it?
I know my problem is mostly failure to understand parameter... (4 Replies)
Discussion started by: holocene
4 Replies
8. Shell Programming and Scripting
Hi
I have the process to kill regulary, but the PSID is dymatic change and not sure how to kill the specific process ID
Check the tradekast_rvd is running , if such process, kill the els process id
ps -e f |grep tradekast_rvd
ps -ef |grep els
then I kill els process id
... (2 Replies)
Discussion started by: linux_user
2 Replies
9. HP-UX
Hi All,
One of our servers stopped responding , unable to take any logins into it, the response is almost nil...later it resumed
Also during this time one of our application processes which was costly on memory got killed..is it an OOM kill?
Would like to know to know how to avoid such... (4 Replies)
Discussion started by: baanprog
4 Replies
10. Shell Programming and Scripting
Hi,
I just random create 1000 folder which range from 0-20,000 . Inside all the folder, I have copy over the same program named as run.sh to run in each folder.
Can I know that how to write a master script to let it automatic run the "run.sh" in each different random folder create?
Some... (5 Replies)
Discussion started by: perl_beginner
5 Replies
kill.d(1m) USER COMMANDS kill.d(1m)
NAME
kill.d - snoop process signals as they occur. Uses DTrace.
SYNOPSIS
kill.d
DESCRIPTION
kill.d is a simple DTrace program to print details of process signals as they are sent, such as the PID source and destination, signal num-
ber and result.
This program can be used to determine which process is sending signals to which other process.
Since this uses DTrace, only users with root privileges can run this command.
EXAMPLES
Default output, print process signals as they are sent.
# kill.d
FIELDS
FROM source PID
COMMAND
source command name
TO destination PID
SIG destination signal ("9" for a kill -9)
RESULT result of signal (-1 is for failure)
DOCUMENTATION
See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with ver-
bose descriptions explaining the output.
EXIT
kill.d will run forever until Ctrl-C is hit.
AUTHOR
Brendan Gregg [Sydney, Australia]
SEE ALSO
dtrace(1M), truss(1)
version 0.90 May 14, 2005 kill.d(1m)