LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-04-2010, 06:10 AM   #1
fernfrancis
Member
 
Registered: Feb 2009
Location: Goa(India)-Sharjah(UAE)
Distribution: RHEL,centos,fedora,ubuntu
Posts: 229

Rep: Reputation: 18
squid problem


hi i have squid running in my network the problem i am facing is that once a week the squid service is dead, i checked the log files bu could not figure out what the problem is it gives me the error
squid dead but pid file exist
squid error no running copy

i have written a script that just moves the compressed log files from the /var/log/squid files to /media/usbdisk the script is as follows i suspect that this problem arises because of the script coz the script runs every week and the next day i get this problem

#!/bin/bash
cd /var/log/squid
YMD="`date +%d%b%y`"
echo "------------------------------------------------" >> ~/squid_script/log
echo -e "backup of squid logs on $YMD\n" >> ~/squid_script/log
echo "------------------------------------------------" >> ~/squid_script/log
for file in a*.gz
do
echo -e "renamed file $file to $file$YMD " >> ~/squid_script/log
mv $file /media/usbdisk/squid/access/$file$YMD
echo -e "file $file$YMD transfered to /media/usbdisk/squid/access/ \n" >> ~/squid_script/log
done

for file in c*.gz
do
echo -e "renamed file $file to $file$YMD " >> ~/squid_script/log
mv $file /media/usbdisk/squid/$file$YMD
echo -e "file $file$YMD transfered to /media/usbdisk/squid/cache/ \n" >> ~/squid_script/log
done

for file in s*.gz
do
echo $file
echo -e "renamed file $file to $file$YMD " >> ~/squid_script/log
mv $file /media/usbdisk/squid/store/$file$YMD
echo -e "file $file$YMD transfered to /media/usbdisk/squid/store/ \n" >> ~/squid_script/log
done
echo "------------------------------------------------" >> ~/squid_script/log


please if anyone find something that is causing the problem in the script please rectify it for me me.
 
Old 05-04-2010, 09:36 AM   #2
fernfrancis
Member
 
Registered: Feb 2009
Location: Goa(India)-Sharjah(UAE)
Distribution: RHEL,centos,fedora,ubuntu
Posts: 229

Original Poster
Rep: Reputation: 18
please help me on this issue
 
Old 05-04-2010, 10:23 AM   #3
markotitel
Member
 
Registered: Feb 2009
Location: Titel - Serbia
Posts: 175

Rep: Reputation: 18
Maybe it is because you move the log file so squid dont find it anymore and freezes? Just a gues though . .
 
Old 05-04-2010, 10:52 AM   #4
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,424

Rep: Reputation: 2823Reputation: 2823Reputation: 2823Reputation: 2823Reputation: 2823Reputation: 2823Reputation: 2823Reputation: 2823Reputation: 2823Reputation: 2823Reputation: 2823
What is the purpose of your script?
Is this in an aide to reduce disk usage?

I would agree withmarkotitel as it seems you move the file to the new location which in effect breaks the connection that
squid has to all these logs.
I would be guessing but it appears you would have to do something like empty the contents into a file on your USB drive rather than break than connection
 
Old 05-05-2010, 12:45 AM   #5
fernfrancis
Member
 
Registered: Feb 2009
Location: Goa(India)-Sharjah(UAE)
Distribution: RHEL,centos,fedora,ubuntu
Posts: 229

Original Poster
Rep: Reputation: 18
yes your absolutely right, the script is to reduce disk utilization
how do i overcome this , actually i move the files which are rotated weekly not the current log files ,
even i had the same feeling but was not sure, any way to overcome this as my hard drive gets full with the squid logs weekly
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with configuration of Squid server behind a squid ajitup Linux - Server 13 08-12-2009 11:55 PM
Squid Problem (squid restrict some trusted sites.). jpmaxyusuf Linux - Networking 3 01-01-2009 12:33 PM
Squid Problem rdesai Linux - Networking 1 04-21-2006 07:04 AM
squid problem supon Linux - Networking 0 10-05-2004 11:24 AM
squid problem htm Linux - Networking 22 04-11-2004 04:50 AM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration