服务器常用命令


<pre>查看磁盘 df -h , du -hs /var<br>tcpdump port 80</pre>
<pre>vmstat -n 2</pre>
<pre>squidclient -p3128 cache_object://localhost/info </pre>
<pre>查看连接命令         netstat -an|grep EST|awk "{print $3}"|awk -F":" "{print $1}"|sort|uniq -c|sort    </pre>
<pre>封禁连入的ip          iptables -A INPUT -p tcp --dport 80 -s xxx.xxx.xxx.xxx -j DROP</pre>
<pre>检查named错误的命令      grep named /var/log/messages | tail -n 20</pre>
<pre>
<font size="2">跟踪dns查询      dig @202.103.0.117 www.hssygz.com</font>
<span style="font-family: mon;">.</span>
<font size="2"> +trace</font>
</pre>

你可能感兴趣的:(常用命令)