The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
stop execution of script with in the script dsdev_123 AIX 3 03-20-2008 11:57 AM
Script to run non-stop Raynon Shell Programming and Scripting 37 01-21-2008 05:36 AM
Script does not stop when doing a read rooseter Shell Programming and Scripting 7 11-05-2007 01:46 PM
stop Prstat using shell script filthymonk Shell Programming and Scripting 19 05-23-2007 06:24 AM
Start/Stop Script jjv1 UNIX for Dummies Questions & Answers 2 12-16-2003 04:28 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-29-2007
biot biot is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 5
Script that doesn't stop

Hi all,
I got a script that runs automatically using the cron file.
The script starts running at midnight and suppose to delete image files from folders and sub-folders. The script ends when he finishes deleting or after 5 hours. My problem is that the script doesn't stop running even after 5 hours, it causes the computer to be slower, so when I type "top" I can see that the "du" process kills the CPU usage.
Is there anyway to force the script to stop?, is it computer configuration related?
Any help will be appreciated.
  #2 (permalink)  
Old 11-29-2007
benefactr benefactr is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 71
If it takes you 5 hours to delete files then maybe your need to look at your script again or file management on your server. You must have 100's of thousands of files... Anyways I guess you are doing a check for the 5 hours, a simple exit should do the job. Maybe post your script and people maybe see what you are doing.
  #3 (permalink)  
Old 11-30-2007
biot biot is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 5
Hi
I attached 2 files below:
The script: check_space.txt (just rename to check_space)
The resource file that defines the folders' sizes: check_space.res.txt (just rename to check_space.res)

These are the lines that activates the script from the cron (root):
# PERIODICAL CHECK IMAGE SIZE
6 1 * * * /usr/local/opal/utils/check_space
5 5 * * * killall -9 du
6 5 * * * killall -9 /usr/local/opal/utils/check_space
Attached Files
File Type: txt check_space.txt (2.7 KB, 33 views)
File Type: txt check_space.res.txt (593 Bytes, 16 views)
  #4 (permalink)  
Old 11-30-2007
encrypted's Avatar
encrypted encrypted is offline Forum Advisor  
Registered User
  
 

Join Date: Feb 2004
Location: Oslo, Norway
Posts: 219
Does the script run fine on the command line? If not debug the script by putting a set -x at the top (or something similar) of the script and see that
where the script is getting into problems.

HTH
enc.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:37 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0