PipelineFX Forum
Qube! => General => Topic started by: westernx on January 25, 2010, 07:25:39 PM
-
Hello . . .
I have jobs that are starting to just sit there for days . . . It was suggested to me to clear the job archive. My supervisor job log is huge and I want to clear it without screwing things up in mysql. How can I go about doing this correctly?
vfx-xserve:qube root# pwd
/var/spool/qube
vfx-xserve:qube root# du -sh job
34G job
Help!
-
Are you removing old/done jobs from Qube, and you want to clear out the logs from these jobs that are no longer in Qube?
If you look into /var/spool/qube/job, you'll see directories that correspond to the 1000's of the qube job id's (jobs 0-999 are in 0, 1000-1999 are in 1000/, etc).
Here's the simplest way:
Find the lowest number jobid that is still in your system, round down to the thousand, and then you can remove all the directories that are less than that thousand value.
Say your lowest jobID is 12345. You can remove all directories up to and including job/11000.
-
Thanks. So I was afraid to remove the log job id's I didn't need, because I wasn't sure if it would affect the mysql database in a weird way. But I manually removed the job dirs I no longer needed, and restarted the supervisor. Is there anything else I should have done, any recommendations? . . .
ryjguy7
-
. . . in my /var/spool/qube/job folder
vfx-xserve:job root# ls
10000 11000 6000 7000 8000 9000
I removed all directories in the 6000,7000,8000,9000 job folders.
. . . then I restarted qube. Do I need to refresh the workers or adjust the mysql database somehow?
ryjguy7
-
Nope, no need to do anything other than delete the directories that belong to removed jobs.
Since they've been removed from Qube, the database doesn't know anything about them anymore, and if they're not in the db, the supervisor doesn't know about them anymore, and the worker never cared once it had finished the job.
If you like, and since you're on Linux, I can set you up with a script that you can run as a cron job once or twice a day that will automatically clean out logs that are from removed jobs.
-
. . . ya sure that would be helpful, thanks