1.查看位数:
file /sbin/init
/sbin/init: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped则表示32位数。否则64bit
方法二: usname -a
Linux bogon 2.6.32-431.el6.i686 #1 SMP Fri Nov 22 00:26:36 UTC 2013 i686 i686 i386 GNU/Linux,出现i686则32位数,
x86_64表示64位机器
法三:getconf LONG_BIT可以得到系统的具体位数是32还是64位
法四:file /bin/ls
若显示:/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped 则为32位。如果是64-bit则是64位。
2.查看监听端口
nestat -lntp 查看所有监听端口
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 2708/mysqld
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1857/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1736/cupsd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2028/master
tcp 0 0 ::ffff:127.0.0.1:8005 :::* LISTEN 2821/java
tcp 0 0 :::8009 :::* LISTEN 2821/java
tcp 0 0 :::8080 :::* LISTEN 2821/java
tcp 0 0 :::22 :::* LISTEN 1857/sshd
tcp 0 0 ::1:631 :::* LISTEN 1736/cupsd
tcp 0 0 ::1:25 :::* LISTEN 2028/master
3.netstat -antp 查看所有已经建立连接
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 2708/mysqld
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1857/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1736/cupsd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2028/master
tcp 0 0 ::ffff:127.0.0.1:8005 :::* LISTEN 2821/java
tcp 0 0 :::8009 :::* LISTEN 2821/java
tcp 0 0 :::8080 :::* LISTEN 2821/java
tcp 0 0 :::22 :::* LISTEN 1857/sshd
tcp 0 0 ::1:631 :::* LISTEN 1736/cupsd
tcp 0 0 ::1:25 :::* LISTEN 2028/master
tcp 1 0 ::ffff:127.0.0.1:47777 ::ffff:127.0.0.1:3306 CLOSE_WAIT 2821/java
tcp 1 0 ::ffff:127.0.0.1:47774 ::ffff:127.0.0.1:3306 CLOSE_WAIT 2821/java
tcp 1 0 ::ffff:127.0.0.1:47776 ::ffff:127.0.0.1:3306 CLOSE_WAIT 2821/java
tcp 1 0 ::ffff:127.0.0.1:47775 ::ffff:127.0.0.1:3306 CLOSE_WAIT 2821/java
tcp 1 0 ::ffff:127.0.0.1:47773 ::ffff:127.0.0.1:3306 CLOSE_WAIT 2821/java
4.route -n 产看路由表
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.229.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
0.0.0.0 192.168.229.2 0.0.0.0 UG 0 0 0 eth0
5、重启路由器 service network restart
6· ps -ef 查看所有进程
7。rpm -qa |grep mysql 查看所有mysql安装包
8、crontab -l 查看计划任务
9.chkconfig --list |grep on
10.lsof -i :8080查看那个端口处于监听状态 == netstat -anp|grep ssh
11 tail -f 10 catlinaout.log 动态刷新日志
12 cat var/log > logs.txt 查看文件并重定向写入文件