linux 查看硬盘和网卡的信息

举报
千江有水千江月 发表于 2021/10/03 11:41:38 2021/10/03
【摘要】 ECS信息规格:2vCPUs | 4GiB | kc1.large.2镜像:openEuler 20.03 64bit with ARM | 公共镜像  linux 查看硬盘和网卡的信息 查看硬盘的信息# fdisk -lDisk /dev/vda: 40 GiB, 42949672960 bytes, 83886080 sectorsUnits: sectors of 1 * 512 =...

ECS信息

  • 规格:2vCPUs | 4GiB | kc1.large.2
  • 镜像:openEuler 20.03 64bit with ARM | 公共镜像

linux 查看硬盘和网卡的信息

查看硬盘的信息

# fdisk -l
Disk /dev/vda: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E4391D6A-9819-45CA-BDE4-52285BCE52A7

Device       Start      End  Sectors Size Type
/dev/vda1     2048  2099199  2097152   1G EFI System
/dev/vda2  2099200 83884031 81784832  39G Linux filesystem

# lsblk -l
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda  253:0    0  40G  0 disk 
vda1 253:1    0   1G  0 part /boot/efi
vda2 253:2    0  39G  0 part /

# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        1.2G     0  1.2G   0% /dev
tmpfs           1.5G     0  1.5G   0% /dev/shm
tmpfs           1.5G   13M  1.5G   1% /run
tmpfs           1.5G     0  1.5G   0% /sys/fs/cgroup
/dev/vda2        39G  4.0G   33G  11% /
tmpfs           1.5G   64K  1.5G   1% /tmp
/dev/vda1      1022M  5.8M 1017M   1% /boot/efi
tmpfs           298M     0  298M   0% /run/user/0

查看网卡的信息

IP地址已隐藏

# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.XXX  netmask 255.255.255.0  broadcast 192.168.0.XXX
        inet6 XXXX::XXXX:XXXX:XXXX:XXXX  prefixlen 64  scopeid 0x20<link>
        ether XX:XX:XX:XX:XX:XX  txqueuelen 1000  (Ethernet)
        RX packets 1470  bytes 152156 (148.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1133  bytes 138160 (134.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

# ethtool -i eth0
driver: virtio_net
version: 1.0.0
firmware-version: 
expansion-rom-version: 
bus-info: 0000:03:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no

# lspci |grep -i Ethernet
03:00.0 Ethernet controller: Virtio: Virtio network device (rev 01)
  • Virtio是虚拟机用到的虚拟化技术。
  • 使用modinfo查看网卡驱动的基本信息
# modinfo virtio
filename:       /lib/modules/4.19.90-2003.4.0.0036.oe1.aarch64/kernel/drivers/virtio/virtio.ko
license:        GPL
srcversion:     4625C9AF9657B792DEA6038
depends:        
intree:         Y
name:           virtio
vermagic:       4.19.90-2003.4.0.0036.oe1.aarch64 SMP mod_unload modversions aarch64

......部分截取

学习资料

欢迎各位同学一起来交流学习心得^_^

【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。