Linux查看内存信息
1. 内存的插槽数,已经使用多少插槽.每条内存多大,已使用内存多大dmidecode | grep -P -A 5 "Memorys+Device" | grep Size | grep -v RangeSize: 2048 MBSize: 2048 MBSize: No Module InstalledSize: No Module InstalledSize: No Module InstalledSize: No Module InstalledSize: No Module InstalledSize: No Module Installed2. 支持的最大内存容量dmidecode | grep -P 'Maximums+Capacity'Maximum Capacity: 64 GB3. 查看内存的频率 dmidecode | grep -A16 "Memory Device"dmidecode | grep -A16 "Memory D
Linux 文件颜色代表的意思
Linux 文件颜色代表的意思 n 白色:普通文件 (用-表示) n 红色:压缩文件 n 蓝色:目录文件 (用d表示) n 青蓝色:链接文件 (用l表示) n 黄色:设备文件(/dev目录下)(用b或c表示) B b表示的是物理设备;c表示的是字符终端设备.n 青绿色:可执行文件(/bin、/sbin目录下) n 粉红色:图片文件或是socket文件(用s表示) n 青黄色:管道文件 (用p表示) # file /dev/hda //查看指定文件的类型# find /dev -type b //在/dev目录中查找类型是设备的文件,可以将“b"换成上面的任意类型表示字母,如l,c等。[@more@]
调整裸设备的属组防止系统重启后失效
【Raw disk】调整裸设备的属组防止系统重启后失效如果裸设备对应的属组不是oracle,裸设备将无法供oracle使用。为了防止系统重启后裸设备属组发生变化,我们需要针对不同的操作系统做相应的调整。这里给出在RHEL5.1以及OEL4.8中具体调整的方法。1.在RHEL5.1中的调整方法# cat >> /etc/udev/rules.d/60-raw.rules << EOFACTION=="add", KERNEL=="/dev/sdb1",RUN+="/bin/raw /dev/raw/raw1 %N"ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="17",RUN+="/bin/r
Linux查看网络流量的脚本
# cat stream#! /bin/bash# Write by Neil.xu qq:37391319 email: xurongzhong@gmail.com# 2008-8-19 we need to monitor streams of LTS channels, so write this scripttypeset in in_old dif_in dif_in1 dif_out1typeset out out_old dif_outin_old=$(cat /proc/net/dev | grep eth0 | sed 's=^.*:==' | awk '{ print $1 }' )out_old=$(cat /proc/net/dev | grep eth0 | sed 's=^.*:==' | awk '{ print $9 }')while truedosleep 1in=$(cat /proc/net/dev | grep eth0 | sed 's=^.*:==' | awk '{ print $1 }')out=$(cat /proc/net/dev |