In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This "Linux system how to view hard disk size and other hardware information" article, the article example code introduction is very detailed, with a certain reference value, interested friends must refer to, for the "Linux system how to view hard disk size and other hardware information", Xiaobian sorted out the following knowledge points, please follow the pace of Xiaobian step by step slowly understand, then let us enter the topic.
1. Linux CPU size
# cat / proc/cpuinfo | grep "model name" & & cat / proc/cpuinfo | grep "physical id" model name: Intel (R) Core (TM) i5-4460 CPU @ 3.20GHz physical id: 0123 description: you can see the details of each cpu in / proc/cpuinfo. But for dual-core cpu, you will see two cpu in cpuinfo. It is often mistaken for two single-core cpu. In fact, Physical Processor ID should be used to distinguish between single-core and dual-core. Physical Processor ID can be found in cpuinfo or dmesg. Flags if it has ht that supports hyper-threading technology to determine the number of physical CPU, you can check the value of physical id. The same physical CPU can be seen above. This machine has two dual-core CPU,ID of 0 and 3, and the size is 2.8G.
Second, memory size
[root@xbidc ~] # cat / proc/meminfo | grep MemTotal MemTotal: 1034612 kB [root@xbidc ~] # 123 3. Usage of qualified partitions of hard disk size
[root@xbidc ~] # fdisk-l | grep Disk Disk / dev/sda: 300.0 GB 300000000 bytes [root@xbidc ~] # df-h Filesystem Size Used Avail Use% Mounted on / dev/sda1 228G 80G 148G 27% / none 4.0K 04.0K 0% / sys/fs/cgroup udev 491M 4.0K 491m 1% / dev tmpfs 101m 1.4m 99m 2% / run none 5.0M 05.0M 0% / run/lock None 501m 152K 501m 1% / run/shm none 100m 44K 100m 1% / run/user1234567891011 4, More ways to view linux hardware information
Uname-a # View kernel / operating system / CPU information (including x86o64 for 32-bit machine, i686 for 32-bit machine) head-n 1 / etc/issue # View operating system version Is the number 1, not the letter L cat / proc/cpuinfo # View linux system information command hostname # View computer name linux system information command lspci-tv # list all PCI devices lsusb-tv # list linux system information command lsmod # list loaded kernel module env # View environment variable resources free-m # View memory usage and swap usage Df-h # View the usage of each partition du-sh # View the size of the specified directory grep MemTotal / proc/meminfo # View the total memory grep MemFree / proc/meminfo # View the amount of free memory uptime # View the system running time, Number of users, Load cat / proc/loadavg # View system load disk and partition mount | column-t # View attached partition status fdisk-l # View all partitions swapon-s # View all swap partitions hdparm-I / dev/hda # View disk parameters (IDE devices only) dmesg | grep IDE # View IDE device detection at startup Network ifconfig # View attribute iptables of all network interfaces L # View firewall settings route-n # View routing table netstat-lntp # View all listening ports netstat-antp # View all established connections netstat-s # View Network Statistics process ps-ef # View all processes top # Real-time display process status user w # View active user id # View specified user information last # View user login log cut -d:-F1 / etc/passwd # View all users of the system cut-d:-F1 / etc/group # View all groups of the system crontab-l # View the current user's scheduled tasks Service chkconfig-list # list all system services chkconfig-list | grep on # list all started system services rpm-qa # View all installed packages cat / proc/cpuinfo: view CPU-related parameters Linux system commands cat / proc/partitions: view linux hard disk and partition information system information commands cat / proc/meminfo: view linux system memory information linux system commands cat / proc/version: view version Similar to uname-r cat / proc/ioports: view device io port cat / proc/interrupts: view interrupt cat / proc/pci: view information on pci devices cat / proc/swaps: view information on all swap partitions which versions of Linux are available: Deepin, UbuntuKylin, Manjaro, LinuxMint, Ubuntu, etc. Among them, Deepin is one of the best-developed Linux distributions in China; UbuntuKylin is a derivative release based on Ubuntu; Manjaro is a Linux release based on Arch; LinuxMint's default Cinnamon desktop is similar to Windows XP's easy-to-use; Ubuntu is the Linux operating system based on desktop applications.
The above is all the contents of the article "how to check hardware information such as hard disk size in Linux system". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.