统计ip及此ip访问的pv数#awk‘{s[$1]++}END{for(keyins)printkey,s[key]}‘12.log|sort-k2rn|head统计当前网络各种状态的连接数#netstat-na|awk‘/^tcp/{s[$6]++}END{for(keyins)printkey,s[key]}‘注:awk也支持过滤功能/^tcp/过滤以tcp开头的行#netstat-an|grepESTAB|awk-F"[:]+"..
分类:
编程语言 时间:
2016-05-16 20:12:27
阅读次数:
330
mosquitto ubuntu下编译和安装 开启MQTT: $ mosquitto start 停止MQTT: $ mosquitto stop 查看MQTT状态: $ mosquitto status 查看监听的端口: $ netstat -anplt | grep 1883 测试下, $ mo ...
分类:
移动开发 时间:
2016-05-16 17:12:48
阅读次数:
614
检测脚本如下zabbix_monitor_tcp.sh#!/bin/bash
#thisscriptisusedtogettcpandudpconnetionstatus
#tcpstatus
metric=$1
tmp_file=/tmp/tcp_status.txt
/bin/netstat-an|awk‘/^tcp/{++S[$NF]}END{for(ainS)printa,S[a]}‘>$tmp_file
case$metricin
closed)
output=$(awk‘/CLO..
分类:
其他好文 时间:
2016-05-16 14:41:12
阅读次数:
559
注意:在传统代理的基础上配置透明代理需指定网关1、配置透明代理:1)修改配置文件:支持透明代理[root@www~]#vi/etc/squid.confhttp_port192.168.100.150:3128transparent##将http_port3128修改为支持透明代理[root@www~]#/etc/init.d/squidreload[root@www~]#netstat-utpln|gr..
分类:
系统相关 时间:
2016-05-15 19:58:40
阅读次数:
327
洪水攻击是网络攻击里比较常见的一种,一般体现就是机器慢(CPU居高不下),ssh等网络服务登陆缓慢甚至会出现登陆不上的情况,甚至在#netstat-n|awk‘/^tcp/{++S[$NF]}END{for(ainS)printa,S[a]}‘的命令里,发现SYN_RECV的数量要远远大于ESTABLISHED的数量(几乎是5~8倍以上),..
分类:
其他好文 时间:
2016-05-15 00:45:46
阅读次数:
222
1、进程和端口都成功才算mysql服务正常#!/bin/bashport=`netstat
-ntl|grep3306|wc-l`process=`ps
-ef|grepmysql|grep-vgrep|wc-l`if[$port-eq1]&&[$process-eq2]thenecho"MySQLisrunning"else/etc/init.d/mysqldstartfi2、使用客户端登陆MySQL执行命令,查看返回结果..
分类:
数据库 时间:
2016-05-13 15:40:41
阅读次数:
274
windows 上修改tomcat 的默认端口为 80 【1.】检查 80端口是否被占用 cmd 》netstat -nao | findstr 80 TCP 0.0.0.0:8009 0.0.0.0:0 LISTENING 6892 TCP 0.0.0.0:8080 0.0.0.0:0 LISTE ...
分类:
其他好文 时间:
2016-05-13 10:23:46
阅读次数:
116
netstat -apn 查看所有进程和端口的使用情况,看到9000端口和28080端口被java程序占用,PID分别为17607,1442 ps -aux|grep 17607 ps -aux|grep 1442 可以看到占用9000端口和28080端口的程序。 ...
分类:
系统相关 时间:
2016-05-13 09:46:33
阅读次数:
188
文章转载:http://www.php-note.com/article/detail/793 5.查询端口被占用 netstat -tln netstat -tln | grep 端口号 lsof -i:端口号 kill -9 PID号 6.查找.jira-home.lock文件 [root@bo ...
分类:
编程语言 时间:
2016-05-13 07:58:01
阅读次数:
250
1、进程和端口都成功才算mysql服务正常#!/bin/bashport=`netstat
-ntl|grep3306|wc-l`process=`ps
-ef|grepmysql|grep-vgrep|wc-l`if[$port-eq1]&&[$process-eq2]thenecho"MySQLisrunning"else/etc/init.d/mysqldstartfi2、使用客户端登陆MySQL执行命令,查看返回结果..
分类:
数据库 时间:
2016-05-13 04:43:02
阅读次数:
150