Jump to content

Recommended Posts

Posted

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 ~ #

Posted

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

Posted

Are you still low in disk space?

df -h

 

Find where the disk is being used (almost certianly log files) ((will take a while)):

sudo du -sh /*

 

See where the squid logs are being stored:

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):

sudo su
> /var/log/squid/access.log
exit

Posted

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 ~ #

Posted

Have deleted some files and made 7.5G of space

working at the moment

guess need to free some more space somehow

then setup log rotation and will need help to check it is working

 

WCSLOBSTER ~ # df -h

Filesystem Size Used Avail Use% Mounted on

/dev/sda1 71G 60G 7.5G 89% /

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 60G 7.5G 89% /root/.gvfs

Posted

Check which other logs (or other) are using disk:

sudo du -sh /var/*

From the result of that you can drill down and see which files are using the most disk.

Posted

/var/www is full of logs from last November to 9th march this year can i just delete these or put them on an external hard disk?

could i then with some help set something up to create the logs and then delete them after a certain time?

 

 

WCSLOBSTER ~ # sudo du -sh /var/*

6.7M /var/backups

394M /var/cache

4.0K /var/crash

440M /var/lib

4.0K /var/local

0 /var/lock

5.3G /var/log

12K /var/mail

4.0K /var/opt

288K /var/run

151M /var/spool

8.0K /var/tmp

8.0K /var/webdyne

960K /var/webmin

40G /var/www

WCSLOBSTER ~ #

Posted (edited)
/var/www is full of logs from last November to 9th march this year can i just delete these or put them on an external hard disk?

could i then with some help set something up to create the logs and then delete them after a certain time?

 

A) Check that the content in /var/www _really_ is squid-generated html logs and not web content being served

B) If (as I suspect) they're prettified squid logs in html format, generated from your main squid logs, I'd delete the ones in /var/www (after double-checking that they are generated logs (open one in a text editor) to give you disk space, then compress your main squid logs and back up the compressed log.

 

You can regenerate the html logs from the main squid log if necessary using sarg.

 

If you're not sure, paste a few lines of the logs (anonymised if necessary) in this thread.

Edited by pete
  • Thanks 1
Posted

This is longest that it has stayed up for 6 days

 

Thanks to all you good men that stuck with me and have been very patient, I guess you be hearing more from me

 

looks like there willbe 50GB of free space soon, it was all html type files reporting each users sites visited. pages that were denied etc.

 

how do i compress and backup logs.

the access log in /var/log/squid/access.log is 0KB

the access log in /var/log/squid-ntlm/access.log is 970MB

 

I would also like to try log rotation to conserve space if this is possible

Posted

HI

 

The reason why we are getting the permissions error is because you are loggin in as a normal user you cannot do some of the command. To change system files you have 2 choices use sudo to pretend to be root, or activate and use root.

 

Richard

Posted
This is longest that it has stayed up for 6 days

 

Thanks to all you good men that stuck with me and have been very patient, I guess you be hearing more from me

 

Good to see you've had a change of heart - EduGeek isn't such a bad place after all huh :)

Posted

how do i compress and backup logs.

the access log in /var/log/squid/access.log is 0KB

the access log in /var/log/squid-ntlm/access.log is 970MB

 

I would also like to try log rotation to conserve space if this is possible

 

:):)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...