Squid Chinese authoritative guide (III)-Linux Enterprise Application-Linux server application information. The following is a detailed description. [I = s] This post was last edited by gary168 at 3-3-25 20:01.
You can use the chroot command to test the Helper Program:
# Chroot/new/root/directory/usr/local/squid/libexec/ncsa_auth
/Usr/libexec/ld-elf.so.1: Shared object "libcrypt. so.2" not found
For more information about chroot, see the chroot () manpage in your system.
5.8 stop squid
The safest way to stop squid is to use the squid-k shutdown command:
% Squid-k shutdown
This command sends the TERM signal to the running squid process. After receiving the TERM signal, squid closes the incoming socket to reject the new request. Then it waits for a while to complete the outgoing request. The default time is 30 seconds. You can change it in the shutdown_lifetime command.
For some reason, if the squid. pid file is lost or unreadable, the squid-k Command fails. In this case, you can use ps to find the squid process ID, and then manually kill squid. For example:
% Ps ax | grep squid
If you see more than one squid process, please kill the one displayed as (squid. For example:
% Ps ax | grep squid
294 ?? Is 0: 00. 01 squid-sD
296 ?? S 0: 00. 27 (squid)-sD (squid)
% Kill-TERM 296
After sending the TERM signal, you may want to view the log to confirm that squid is disabled:
% Tail-f logs/cache. log
21:49:30 | Preparing for shutdown after 9316 requests
21:49:30 | Waiting 10 seconds for active connections to finish
21:49:30 | FD 11 Closing HTTP connection
21:49:31 | Shutting down...
21:49:31 | FD 12 Closing ICP connection
21:49:31 | Closing unlinkd pipe on FD 9
21:49:31 | storeDirWriteCleanLogs: Starting...
21:49:32 | Finished. Wrote 253 entries.
21:49:32 | Took 0.1 seconds (1957.6 entries/sec ).
21:49:32 | Squid Cache (Version 2.5.STABLE4): Exiting normally.
If you use the squid-k interrupt command, squid immediately closes without waiting to complete the activity request. This is the same as sending an INT signal in kill.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service