一个对某进程的监控的shell

Written by ray on 2007/07/17 17:37
#!/bin/bash
#
#################################
# Purpose: Check Squid Status
# Author: Allen.Zheng , E-Mail ( allenzheng DOT sh AT gmail DOT com)
# Date: 2007/07/17
#################################
#
#################################

if [ -z "`pgrep squid`" ];
then
sendEmail -f squid-status-report@226.com -t 我邮箱 -u "squid-status-report" -m "Help me! I\`m Crash. `date`"
else
echo "I\`m ok"
fi
Tags: ,

GRUB里的splash VGA参数

Written by ray on 2007/07/12 09:10

VGA Codes 参数一览表:

 640x480800x6001024x7681280x1024
256 colors 768 771 773 775
32K colors 784 787 790 793
64K colors 785 788 791 794
16M colors 786 789 792 795

Tags: , ,

Squid+iptables做透明代理

Written by ray on 2007/07/11 20:36
公司使用代理的作用
1.起到过滤网页的作用,
2.因为用到了缓存功能,也有加速网页浏览的功能。
3.还能做到一些其他功能,如限制链接数、限制工作时上网时间,主要起到监控作用。

/etc/squid/squid.conf文件

http_port 3288
#设代理端口为3288
icp_query_timeout 2000
maximum_icp_query_timeout 2000
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
#acl msn req_mime_type ^application/x-msn-messenger$
#http_access deny msn
cache_mem 1000 MB
#缓存1G
cache_swap_low 90
cache_swap_high 95
maximum_object_size 4096 KB
maximum_object_size_in_memory 8 KB
ipcache_size 1024
ipcache_low 90
ipcache_high 95
cache_dir ufs /var/spool/squid 10240 32 256
cache_access_log /var/log/squid/access.log
#日志文件
cache_log /var/log/squid/cache.log
emulate_httpd_log on
log_ip_on_direct on
#forwarded_for off
log_mime_hdrs off
debug_options ALL,1
log_fqdn off
hosts_file /etc/hosts
request_header_max_size 20 KB
request_body_max_size 5000 KB

refresh_pattern ^ftp:    1440  20%  10080
refresh_pattern ^gopher:  1440  0%  1440
refresh_pattern .    0  20%  4320
分页: 5/5 第一页 上页 1 2 3 4 5 最后页 [ 显示模式: 摘要 | 列表 ]