Hi - I need help. My user crontab is spawning multiple at processes (and multiple mencoder program starts, that exit, then restart, repeatedly), locking up my system.
The problem is that virtually every time the pvr script is called by crontab, it spawns (continuously) multiple/new at command processes (Process Viewer), and also several mencoder processes that continually start, stop, relaunch, that are multiply-present in Process Viewer at any one time. The recordings are all partial files (snips). This had been working properly, until about a month ago (Ubuntu updates, screwing things up?).
I'd appreciate it is someone could explain to me what the problem is. FYI: I am using Ubuntu 8.04 LTS -Hardy Heron.
Thanks, appreciated, Greg :-)
Last edited by Yogesh Sawant; 06-23-2009 at 03:55 AM..
Reason: added code tags
If you are calling these scripts from cron every minute, then it is no surprise that multiple at jobs are being scheduled... why do you need the crontab entries at all? Why don't you just schedule the programs directly through at?
Hi - Thank you for your replies ... I had intended to schedule the recordings from a script, avoiding the more tedious route via crontab itself. Regardless, since the bash scripts contain a single at command (scheduled time), I don't why cron is repeatedly spawning multiple processes (at commands, for the single, scheduled event).
That is, despite reading the file every minute, once this scheduled at command has been executed (at the appropriate time), shouldn't further calls to this bash file (with a now-expired at command start time) simply be ignored?
Or, it it the case that since the crontab-called file hasn't run it's course (completed, e.g for a scheduled recording of 1 hour), that cron thinks that the command hasn't executed, and tries to execute at the next available opportunity (here, every 1 minute)?
FYI, after I posted my original question, I had the idea (subsequently suggested, above), and directly called my record_tv_* scripts from crontab, which seems to be the solution - not quite what I had wanted, but so be it.
I agree that it sounds like something is going wrong there, and I'm not sure what's causing it. But what I don't understand is why you are using crontab at all. When you want to schedule a recording, just run the at command once, as you had in the bash script... job done? It will only run once, at the scheduled time, and then it will be forgotten about.
When you set up your cron, you set it to call the script every minute. So, every minute, cron calls your script and your script schedules an at job. When that time arrives, the system will start running all of those queued up jobs scheduled by at.
Once you have passed the time specified in the at command, cron is still going to call your script (every minute) and it is going to try to schedule the at. Since the time is now passed, those at jobs should not be scheduled, but cron and the script are going to continue to run. How do you expect them to know that the time is expired? At will know the time is already expired and refuse to schedule a new job but everything leading up to that point is still going to happen.
Yes, I understand (fully) now ... thanks. Cron was the wrong approach - stick with "at," as suggested.
A related question: How can I delete those (100's, if not 1000's) of scheduled processes (at commands), a legacy from cron?
I know that I can remove specific job ids using atrm, but it won't accept wildcards. There are simply too many of these, to remove tyhem via atrm, one at a time.
Hi,
I am having a shell script on Solaris 10 which has a while loop as shown below.
#!/usr/bin/ksh
#
while
do
sleep 60
done
Name of the shell script is coldcentric.sh. I executed script /DATAWAREHOUSE/LOAD/Scripts/coldcentric.sh from a command task in Informatica worklow as... (3 Replies)
Hi,
I am having a shell script which has a while loop as shown below.
while
do
sleep 60
done
I am executing this script from Informatica ETL tool command task from where we can execute UNIX commands/scripts. When i do that, i am seeing 2 processes getting started for one script... (2 Replies)
Good night everyone, I've been trying to make AD authentication work with RBAC and I think I messed my test LPAR up.
I've manually modified the /etc/security/user.roles file, adding a role to one of my AD users (who is not defined locally) and then runned setkst. It worked fine, but now I found... (3 Replies)
:)Hi there, I am new to scripting and wanted to see if someone can show me how to grep on multiple processes and send the output to a file in /home/mydir/output.
I am aware of
ps -ef | grep on 1 process
but need help looking up multiple processes, can you use this command
ps -elf | grep |pid1... (4 Replies)
Want to kill multiple processes by name. for the example below, I want to kill all 'proxy-stagerd_copy' processes.
I tried this but didn't work:
>> ps -ef|grep proxy_copy
root 991 986 0 14:45:34 ? 0:04 proxy-stagerd
root 1003 991 0 14:45:49 ? 0:01... (2 Replies)
Hello,
I seem to be having a problem with accumulation of root CRON jobs occuring when I have a user's cron job(s) running.
Here is an example of a user's crontab file:
*/1 * * * * echo "hello" > /dev/nullps aux|grep CRON
root 14333 0.0 0.0 91236 2172 ? S ... (12 Replies)
Hi All,
I need some assistance, if possible...
Our IMAP server has recently (as of 10:30 GMT today) started spawning multiple processes for no reason! This is causing the mail server's load average to increase continually until the whole machine grinds to a halt.
Here is a typical... (0 Replies)
Hi,
I need to spawn mutilpe threads , each invoking a different set of shell scripts, in parallel.
What would be the best way to do that.
Any sample script would greatly help. I am a novice at Unix so any help is much appreciated.
Thanks (5 Replies)
Suppose that I am performing some operation on an sql database. Lets say process of Searching and then if a value is found, updating it... Now, when I have some millions of records on which the operation has to be performed... Does it help to spawn multiple processes each executing the same... (9 Replies)
I want to spawn n child processes but have two different classes..with the foremost one forking/spawning the child process and the latter performing a function w/ the spawned processes.
I can do this in one class with an if statement and the simple
if((pid=fork())==0) //child process
{
... (1 Reply)