Search squid archive

Re: How to tell when Squid has finished setting up disk cache directories?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 4/10/2014 1:47 a.m., Stephen Baynes wrote:
> At times we automatically start Squid from a clean setup. We run
> squid -z to create the cache directories and then start Squid for
> normal operation. The question is how to know when squid -z has
> finished and it is safe to start Squid for normal operation.
> 
> This is not a problem when one has one squid worker, one uses the
> -N (don't background) option as well and just waits for the process
> to finish.
> 
> However we want to use Squid with multiple workers and the problem
> is the -N option overrides the number of workers and it sets up
> only one cache directory. (Squid has one cache directory per
> worker.) If one does not wait then when Squid starts for normal
> operation the cache directories are not ready and it fails.
> 
> One can't even use the PID file to find out a process to wait for,
> as it seems that it does not even write a PID file when the -z
> option is used.
> 
> Any ideas on how to find out when it is finished creating the cache
> directories?


This appears to be one of the little details that have not been
polished yet with SMP.

What I have been doing for this type of check is looking in /dev/shm
(on Linux, may not be there on other OS) to see if the SMP sockets are
still active. Squid removes the SHM device "files" when its done.

Amos

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)

iQEcBAEBAgAGBQJULvRvAAoJELJo5wb/XPRj7/8H/iNVD3ND5TmZIhk2MtzX3Vg/
fhfeYEQnAGBAcKgtVwVNPihI6EsVktZt9OcNWajQkkv8hPLSQ4IQBVSI4NgXzAa9
6tYhEtSydoYjWevjKcwf0Wyea6TXIcULUFEz5dVsu8ISflHisDdqYAgQZM691RCD
p8P+W0wdPeF7KIqX214aADHr1m/t0hfjkEHW5M5KRIN6O1IN4wOg38H5u3qhJM/z
j5qgcoNL+8pKGA4dasurQRe8yVCgeNVQp9ipFZw7U0oQ3+oVXH2n+9MWYP+QaZMi
nLipoGEkj5BNd1bEvklArWUyQBcbUb64bCbTXQl8Dhse8qthWQX7LhHWXNZbOoI=
=eEx1
-----END PGP SIGNATURE-----
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users





[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux