zoukankan      html  css  js  c++  java
  • 查看服务器性能

    1、top命令

        所有参数含义

      

      

           

      

    2、查看硬盘大小

     lsblk

      

    lsblk命令
    块名 块大小 块类型 挂载点
    [root@cluster-datanode-1 ~]# lsblk
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    sr0 11:0 1 1024M 0 rom
    vda 252:0 0 100G 0 disk
    ├─vda1 252:1 0 500M 0 part /boot
    └─vda2 252:2 0 99.5G 0 part /

    3、lscpu

      

    4、内存

      

     5、查看内存占用情况

      free -m

     

     6、查看硬盘使用情况  df -ah

    df 命令
    文件系统 大小 使用 可用 使用百分比 挂载点
    [root@cluster-datanode-1 ~]# df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/vda2 2.5G 2.4G 22M 100% /
    tmpfs 20G 76K 20G 1% /dev/shm
    /dev/vda1 485M 108M 352M 24% /boot

    7、查看网卡速度

    使用ethtool命令。
    ethtool是Linux下用于查询及设置网卡参数的命令。


    举例:
    [root@hvrhub ~]# ethtool eth0
    Settings for eth0:
    Supported ports: [ TP MII ]
    Supported link modes: 10baseT/Half 10baseT/Full
    100baseT/Half 100baseT/Full
    Supports auto-negotiation: Yes
    Advertised link modes: 10baseT/Half 10baseT/Full
    100baseT/Half 100baseT/Full
    Advertised auto-negotiation: Yes
    Speed: 100Mb/s ------------------------------------>网卡速度
    Duplex: Full
    Port: MII
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: on
    Supports Wake-on: pumbg
    Wake-on: g
    Current message level: 0x00000033 (51)
    Link detected: yes

    详细参数参考:(//后面是注释,是原文的译文)
    ethtool ethX /
    ethtool –h //显示ethtool的命令帮助(help)
    ethtool –i ethX //查询ethX网口的相关信息
    ethtool –d ethX //查询ethX网口注册性信息
    ethtool –r ethX //重置ethX网口到自适应模式
    ethtool –S ethX //查询ethX网口收发包统计
    ethtool –s ethX [speed 10|100|1000] //设置网口速率10/100/1000M
    [duplex half|full] //设置网口半/全双工
    [autoneg on|off] //设置网口是否自协商
    [port tp|aui|bnc|mii] //设置网口类型

  • 相关阅读:
    【Python学习】URL编码解码&if __name__ == '__main__'
    【Python学习】邮件发送
    【Python学习】网络编程
    【Python学习】接口开发
    【Python学习】操作Sqllite
    【Python学习】操作Mongodb
    【Python学习】操作Redis
    【Python学习】操作Mysql
    jzoj6003
    jzoj5995
  • 原文地址:https://www.cnblogs.com/onroad2019/p/11353584.html
Copyright © 2011-2022 走看看