Chinaunix首页 | 论坛 | 博客
  • 博客访问: 11492440
  • 博文数量: 48
  • 博客积分: 7017
  • 博客等级: 少将
  • 技术积分: 2073
  • 用 户 组: 普通用户
  • 注册时间: 2006-08-24 09:50
文章分类

全部博文(48)

文章存档

2011年(4)

2010年(15)

2009年(15)

2008年(14)

我的朋友

分类: LINUX

2010-02-08 14:58:08

1、端口连接数统计:
  netstat -n |awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
  状态:描述
  CLOSED:无连接是活动的或正在进行
  LISTEN:服务器在等待进入呼叫
  SYN_RECV:一个连接请求已经到达,等待确认
  SYN_SENT:应用已经开始,打开一个连接
  ESTABLISHED:正常数据传输状态
  FIN_WAIT1:应用说它已经完成
  FIN_WAIT2:另一边已同意释放
  ITMED_WAIT:等待所有分组死掉
  CLOSING:两边同时尝试关闭
  TIME_WAIT:另一边已初始化一个释放
  LAST_ACK:等待所有分组死掉
2、resin3.1 pro jvm调参(配置文件中resin.conf):
JAVA_OPTS="-server -Xms1024m -Xmx1024m -XX:PermSize=256M -XX:MaxNewSize=256m -XX:MaxPermSize=256m -Djava.awt.headless=true "

-Xms1024m
-Xmx1024m
-Xmn256m
-XX:PermSize=128m
-XX:MaxPermSize=256m
-Dcom.sun.management.jmxremote
3、观测进程名包含某个字符串的进程详细信息:
#!/bin/sh
top -c -p $(ps -ef|grep 进程名关键字|gawk '$0 !~/grep/ {print $2}' |tr -s '\n' ','|sed 's/,$/\n/')
 
4、删除7天以前文件
find /var/log -type f -mtime +7 -exec rm -rf {} \;   
 
5、cisco asa 5520脚本:
static (inside,dcn) udp interface 8000 192.168.180.161 1194 netmask 255.255.255.255
access-list DCN_access_in extended permit udp any host 132.227.140.125 object-group ASA-outside-udp
access-list DCN_access_in extended permit tcp any host 132.227.140.125  object-group ASA-outside-tcp

object-group service qq-interface-DCN-out tcp
 port-object eq 8000
exit
object-group network qq-interface
 network-object host 192.168.181.48
 network-object host 192.168.181.49
 network-object host 192.168.181.50
 network-object host 192.168.181.51
exit
access-list inside_access_in extended permit tcp object-group qq-interface host 132.227.64.193 object-group qq-interface-DCN-out
static (dmz,outside) 111.111.111.111 172.33.0.8 netmask 255.255.255.255 
static (dmz,outside) 111.111.111.111 172.33.0.9 netmask 255.255.255.255 
access-list outside_access_in extended permit tcp any host 111.111.111.112 eq 80
access-list outside_access_in extended permit tcp any host 111.111.111.111 eq 80
static (inside,dmz) 172.33.0.88 192.168.180.148 netmask 255.255.255.255 
static (inside,dmz) 172.33.0.89 192.168.180.149 netmask 255.255.255.255 
static (inside,dmz) 172.33.0.90 192.168.180.150 netmask 255.255.255.255 

object-group service qq-web-DMZ tcp
 port-object eq 8080
 port-object eq 8081
exit
access-list DMZ_access_in extended permit tcp any host 172.33.0.88  object-group qq-web-DMZ
access-list DMZ_access_in extended permit tcp any host 172.33.0.89  object-group qq-web-DMZ
access-list DMZ_access_in extended permit tcp any host 172.33.0.90  object-group qq-web-DMZ
阅读(1423) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~