*nix Thread, Squid Proxy Server Keeps Stopping in Technical; Log rotation is done by the 'logrotate' package (cryptic eh?). To install it on an ubuntu machine do the following:
...
-
16th March 2009, 01:26 PM #16 Log rotation is done by the 'logrotate' package (cryptic eh?). To install it on an ubuntu machine do the following:
Code:
apt-get install logrotate
To manually logrotate your squid log files run the following:
Code:
logrotate -f -s /var/lib/logrotate.status /etc/logrotate.d/squid
-
-
IDG Tech News
-
16th March 2009, 02:48 PM #17 next step
i get this far
WCSLOBSTER ~ # sudo /etc/init.d/squid stop
* Stopping Squid HTTP proxy squid [ OK ]
WCSLOBSTER ~ # sudo -s
WCSLOBSTER ~ # /var/log/squid/access.log
bash: /var/log/squid/access.log: Permission denied
WCSLOBSTER ~ #
-
-
16th March 2009, 02:56 PM #18 nearly worked
WCSLOBSTER ~ # apt-get install logrotate
Reading package lists... Done
Building dependency tree
Reading state information... Done
Recommended packages:
mailx
The following packages will be upgraded:
logrotate
1 upgraded, 0 newly installed, 0 to remove and 254 not upgraded.
Need to get 36.9kB of archives.
After this operation, 0B of additional disk space will be used.
Get: 1 Index of / hardy-updates/main logrotate 3.7.1-3ubuntu0.8.04 [36.9kB]
Fetched 36.9kB in 0s (105kB/s)
(Reading database ... 117927 files and directories currently installed.)
Preparing to replace logrotate 3.7.1-3 (using .../logrotate_3.7.1-3ubuntu0.8.04_i386.deb) ...
Unpacking replacement logrotate ...
Setting up logrotate (3.7.1-3ubuntu0.8.04) ...
WCSLOBSTER ~ # logrotate -f -s /var/lib/logrotate.status /etc/logrotate.d/squid
2009/03/16 14:56:14| WARNING: Very large maximum_object_size_in_memory settings can have negative impact on performance
squid: ERROR: Could not send signal 10 to process 6670: (3) No such process
error: error running shared postrotate script for /var/log/squid/*.log
WCSLOBSTER ~ #
-
-
16th March 2009, 03:03 PM #19 how can i can clear this /dev/sda1 71G 68G 0 100% /
-
-
16th March 2009, 03:52 PM #20 Help
Has stopped working all together now
-
-
16th March 2009, 04:02 PM #21 
Originally Posted by
wellscs
Has stopped working all together now
What did you do to stop it working?
-
-
16th March 2009, 04:02 PM #22 To clear the log file.
From a terminal, type:
Code:
sudo /etc/init.d/squid stop
If you care about the logs (ideally you should), plug in a removable hard disk and copy the squid logs to it - there's not enough space to compress them on your drive at the moment. If you're running the gnome desktop it should automount the usb drive.
If you don't care about the log file type:
then type:
Code:
> /var/log/squid/access.log
which will zero the contents of the log file (make it blank and take up no space) , but keep it and the permissions in place. Type exit to discard root credentials then type:
Code:
sudo /etc/init.d/squid start
-
-
17th March 2009, 08:27 AM #23 still no luck
I can only get this far
sudo /etc/init.d/squid stop
* Stopping Squid HTTP proxy squid [ OK ]
WCSLOBSTER ~ # /var/log/squid/access.log
bash: /var/log/squid/access.log: Permission denied
nit working at all now
-
-
17th March 2009, 08:30 AM #24 does this mean this bit is working?
WCSLOBSTER ~ # sudo /etc/init.d/squid stop
* Stopping Squid HTTP proxy squid [ OK ]
WCSLOBSTER ~ # /var/log/squid/access.log
bash: /var/log/squid/access.log: Permission denied
WCSLOBSTER ~ # logrotate -f -s /var/lib/logrotate.status /etc/logrotate.d/squid
WCSLOBSTER ~ # apt-get install logrotate
Reading package lists... Done
Building dependency tree
Reading state information... Done
logrotate is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 262 not upgraded.
WCSLOBSTER ~ # logrotate -f -s /var/lib/logrotate.status /etc/logrotate.d/squid
WCSLOBSTER ~ #
Sorry do all that i am beeing such a pain this is like a new language to me
-
-
17th March 2009, 08:34 AM #25 Did you type the sudo -s line before you entered /var/log/squid/access.log?
Just seems that you aren't carrying out the tasks as a super user therefore you don't have permissions.
-
-
17th March 2009, 08:36 AM #26 P.S. the apt-install lines will need to be carried out as a super user too - just type sudo prior to the command.
-
-
17th March 2009, 08:44 AM #27 getting confused now
seems the laccess log is in th wrong place? can we create a new one?
WCSLOBSTER ~ # sudo -s
WCSLOBSTER ~ # sudo /etc/init.d/squid stop
* Stopping Squid HTTP proxy squid [ OK ]
WCSLOBSTER ~ # sudo -s
WCSLOBSTER ~ # /var/log/squid/access.log
bash: /var/log/squid/access.log: No such file or directory
WCSLOBSTER ~ # /var/log/squid/access.log
bash: /var/log/squid/access.log: No such file or directory
WCSLOBSTER ~ # /var/log/squid/access.log
bash: /var/log/squid/access.log: No such file or directory
WCSLOBSTER ~ # /var/log/squid-ntlm/access.log
bash: /var/log/squid-ntlm/access.log: Permission denied
WCSLOBSTER ~ #
-
-
17th March 2009, 09:10 AM #28 startup
sudo /etc/init.d/squid start
* Starting Squid HTTP proxy squid 2009/03/17 09:10:23| WARNING: Very large maximum_object_size_in_memory settings can have negative impact on performance
-
-
17th March 2009, 09:31 AM #29
- Rep Power
- 11
Are you still low in disk space?
Find where the disk is being used (almost certianly log files) ((will take a while)):
See where the squid logs are being stored:
Code:
sudo cat /etc/squid/squid.conf | grep _log
Then you can do what pete said (note the leading chevron, without that you're executing the file):
Code:
sudo su
> /var/log/squid/access.log
exit
-
-
17th March 2009, 09:55 AM #30 this is what i get
Still seems to be using all the disk space
WCSLOBSTER ~ # df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 71G 67G 336M 100% /
varrun 1013M 288K 1013M 1% /var/run
varlock 1013M 0 1013M 0% /var/lock
udev 1013M 68K 1013M 1% /dev
devshm 1013M 12K 1013M 1% /dev/shm
lrm 1013M 38M 976M 4% /lib/modules/2.6.24-16-generic/volatile
gvfs-fuse-daemon 71G 67G 336M 100% /root/.gvfs
WCSLOBSTER ~ # sudo du -sh /*
5.2M /bin
20M /boot
0 /cdrom
104K /dev
81M /etc
13M /home
4.0K /initrd
0 /initrd.img
175M /lib
16K /lost+found
8.0K /media
4.0K /mnt
134M /opt
du: cannot access `/proc/7634/task/7634/fd/4': No such file or directory
du: cannot access `/proc/7634/task/7634/fdinfo/4': No such file or directory
du: cannot access `/proc/7634/fd/4': No such file or directory
du: cannot access `/proc/7634/fdinfo/4': No such file or directory
0 /proc
12G /root
4.0K /rsync
9.0M /sbin
4.0K /SDB
7.0G /squid
4.0K /srv
0 /sys
116K /tmp
2.2G /usr
46G /var
0 /vmlinuz
WCSLOBSTER ~ # sudo cat /etc/squid/squid.conf | grep _log
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
WCSLOBSTER ~ # sudo su
WCSLOBSTER ~ # > /var/log/squid/access.log
WCSLOBSTER ~ # exit
exit
WCSLOBSTER ~ # df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 71G 67G 334M 100% /
varrun 1013M 288K 1013M 1% /var/run
varlock 1013M 0 1013M 0% /var/lock
udev 1013M 68K 1013M 1% /dev
devshm 1013M 12K 1013M 1% /dev/shm
lrm 1013M 38M 976M 4% /lib/modules/2.6.24-16-generic/volatile
gvfs-fuse-daemon 71G 67G 334M 100% /root/.gvfs
WCSLOBSTER ~ #
-
SHARE: 
Similar Threads
-
By Lee_K_81 in forum *nix
Replies: 14
Last Post: 20th January 2009, 11:04 AM
-
Replies: 19
Last Post: 15th October 2008, 02:44 PM
-
By cuke2u in forum MIS Systems
Replies: 8
Last Post: 18th July 2008, 02:34 PM
-
By Jackd in forum Network and Classroom Management
Replies: 2
Last Post: 25th July 2007, 06:54 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules