- 论坛徽章:
- 0
|
本帖最后由 dwm123 于 2010-05-25 10:30 编辑
[root@slave logs]# /usr/local/squid/sbin/squid -z
2010/05/24 17:04:28| Creating Swap Directories
2010/05/24 17:04:28| /usr/local/squid/var/cache exists
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/00
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/01
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/02
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/03
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/04
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/05
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/06
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/07
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/08
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/09
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/0A
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/0B
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/0C
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/0D
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/0E
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/0F
[root@slave logs]#[/usr/local/squid/sbin/squid -NCd1
2010/05/24 17:04:45| Starting Squid Cache version 3.0.STABLE9 for i686-pc-linux-gnu...
2010/05/24 17:04:45| Process ID 20611
2010/05/24 17:04:45| With 1024 file descriptors available
2010/05/24 17:04:45| Performing DNS Tests...
2010/05/24 17:04:45| Successful DNS name lookup tests...
2010/05/24 17:04:45| helperOpenServers: Starting 5 'dnsserver' processes
2010/05/24 17:04:45| User-Agent logging is disabled.
2010/05/24 17:04:45| Referer logging is disabled.
2010/05/24 17:04:45| Swap maxSize 102400 KB, estimated 7876 objects
2010/05/24 17:04:45| Target number of buckets: 393
2010/05/24 17:04:45| Using 8192 Store buckets
2010/05/24 17:04:45| Max Mem size: 102400 KB
2010/05/24 17:04:45| Max Swap size: 102400 KB
2010/05/24 17:04:45| Rebuilding storage in /usr/local/squid/var/cache (DIRTY)
2010/05/24 17:04:45| Using Least Load store dir selection
2010/05/24 17:04:45| Set Current Directory to /usr/local/squid/var/cache
2010/05/24 17:04:45| Loaded Icons.
2010/05/24 17:04:45| Accepting transparently proxied HTTP connections at 0.0.0.0, port 3128, FD 13.
2010/05/24 17:04:45| Accepting ICP messages at 0.0.0.0, port 3130, FD 14.
2010/05/24 17:04:45| HTCP Disabled.
2010/05/24 17:04:45| Pinger socket opened on FD 16
2010/05/24 17:04:45| Ready to serve requests.
2010/05/24 17:04:46| Done scanning /usr/local/squid/var/cache swaplog (0 entries)
2010/05/24 17:04:46| Finished rebuilding storage from disk.
2010/05/24 17:04:46| 0 Entries scanned
2010/05/24 17:04:46| 0 Invalid entries.
2010/05/24 17:04:46| 0 With invalid flags.
2010/05/24 17:04:46| 0 Objects loaded.
2010/05/24 17:04:46| 0 Objects expired.
2010/05/24 17:04:46| 0 Objects cancelled.
2010/05/24 17:04:46| 0 Duplicate URLs purged.
2010/05/24 17:04:46| 0 Swapfile clashes avoided.
2010/05/24 17:04:46| Took 0.84 seconds ( 0.00 objects/sec).
2010/05/24 17:04:46| Beginning Validation Procedure
2010/05/24 17:04:46| Completed Validation Procedure
2010/05/24 17:04:46| Validated 25 Entries
2010/05/24 17:04:46| store_swap_size = 0
2010/05/24 17:04:46| storeLateRelease: released 0 objects --- 问题1:为什么一直停留在此,这样是否正确
在/usr/local/squid/var/logs和/usr/local/squid/var/cache下面会生成如下文件。而且此时squid是运行状态
[root@slave logs]# lsof -i:3128
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
squid 20611 nobody 13u IPv4 75083 TCP *:squid (LISTEN)
[root@slave logs]# pwd
/usr/local/squid/var/logs
[root@slave logs]# ll
total 8
-rw-r----- 1 nobody nobody 0 May 24 2010 access.log
-rw-r----- 1 nobody nobody 3397 May 24 2010 cache.log
-rw-r--r-- 1 root nobody 6 May 24 2010 squid.pid
-rw-r----- 1 nobody nobody 0 May 24 2010 store.log
[root@slave logs]# cd ../cache/
[root@slave cache]# pwd
/usr/local/squid/var/cache
[root@slave cache]# ll
total 68
drwxr-x--- 258 nobody nobody 4096 May 24 15:08 00
drwxr-x--- 258 nobody nobody 4096 May 24 15:08 01
drwxr-x--- 258 nobody nobody 4096 May 24 15:08 02
drwxr-x--- 258 nobody nobody 4096 May 24 15:08 03
drwxr-x--- 258 nobody nobody 4096 May 24 15:08 04
drwxr-x--- 258 nobody nobody 4096 May 24 15:08 05
drwxr-x--- 258 nobody nobody 4096 May 24 15:08 06
drwxr-x--- 258 nobody nobody 4096 May 24 15:08 07
drwxr-x--- 258 nobody nobody 4096 May 24 15:08 08
drwxr-x--- 258 nobody nobody 4096 May 24 15:08 09
drwxr-x--- 258 nobody nobody 4096 May 24 15:08 0A
drwxr-x--- 258 nobody nobody 4096 May 24 15:08 0B
drwxr-x--- 258 nobody nobody 4096 May 24 15:08 0C
drwxr-x--- 258 nobody nobody 4096 May 24 15:08 0D
drwxr-x--- 258 nobody nobody 4096 May 24 15:08 0E
drwxr-x--- 258 nobody nobody 4096 May 24 15:08 0F
-rw-r----- 1 nobody nobody 0 May 24 16:21 netdb_state
-rw-r----- 1 nobody nobody 52 May 24 15:41 swap.state
如果人为停止/usr/local/squid/sbin/squid -NCd1 命令,会提示如下内容。而且squid进程将停止运行
[root@slave logs]# /usr/local/squid/sbin/squid -NCd1
2010/05/24 17:04:45| Starting Squid Cache version 3.0.STABLE9 for i686-pc-linux-gnu...
2010/05/24 17:04:45| Process ID 20611
2010/05/24 17:04:45| With 1024 file descriptors available
2010/05/24 17:04:45| Performing DNS Tests...
2010/05/24 17:04:45| Successful DNS name lookup tests...
2010/05/24 17:04:45| helperOpenServers: Starting 5 'dnsserver' processes
2010/05/24 17:04:45| User-Agent logging is disabled.
2010/05/24 17:04:45| Referer logging is disabled.
2010/05/24 17:04:45| Swap maxSize 102400 KB, estimated 7876 objects
2010/05/24 17:04:45| Target number of buckets: 393
2010/05/24 17:04:45| Using 8192 Store buckets
2010/05/24 17:04:45| Max Mem size: 102400 KB
2010/05/24 17:04:45| Max Swap size: 102400 KB
2010/05/24 17:04:45| Rebuilding storage in /usr/local/squid/var/cache (DIRTY)
2010/05/24 17:04:45| Using Least Load store dir selection
2010/05/24 17:04:45| Set Current Directory to /usr/local/squid/var/cache
2010/05/24 17:04:45| Loaded Icons.
2010/05/24 17:04:45| Accepting transparently proxied HTTP connections at 0.0.0.0, port 3128, FD 13.
2010/05/24 17:04:45| Accepting ICP messages at 0.0.0.0, port 3130, FD 14.
2010/05/24 17:04:45| HTCP Disabled.
2010/05/24 17:04:45| Pinger socket opened on FD 16
2010/05/24 17:04:45| Ready to serve requests.
2010/05/24 17:04:46| Done scanning /usr/local/squid/var/cache swaplog (0 entries)
2010/05/24 17:04:46| Finished rebuilding storage from disk.
2010/05/24 17:04:46| 0 Entries scanned
2010/05/24 17:04:46| 0 Invalid entries.
2010/05/24 17:04:46| 0 With invalid flags.
2010/05/24 17:04:46| 0 Objects loaded.
2010/05/24 17:04:46| 0 Objects expired.
2010/05/24 17:04:46| 0 Objects cancelled.
2010/05/24 17:04:46| 0 Duplicate URLs purged.
2010/05/24 17:04:46| 0 Swapfile clashes avoided.
2010/05/24 17:04:46| Took 0.84 seconds ( 0.00 objects/sec).
2010/05/24 17:04:46| Beginning Validation Procedure
2010/05/24 17:04:46| Completed Validation Procedure
2010/05/24 17:04:46| Validated 25 Entries
2010/05/24 17:04:46| store_swap_size = 0
2010/05/24 17:04:46| storeLateRelease: released 0 objects
2010/05/24 09:42:17| Killing RunCache, pid 20543
2010/05/24 09:42:17| kill 20543: (1) Operation not permitted
2010/05/24 09:42:17| Preparing for shutdown after 0 requests
2010/05/24 09:42:17| Waiting 0 seconds for active connections to finish
2010/05/24 09:42:17| FD 13 Closing HTTP connection
2010/05/24 09:42:17| Closing Pinger socket on FD 16
2010/05/24 09:42:18| Shutting down...
2010/05/24 09:42:18| FD 14 Closing ICP connection
2010/05/24 09:42:18| storeDirWriteCleanLogs: Starting...
2010/05/24 09:42:18| Finished. Wrote 0 entries.
2010/05/24 09:42:18| Took 0.00 seconds ( 0.00 entries/sec).
squid就停止了运行
[root@slave logs]# netstat -nplt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN 2167/hpiod
tcp 0 0 0.0.0.0:865 0.0.0.0:* LISTEN 1955/rpc.statd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1922/portmap
tcp 0 0 192.168.85.2:53 0.0.0.0:* LISTEN 2983/named
tcp 0 0 6.3.16.15:53 0.0.0.0:* LISTEN 2983/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 2983/named
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2198/cupsd
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 2983/named
tcp 0 0 127.0.0.1:2207 0.0.0.0:* LISTEN 2172/python
tcp 0 0 ::1:53 :::* LISTEN 2983/named
tcp 0 0 :::22 :::* LISTEN 2187/sshd
tcp 0 0 ::1:953 :::* LISTEN 2983/named
下面是logs信息
[root@slave logs]# ll
total 8
-rw-r----- 1 nobody nobody 0 May 24 2010 access.log
-rw-r----- 1 nobody nobody 4542 May 24 09:42 cache.log
-rw-r----- 1 nobody nobody 0 May 24 2010 store.log
[root@slave logs]# cat cache.log
2010/05/24 17:04:28| Creating Swap Directories
2010/05/24 17:04:28| /usr/local/squid/var/cache exists
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/00
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/01
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/02
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/03
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/04
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/05
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/06
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/07
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/08
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/09
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/0A
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/0B
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/0C
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/0D
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/0E
2010/05/24 17:04:28| Making directories in /usr/local/squid/var/cache/0F
2010/05/24 17:04:45| Starting Squid Cache version 3.0.STABLE9 for i686-pc-linux-gnu...
2010/05/24 17:04:45| Process ID 20611
2010/05/24 17:04:45| With 1024 file descriptors available
2010/05/24 17:04:45| Performing DNS Tests...
2010/05/24 17:04:45| Successful DNS name lookup tests...
2010/05/24 17:04:45| helperOpenServers: Starting 5 'dnsserver' processes
2010/05/24 17:04:45| User-Agent logging is disabled.
2010/05/24 17:04:45| Referer logging is disabled.
2010/05/24 17:04:45| Swap maxSize 102400 KB, estimated 7876 objects
2010/05/24 17:04:45| Target number of buckets: 393
2010/05/24 17:04:45| Using 8192 Store buckets
2010/05/24 17:04:45| Max Mem size: 102400 KB
2010/05/24 17:04:45| Max Swap size: 102400 KB
2010/05/24 17:04:45| Rebuilding storage in /usr/local/squid/var/cache (DIRTY)
2010/05/24 17:04:45| Using Least Load store dir selection
2010/05/24 17:04:45| Set Current Directory to /usr/local/squid/var/cache
2010/05/24 17:04:45| Loaded Icons.
2010/05/24 17:04:45| Accepting transparently proxied HTTP connections at 0.0.0.0, port 3128, FD 13.
2010/05/24 17:04:45| Accepting ICP messages at 0.0.0.0, port 3130, FD 14.
2010/05/24 17:04:45| HTCP Disabled.
2010/05/24 17:04:45| Pinger socket opened on FD 16
2010/05/24 17:04:45| Ready to serve requests.
2010/05/24 17:04:46| Done scanning /usr/local/squid/var/cache swaplog (0 entries)
2010/05/24 17:04:46| Finished rebuilding storage from disk.
2010/05/24 17:04:46| 0 Entries scanned
2010/05/24 17:04:46| 0 Invalid entries.
2010/05/24 17:04:46| 0 With invalid flags.
2010/05/24 17:04:46| 0 Objects loaded.
2010/05/24 17:04:46| 0 Objects expired.
2010/05/24 17:04:46| 0 Objects cancelled.
2010/05/24 17:04:46| 0 Duplicate URLs purged.
2010/05/24 17:04:46| 0 Swapfile clashes avoided.
2010/05/24 17:04:46| Took 0.84 seconds ( 0.00 objects/sec).
2010/05/24 17:04:46| Beginning Validation Procedure
2010/05/24 17:04:46| Completed Validation Procedure
2010/05/24 17:04:46| Validated 25 Entries
2010/05/24 17:04:46| store_swap_size = 0
2010/05/24 17:04:46| storeLateRelease: released 0 objects
2010/05/24 09:42:17| Killing RunCache, pid 20543
2010/05/24 09:42:17| kill 20543: (1) Operation not permitted
2010/05/24 09:42:17| Preparing for shutdown after 0 requests
2010/05/24 09:42:17| Waiting 0 seconds for active connections to finish
2010/05/24 09:42:17| FD 13 Closing HTTP connection
2010/05/24 09:42:17| Closing Pinger socket on FD 16
2010/05/24 09:42:18| Shutting down...
2010/05/24 09:42:18| FD 14 Closing ICP connection
2010/05/24 09:42:18| storeDirWriteCleanLogs: Starting...
2010/05/24 09:42:18| Finished. Wrote 0 entries.
2010/05/24 09:42:18| Took 0.00 seconds ( 0.00 entries/sec).
CPU Usage: 0.200 seconds = 0.032 user + 0.168 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
total space in arena: 3428 KB
Ordinary blocks: 3296 KB 8 blks
Small blocks: 0 KB 1 blks
Holding blocks: 1512 KB 7 blks
Free Small blocks: 0 KB
Free Ordinary blocks: 131 KB
Total in use: 4808 KB 140%
Total free: 131 KB 4%
2010/05/24 09:42:18| Squid Cache (Version 3.0.STABLE9): Exiting normally.
[root@slave var]# pwd
/usr/local/squid/var
[root@slave var]# ll
total 8
drwxrwxr-x 18 root nobody 4096 May 24 09:42 cache
drwxrwxr-x 2 root nobody 4096 May 24 09:42 logs --nobody已经有了写的权限了
问题2:tar的squid启动时使用/usr/local/squid/sbin/squid -z 和 /usr/local/squid/sbin/squid -NCd1命令,不知道停止用什么命令 |
|