yum安装文件系统查看系统性能

2.1 一大波命令

2.1.1 查询系统性能
监控项目cpu ,menm,disk,cpu温度,磁盘IO,RAID卡,负载
CPU :top htop,/proc/cpuinfo,lscpu,w,uptime,lm_sensors(温度),vmstat,sar
MEM :top ,free, ps aux,iotop (磁盘io,swap)
磁盘: df ,du ,iotop,iostat,(sysstat)
查看raid信息工具:megacli
查看硬件信息工具:ipmitool
2.1.2 top(查看cpu)参数 空格立即更新 M按照内存使用率排序 P按照cpu使用率排序

2.1.3 htop(查看进程) ps –ef ps aux
ps aux中VSZ与RSS区别
虚拟内存=物理内存+swap
VSZ virutal size 进程所占虚拟内存大小(物理内存+swap)
RSS 进程所占内存的物理大小

2.1.4 iotop -o 查看系统读写
iotop –o 查看系统io写信息显示出每个进程的读写速度
-o only 只显示在进行读写的进程
df 显示磁盘一共多少 使用多少 剩余多少
du 显示目录所占的空间

创建分区复制文件凸显系统读写信息

2.1.5 lm_sensors -n 温度
安装yum install lm_sensors 安装yum 源,
cpu sensors 查看温度
2.1.6 megacli (查看raid卡)
2.1.7 ipmittool 显示系统的硬件(温度,风扇转速)
dumpe2fs -
dumpe2fs /dev/sdb1 |egrep -i 'mount |write'
fsck -a(aut0) 开机自动检查并修复
2.2 yum安装阿里源文件
https://opsx.alibaba.com/mirror

1、安装alibaba yum源

备份

```mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
安装
CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
注:因为这里我们用的是centos (6.9),所以选择版本“6”

2、安装epel
1、备份(如有配置其他epel源)
mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup
安装epel
epel(RHEL 7)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
epel(RHEL 6)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
epel(RHEL 5)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-5.repo
注:因为这里我们用的是centos (6.9),所以选择版本“6”
3、vimdiff对比连个文件
vimdiff CentOS-Base.repo CentOS-Base.repo.backup
4、yum repolist 查当前使用的看yum源
[root@wangweigang ~]#yum repolist
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile

  • base: mirrors.aliyun.com
  • extras: mirrors.aliyun.com
  • updates: mirrors.aliyun.com
    repo id repo name status
    base CentOS-6 - Base - mirrors.aliyun.com 6,713
    epel Extra Packages for Enterprise Linux 6 - x86_64 12,518
    extras CentOS-6 - Extras - mirrors.aliyun.com 31
    updates CentOS-6 - Updates - mirrors.aliyun.com 113
    repolist: 19,375
    /etc/yum.repos.d/CentOS-Base.repo 系统默认yum的配置文件 “base”“extras”“ updates”
    5、安装(iftop iotop htop)
    yum install -y iftop iotop htop
    6、安装比较炫酷
    yum install cowsay sl
    7、清空所有安装内容
    yum clean all
    8、把系统默认的yum源改为阿里云(从阿里云下载软件)or清华
    1.阿里云
    http://mirrors.aliyun.com
    2.清华
    mirrors.tuna.tsinghua.edu.cn
    9、安装 lm_sensors ————>检查cpu温度
    sensors-detect 检查扫描
    sensors

第3章 文件系统
3.1 常见的系统文件有那些?

3.2 硬件对文件系统的选择

3.3 含义理解
含义:组织管理文件方法
不同的系统有不同的系统文件
3.4 什么是inode 、block,特点有哪些?
inode 是文件的索引号 存放的是文件的属性(大小.类型,权限,)存放block位置
block 是数据块 存放的是文件内容
inode block 放在superblock的地方 超级块
dumpe2fs -h /dev/sdb1 查看只显示超级块的内容

猜你喜欢

转载自blog.51cto.com/13859027/2160917