博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
查看Linux信息
阅读量:5035 次
发布时间:2019-06-12

本文共 6734 字,大约阅读时间需要 22 分钟。

Linux信息

查看CPU的相关信息

lscpu
[dzlua@ubuntu:~]$ lscpuArchitecture:          x86_64CPU op-mode(s):        32-bit, 64-bitByte Order:            Little EndianCPU(s):                4On-line CPU(s) list:   0-3Thread(s) per core:    1Core(s) per socket:    2Socket(s):             2NUMA node(s):          1Vendor ID:             GenuineIntelCPU family:            6Model:                 158Model name:            Intel(R) Core(TM) i5-8400 CPU @ 2.80GHzStepping:              10CPU MHz:               2808.001BogoMIPS:              5616.00Hypervisor vendor:     VMwareVirtualization type:   fullL1d cache:             32KL1i cache:             32KL2 cache:              256KL3 cache:              9216KNUMA node0 CPU(s):     0-3[dzlua@ubuntu:~]$

查看内存的相关信息

cat /proc/meminfo |head -20
[dzlua@ubuntu:~]$ cat /proc/meminfo |head -20MemTotal:        2037232 kBMemFree:         1485700 kBBuffers:           64852 kBCached:           320120 kBSwapCached:            0 kBActive:           266920 kBInactive:         131304 kBActive(anon):      13260 kBInactive(anon):      152 kBActive(file):     253660 kBInactive(file):   131152 kBUnevictable:           0 kBMlocked:               0 kBSwapTotal:       4046844 kBSwapFree:        4046844 kBDirty:                 4 kBWriteback:             0 kBAnonPages:         13476 kBMapped:             6716 kBShmem:               164 kB[root@dev proc]# cat /proc/meminfoMemTotal:        2037232 kBMemFree:         1485824 kBBuffers:           64852 kBCached:           320120 kBSwapCached:            0 kBActive:           266904 kBInactive:         131304 kBActive(anon):      13244 kBInactive(anon):      152 kBActive(file):     253660 kBInactive(file):   131152 kBUnevictable:           0 kBMlocked:               0 kBSwapTotal:       4046844 kBSwapFree:        4046844 kBDirty:                 4 kBWriteback:             0 kBAnonPages:         13248 kBMapped:             6716 kBShmem:               164 kBSlab:              97036 kBSReclaimable:      34284 kBSUnreclaim:        62752 kBKernelStack:        2704 kBPageTables:         1716 kBNFS_Unstable:          0 kBBounce:                0 kBWritebackTmp:          0 kBCommitLimit:     5065460 kBCommitted_AS:      64124 kBVmallocTotal:   34359738367 kBVmallocUsed:      183512 kBVmallocChunk:   34359539832 kBHardwareCorrupted:     0 kBAnonHugePages:         0 kBHugePages_Total:       0HugePages_Free:        0HugePages_Rsvd:        0HugePages_Surp:        0Hugepagesize:       2048 kBDirectMap4k:       12288 kBDirectMap2M:     1036288 kBDirectMap1G:     1048576 kB[dzlua@ubuntu:~]$

查看挂接的分区状态

fdisk -l | grep Disk
[dzlua@ubuntu:~]$ fdisk -l | grep DiskDisk /dev/sda: 107.4 GB, 107374182400 bytesDisk identifier: 0x0008c221Disk /dev/mapper/vg_dev-lv_root: 53.7 GB, 53687091200 bytesDisk identifier: 0x00000000Disk /dev/mapper/vg_dev-lv_swap: 4143 MB, 4143972352 bytesDisk identifier: 0x00000000Disk /dev/mapper/vg_dev-lv_home: 49.0 GB, 49014636544 bytesDisk identifier: 0x00000000[dzlua@ubuntu:~]$

查看硬盘和分区分布

lsblk
[dzlua@ubuntu:~]$ lsblkNAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTsr0                        11:0    1 1024M  0 romsda                         8:0    0  100G  0 disk├─sda1                      8:1    0  500M  0 part /boot└─sda2                      8:2    0 99.5G  0 part  ├─vg_dev-lv_root (dm-0) 253:0    0   50G  0 lvm  /  ├─vg_dev-lv_swap (dm-1) 253:1    0  3.9G  0 lvm  [SWAP]  └─vg_dev-lv_home (dm-2) 253:2    0 45.7G  0 lvm  /home[dzlua@ubuntu:~]$

查看硬盘和分区分布

mount | column -t
[dzlua@ubuntu:~]$ mount | column -t/dev/mapper/vg_dev-lv_root  on  /                         type  ext4            (rw)proc                        on  /proc                     type  proc            (rw)sysfs                       on  /sys                      type  sysfs           (rw)devpts                      on  /dev/pts                  type  devpts          (rw,gid=5,mode=620)tmpfs                       on  /dev/shm                  type  tmpfs           (rw,rootcontext="system_u:object_r:tmpfs_t:s0")/dev/sda1                   on  /boot                     type  ext4            (rw)/dev/mapper/vg_dev-lv_home  on  /home                     type  ext4            (rw)none                        on  /proc/sys/fs/binfmt_misc  type  binfmt_misc     (rw)[dzlua@ubuntu:~]$

查看硬盘使用情况

df -hT
[dzlua@ubuntu:~]$ df -hTFilesystem                  Type   Size  Used Avail Use% Mounted on/dev/mapper/vg_dev-lv_root  ext4    50G   12G   35G  26% /tmpfs                       tmpfs  931M     0  931M   0% /dev/shm/dev/sda1                   ext4   477M   49M  403M  11% /boot/dev/mapper/vg_dev-lv_home  ext4    45G   52M   43G   1% /home[dzlua@ubuntu:~]$

查看系统的所有网络接口

ifconfig -a
[dzlua@ubuntu:~]$ ifconfig -aeth1      Link encap:Ethernet  HWaddr 00:0C:29:2B:BE:E5          inet addr:192.168.5.212  Bcast:192.168.5.255  Mask:255.255.255.0          inet6 addr: fe80::20c:29ff:fe2b:bee5/64 Scope:Link          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:841987 errors:0 dropped:0 overruns:0 frame:0          TX packets:184594 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000          RX bytes:942751394 (899.0 MiB)  TX bytes:99686566 (95.0 MiB)lo        Link encap:Local Loopback          inet addr:127.0.0.1  Mask:255.0.0.0          inet6 addr: ::1/128 Scope:Host          UP LOOPBACK RUNNING  MTU:65536  Metric:1          RX packets:75 errors:0 dropped:0 overruns:0 frame:0          TX packets:75 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:0          RX bytes:6052 (5.9 KiB)  TX bytes:6052 (5.9 KiB)[dzlua@ubuntu:~]$

查看系统的键盘和鼠标

cat /proc/bus/input/devices
[dzlua@ubuntu:~]$ cat /proc/bus/input/devicesI: Bus=0019 Vendor=0000 Product=0001 Version=0000N: Name="Power Button"P: Phys=LNXPWRBN/button/input0S: Sysfs=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input0U: Uniq=H: Handlers=kbd event0B: PROP=0B: EV=3B: KEY=10000000000000 0I: Bus=0017 Vendor=0001 Product=0001 Version=0100N: Name="Macintosh mouse button emulation"P: Phys=S: Sysfs=/devices/virtual/input/input1U: Uniq=H: Handlers=mouse0 event1B: PROP=0B: EV=7B: KEY=70000 0 0 0 0B: REL=3I: Bus=0011 Vendor=0002 Product=0005 Version=0000N: Name="ImPS/2 Generic Wheel Mouse"P: Phys=isa0060/serio1/input0S: Sysfs=/devices/platform/i8042/serio1/input/input2U: Uniq=H: Handlers=mouse1 event2B: PROP=0B: EV=7B: KEY=70000 0 0 0 0B: REL=103I: Bus=0011 Vendor=0001 Product=0001 Version=ab41N: Name="AT Translated Set 2 keyboard"P: Phys=isa0060/serio0/input0S: Sysfs=/devices/platform/i8042/serio0/input/input3U: Uniq=H: Handlers=kbd event3B: PROP=0B: EV=120013B: KEY=402000000 3803078f800d001 feffffdfffefffff fffffffffffffffeB: MSC=10B: LED=7[dzlua@ubuntu:~]$

转载于:https://www.cnblogs.com/dzlua/p/11171830.html

你可能感兴趣的文章
Extjs String转Json
查看>>
oracle入门(4)——少而常用的命令
查看>>
打印机设置(PrintDialog)、页面设置(PageSetupDialog) 及 RDLC报表如何选择指定打印机...
查看>>
Java 虚拟机部分面试题
查看>>
二叉树的遍历问题总结
查看>>
Spring之面向切面编程AOP
查看>>
MATLAB GUI程序设计中使文本框接收多行输入的方法
查看>>
全文检索-Elasticsearch (四) elasticsearch.net 客户端
查看>>
Oracle DBMS_SESSION
查看>>
sublime复制当前行到下一行
查看>>
WPF 3D变换应用
查看>>
ArchLinux安装开源VMware Tools
查看>>
DB2 锁升级示例1
查看>>
16.RDD实战
查看>>
MainFrame知识小结(20120210)—dfsort/syncsort中的数据类型
查看>>
D - Flip tile
查看>>
Java连接RabbitMQ之创建连接
查看>>
开户vim编程之--cscope支持
查看>>
python数据类型图解
查看>>
C#微信登录-手机网站APP应用
查看>>