LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Feedback/Feature Requests > Swap Folder Cleanup

Reply
 
Thread Tools Display Modes
  #11  
Old 08-07-2010, 07:12 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
It should have a log message at NOTICE level
"Start to clean up cache directory."
Reply With Quote
  #12  
Old 08-07-2010, 07:14 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
You can try running "lsws/admin/misc/cleancache.sh <cache_dir>" see if it does anything for you.
Reply With Quote
  #13  
Old 08-07-2010, 08:02 PM
ffeingol ffeingol is offline
Senior Member
 
Join Date: Jul 2007
Location: /dev/null
Posts: 290
OK, I can see the messages that it's starting but it's doing nothing. In looking at the script it looks like it's looking for swap/0/file and our directory is swap/0/0/file. Is this just old junk from upgrades?
Reply With Quote
  #14  
Old 08-07-2010, 10:38 PM
NiteWave NiteWave is online now
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
"it's doing nothing" -- may due to a typo in the script: root_dr should be root_dir
Quote:
find "$root_dr/$subdir" -type f -mtime +$max_age_days -delete
Reply With Quote
  #15  
Old 08-08-2010, 07:03 AM
ffeingol ffeingol is offline
Senior Member
 
Join Date: Jul 2007
Location: /dev/null
Posts: 290
OK, I fixed the script (there are actually 2 occurrences of the typo). Will there be a new release that fixes this typo?
Reply With Quote
  #16  
Old 08-08-2010, 08:10 AM
ffeingol ffeingol is offline
Senior Member
 
Join Date: Jul 2007
Location: /dev/null
Posts: 290
Still does not appear to work. If I'm reading the script correctly, it's looking for files in:

/cache/0
/cache/1

etc

but the cache directory is actually organized

/cache/0
/cache/0/0
/cache/0/1
/cache/1
/cache/1/0
/cache/1/1

Can anyone else confirm if this is working or not working?
Reply With Quote
  #17  
Old 08-08-2010, 07:45 PM
anewday anewday is offline
Senior Member
 
Join Date: Nov 2007
Location: New York
Posts: 723
I see this in the error_log right after I upgraded to 4.0.16
Code:
Start to clean up cache directory.
2010-08-08 21:38:49.293 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.300 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.301 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.303 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.304 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.306 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.307 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.309 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.310 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.312 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.313 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.315 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.316 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.318 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.319 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.321 [STDERR] find: invalid predicate `-delete'
LSWS is not configured to use the cache feature.
Reply With Quote
  #18  
Old 08-08-2010, 08:22 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Quote:
Originally Posted by ffeingol View Post
Still does not appear to work. If I'm reading the script correctly, it's looking for files in:

/cache/0
/cache/1

etc

but the cache directory is actually organized

/cache/0
/cache/0/0
/cache/0/1
/cache/1
/cache/1/0
/cache/1/1

Can anyone else confirm if this is working or not working?
It should find all files under all sub-directories.
Reply With Quote
  #19  
Old 08-08-2010, 08:26 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Quote:
Originally Posted by anewday View Post
I see this in the error_log right after I upgraded to 4.0.16
Code:
Start to clean up cache directory.
2010-08-08 21:38:49.293 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.300 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.301 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.303 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.304 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.306 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.307 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.309 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.310 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.312 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.313 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.315 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.316 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.318 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.319 [STDERR] find: invalid predicate `-delete'
2010-08-08 21:38:49.321 [STDERR] find: invalid predicate `-delete'
LSWS is not configured to use the cache feature.
looks like your find command does not support "-delete" action?
Reply With Quote
  #20  
Old 08-10-2010, 06:40 PM
ffeingol ffeingol is offline
Senior Member
 
Join Date: Jul 2007
Location: /dev/null
Posts: 290
Sorry, but this is still doing absolutely nothing. I've changed the:

Code:
# /bin/sh
to

Code:
# /bin/sh -x
So the execution gets logged to the stderr log. From the logs it's in the right directory and looping through all the various sub-directories but nothing actually gets deleted. If I manually run the find command as a -print instead of -delete it does print the files that should get deleted.

Very stumped.
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump


All times are GMT -7. The time now is 11:15 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.