I tried killing a bunch of scripts. They seem to have worked because
ps -ef | grep -i SCRIPT_NAME is not showing them but the logs are getting populated and jobs in the script are getting done.
How do I really kill them or atleast see the process running?
Have you got "lsof" installed ? If so try running "lsof filename" and it will give you the pid of the process that has that file open (BTW, the title of the post is a bit misleading as the "kill -9" worked (and should always work unless there is a hardware fault), however there are still other processes that are writing to the files)
You mentioned the logs were getting populated ? Run "lsof" on those (unless they are syslog logs, in which case the syslog entry will usually give you the pid of the program that is logging the entry)
These scripts start just after midnight daily and poll for a file every 15 mins. There is a timer in the script which ends the scripts once 1340 mins have elapsed. So it dies automatically towards the end of the day.
If you look at the log file timestamps, yesterdays script finished at aroung 11:25 PM and new set of scripts got triggered early morning even though there were commented in the cron file -
-rw-r--r-- 1 estdm2 datamart 15607 Jan 24 22:46 poll.Peb.output.012411.0001
-rw-r--r-- 1 estdm2 datamart 14836 Jan 24 22:46 poll.HSA.output.012411.0001
-rw-r--r-- 1 estdm2 datamart 13231 Jan 24 22:48 poll.OES.output.012411.0003
-rw-r--r-- 1 estdm2 datamart 13821 Jan 24 23:02 poll.PPM.output.012411.0002
-rw-r--r-- 1 estdm2 datamart 14530 Jan 24 23:17 poll.DM-.output.012411.0002
-rw-r--r-- 1 estdm2 datamart 188 Jan 25 00:01 HHSAS.log
-rw-r--r-- 1 estdm2 datamart 193 Jan 25 00:01 Pebbles.log
-rw-r--r-- 1 estdm2 datamart 188 Jan 25 00:02 PPM2DM.log
-rw-r--r-- 1 estdm2 datamart 191 Jan 25 00:02 REMEDY.log
-rw-r--r-- 1 estdm2 datamart 185 Jan 25 00:03 OES.log
-rw-r--r-- 1 estdm2 datamart 5077 Jan 25 11:46 poll.Peb.output.012511.0001
-rw-r--r-- 1 estdm2 datamart 4838 Jan 25 11:46 poll.HSA.output.012511.0001
-rw-r--r-- 1 estdm2 datamart 4600 Jan 25 11:47 poll.PPM.output.012511.0002
-rw-r--r-- 1 estdm2 datamart 4885 Jan 25 11:47 poll.DM-.output.012511.0002
-rw-r--r-- 1 estdm2 datamart 4549 Jan 25 11:48 poll.OES.output.012511.0003
I am trying to figure out how this cron is triggering even though I have commented it.
Does it give anything which is not attached to a terminal or which has high CPU usage?
It may just show as a Shell process with no command line. You may have killed the parent process.
A "kill -9" is a last resort and can leave orphan looping processes - similar to when users don't log out properly. If you have orphan looping processes they should show with the "top" command. Be careful because a busy database process could look similar.
We kill looping processes sometimes. The most common are shell menu scripts.