Linux Server--Hardware

Source: Internet
Author: User
Tags disk usage server memory

    • As a system administrator, how do you always have enough information about all aspects of your server's state performance?

    • How can you be very aware of your current Linux Server (10-100) status performance information?

one, how to view the server's CPU

Basis of judgment:

1. CPUs with the same core ID are Hyper-threading of the same core. (Physical ID and core Idare not necessarily consecutive but they is unique.) Any CPUs with the same Coreid is hyperthreads in the same core.)

2. CPUs with the same physical ID are the same CPU-encapsulated thread or cores. (Anycpu with the same physical ID is threads or cores in the same physical socket.)

with their own Hewlett-Packard Dl380g6 As an example illustrates:

① Physics number of CPUs:

[Email protected] ~]# cat/proc/cpuinfo| grep "Physical ID" | Sort | Uniq | Wc-l

② each physical the number of cores in the CPU (that is, the number of nuclei)

[Email protected] ~]# Cat/proc/cpuinfo | grep "CPU Cores" | Uniq

CPU Cores:4

This can deduce the logic of your own server. The CPU is the number of physical * cores, and if your server is server2003, you can graphically see the number of logical CPUs in your resource manager.

Second, check the server memory situation

Sometimes you run a lot of big processes, like when you turn on 300 x fast-cgi. At this point you feel the system is slow, you need to check the server memory situation:

[Email protected] ~]# free-m

Total used free shared bufferscached

mem:249 163 86 0 10 94

-/+ buffers/cache:58 191

swap:511 0 511

Parameter explanation:

Total Total Memory

used number of memory already in use

Free the number of free memory

shared total amount of memory shared by multiple processes

buffers Buffer Cache and the cachedpage Cache size of the disk cache

-buffers/cache ( used ) the number of memory : used-buffers-cached

+buffers/cache ( available ) the number of memory : Free +buffers + Cached

available for memory=freememory+buffers+cached

Remember, Linux Memory usage management mechanism is how much to use (especially after frequent access to files), that is, Linux memory is not taken to see, is used .

Third, server disk usage

Sometimes it feels like the hard drive is slow to reflect, or you need to look at the partition where the log is located, the following commands can be useful for viewing disk usage:

① view hard disk partition status

Fdisk–l

② View current Drive usage

Df–h

③ viewing hard disk performance

# iostat-x 1 10

Linux 2.6.18-92.el5xen 03/01/2010

AVG-CPU:%user%nice%system%iowait%steal%idle

1.10 0.00 4.82 39.54 0.07 54.46

device:rrqm/s wrqm/s r/s w/s rsec/s wsec/savgrq-sz avgqu-sz await SVCTM%util

SDA 0.00 3.50 0.40 2.50 5.60 48.00 18.48 0.00 0.970.97 0.28

SDB 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00

SDC 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00

SDD 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00

SDE 0.00 0.10 0.30 0.20 2.40 2.40 9.60 0.00 1.60 1.60 0.08

SDF 17.40 0.50 102.00 0.20 12095.20 5.60 118.40 0.70 6.81 2.09 21.36

SDG 232.40 1.90 379.70 0.50 76451.20 19.20 201.13 4.94 13.78 2.45 93.16

The operating mode of the server's hardware is set to RAID1, simultaneously writes the same file to several models of the server,

and then each executes Iostat–d, for contrast testing. This way the server's hard drive performance is inferior, can be compared in a sudden.

Graphic:

Tps number of I/O transfers per second (I/O requests per second) for this device

BLK_READ/S the number of data blocks read per second from the device

BLK_WRTH/S indicates the number of blocks of data written per second from the device

    • As a system administrator, how do you always have enough information about all aspects of your server's state performance?


Iv. viewing the kernel of the system

To view the system kernel primarily in order to master its version number, for the installation LVs and other software preparation.

Uname–a

v. View servers used by Linux distribution name, version number and description information, etc.

Lsb_release-a

This is one of my units for VMware Machine Scenarios for SVN labs:

Vi. viewing the average server load

when the system pressure is higher, it can be Top or uptime view the average load on the server. Another usage of uptime is to see how many days your Linux server has been running stably without restarting, and the highest record on my side of the machine is more than 360 days.

Vii. viewing the overall performance of the system

If you feel the system is busy, you can use Vmstat View the overall performance of the system. Vmstat not only adapts to Linux systems, it is equally suitable for UNIX systems such as FreeBSD.

Vmstat 1 2

if R is often greater than 4, and the ID is often less than 40, indicating that the CPU is heavily loaded.

if Pi,po is not equal to 0 for a long time, indicating insufficient memory.

if disk is often not equal to 0, and the queue in B is greater than 3, indicating poor IO performance.

Viii. viewing the relevant modules that the system has loaded

The core of the Linux operating system has a modular nature, so when compiling the core, it is important to put all the functions into the core. You can compile these functions into separate modules and load them separately when needed. For example, when installing lvs+keepalived, the following usage is often used:

# Check the kernel module to see Ip_vs whether it is loaded

Lsmod |grep Ip_vs

Ip_vs 77313 0

If you want to view the loaded modules of the current system, directly Lsmod.

Nine, find PCI settings under Linux

Sometimes you need to Linux to find the PCI settings, the use of LSPCI command, it can list the PCI device in the machine, such as sound card, video card, Modem, network card, etc., motherboard integration equipment can also be listed. Lspci reads the Hwdata database. Some of the boys may be the same as me, the most concern is the NIC model:

[Email protected] ~]# Lspci | grep Ethernet

03:00.0 Ethernet controller:broadcom Corporation netxtreme II BCM5708 Gigabit Ethernet (Rev. 12)

07:00.0 Ethernet controller:broadcom Corporation netxtreme II BCM5708 Gigabit Ethernet (Rev. 12)

Master The above nine, you have your the hardware information of the Linux server is basically ready to be controlled.


Reference: http://os.51cto.com/art/201006/208330.htm



This article is from the "--" blog, please be sure to keep this source http://57388.blog.51cto.com/47388/1548830

Linux Server--Hardware

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.