我需要一个规则来匹配没有设置选项和/或设置特定窗口接收大小的数据包:
IP (tos 0x0, ttl 66, id 9000, offset 0, flags [none], proto TCP (6), length 40) yyyy11111 > xxxxhttp: Flags [S], cksum 0xe425 (正确), seq 17292147256, win length 0
所以这个数据包有 win 715, flags [none] -> 我怎么能匹配这样的数据包?
我知道 linux 上有一个本机命令,它将输出(到标准输出)与某个网络接口(无论是 eth0 等)相关的每个“事件”。
就像有tail -f <file>听文件更改一样......
我就是找不到它。
我想查看所有事件、传入的数据包,甚至是丢弃的数据包。尽可能低。在每个协议(TCP、UDP 等)中。
我认为 WireShark 有点太大了,因为我需要一些非常简单的东西来查看事件,它用于测试。
命令是什么?
我正在尝试在接收新服务器时自动执行一些任务。第一件事是添加一些 yum 存储库。
我的/etc/puppet/modules/repo/manifests/init.pp:
1 class repo {
2 file { "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL":
3 owner => root,
4 group => root,
5 mode => 0644,
6 source => "puppet:///repo/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL"
7 }
8
9 yumrepo {
10 "epel":
11 descr => 'the epel repo',
12 mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch',
13 enable => 1,
14 gpgcheck => 1,
15 gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL",
16 require => File["/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL"]
17 }
18 }
Run Code Online (Sandbox Code Playgroud)
使用puppet parser validate.
但是在连接 puppet 代理时出现以下错误:
# puppet agent --no-daemonize …Run Code Online (Sandbox Code Playgroud) 作为 NginX 重定向的新手,而不是我的正则表达式的忍者,有人可以提供一些关于如何以理智的方式进行以下 301 重定向的要点。
(为糟糕的示例名称道歉)
website.com/what -> website.com/en/what
website.com/team -> website.com/en/team
website.com/stuff -> website.com/en/newstuff
website.com/stuff/this -> website.com/en/newstuff/foo/bar
website.com/stuff/that -> website.com/en/newstuff/thing/page
Run Code Online (Sandbox Code Playgroud)
虽然我希望有人给我确切的答案 - 我会满足于一些好的指示或示例,大致说明我需要做什么或我应该采取的方向。
如果它有助于我在 Ubuntu 11 上运行 nginx 0.8x 并且站点本身是用 CodeIgniter 编写的,
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
19857 mysql 20 0 514m 47m 3404 S 386 9.7 4511:45 mysqld
15659 www-data 20 0 205m 11m 4856 S 7 2.3 0:00.67 apache2
15701 www-data 20 0 205m 11m 4424 S 5 2.2 0:00.19 apache2
15700 www-data 20 0 0 0 0 Z 1 0.0 0:00.02 apache2 <defunct>
Run Code Online (Sandbox Code Playgroud)
这些是我top在 Ubuntu 上的结果。很好奇为什么我的网站今天一直在下降。会是这样吗?
为什么 MySQL 使用 386% 的 CPU?这是正常的吗?我能做些什么来修复它?
我正在寻找一些软件来监控数据包丢失或数据包重试。最好是持续监控而不是测试方法,最好是免费的。
我服务器的操作系统是 debian。我不确定wireshark是否可以做到这一点,因为我无法访问服务器上的图形界面,只能访问文本/SSH。
请问有什么建议吗?
这是我的 vhosts.conf
<VirtualHost *:80>
DocumentRoot "C:/wamp/www"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/wamp/www/images"
ServerName images.localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/wamp/www/project"
ServerName project.localhost
</VirtualHost>
Listen 8080
<VirtualHost *:8080>
DocumentRoot "C:/wamp/www/trunk"
ServerName localhost
</VirtualHost>
<VirtualHost *:8080>
DocumentRoot "C:/wamp/www/images2"
ServerName images2.localhost
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
这是我的 Windows 主机文件
127.0.0.1 project.localhost
127.0.0.1 images.localhost
127.0.0.1 images2.localhost
Run Code Online (Sandbox Code Playgroud)
所以前三个没问题。端口 8080 上的 localhost 工作,我只需转到 localhost:8080 并加载主干内的内容。
images2.localhost:8080 显示 C:/wamp/www/trunk 中的内容,而 images2.localhost 只是转到 wampserver 主页。试过改成这个,但还是一样。
这是我的 ifconfig 文件:http : //pastebin.com/5ZUGYbnB
auto eth0
iface eth0 inet static
address 180.xxx.xx.68
netmask 255.255.255.248
network 180.xxx.xx.64
broadcast 180.xxx.xx.71
gateway 180.xxx.xx.65
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 180.xxx.xx.65 8.8.8.8
auto eth1
iface eth1 inet static
address 10.96.92.23
netmask 255.255.255.0
network 10.96.92.0
broadcast 10.96.92.255
gateway 10.96.92.1
dns-nameservers 10.96.92.11
up route add -net 10.86.82.0 netmask 255.255.255.0 gw 10.96.92.1
down route del -net 10.86.82.0 netmask 255.255.255.0 gw 10.96.92.1
Run Code Online (Sandbox Code Playgroud)
这是我的路由表http://pastebin.com/VVwCe7ZF
Kernel IP routing table
Destination Gateway …Run Code Online (Sandbox Code Playgroud) linux ×3
301-redirect ×1
apache-2.2 ×1
cpu-usage ×1
iptables ×1
memory ×1
mysql ×1
networking ×1
nginx ×1
packetloss ×1
port ×1
puppet ×1
redirect ×1
repository ×1
routing ×1
ssh ×1
subdomain ×1
top ×1
yum ×1