Why do my scripts stay in memory?
I have a few self written scripts which I run as cron jobs. After my system has been running for a while, it tends to slow down a bit. When I run ps -e I notice that there are numerous copies of my scripts running in memory.
Most of my scripts are just small bash ones, but i have a largish python one which also stays in memory. When I run top after the system has been running for a while, most of the top 10 processes are pythons.
When i run the python script myself, I have sometimes seen it hanging and I assume that this is why it stays in memory. However, I have never seen any of my shell scripts hanging so i don't know what's causing them to stay in memory.
I'm seeking a solution for both, but I suspect that the python one will come down to me coding better error trapping.
Can anyone help?
However, I have never seen any of my shell scripts hanging so i don't know what's causing them to stay in memory.
Wrt shell exit-on-err and debugmode are your friend, then. Maximise it and "set -evx" below the shebang line, then kill after it's been running for a preposterous amount of time. Since it's cronjobbed, and if you properly set your crontab MAILTO var, you should have some results in the mail....
Reminds me I should play UT FFA again RSN.
Always fun playing against them darth.* folks.
Are you sure you setup the crontab properly?
What is the status of the various instances? Are they "defunct?"
Rufius, I'm not sure of anything.
unSpawn, I tried what you said, but I don't see anything in my mail. I didn't previously have the MAILTO var set, but now I have it set to mythtv. (The first line in my crontab reads MAILTO=mythtv)
The system generated mail isn't something I often look at. I was surprised to see that the last mail I got was on Wed Aug 30 2006, on both root and mythtv accounts
I built the system last June, and have used it extensively ever since. Does it look like I did something to break the mail daemon on that date? What is the name of the stock mail daemon on Fedora Core 4? I guessed at maild or mailerd, but none of those are running.
I looked at /var/log/yum.log, and on that day I erased mythplugins, mythflix and mythphone and installed amarok.
edit: I see sendmail is running. Is that what is used?
|All times are GMT -5. The time now is 11:06 AM.|