Linux/unix System Analysis Command Quick check Manual

Source: Internet
Author: User

1.Hardware

CPU Information:cat/proc/cpuinfo

Physical Core number: statistical core

Number of logical CPUs: Statistical processor

Memory Information:

Free-m

One of the-+buffer is for Os/app.

Disk Information:

Fdisk-l

Df-h

IO Performance:

iostat-d-x-k 1 10

This command belongs to the Sysstat package

Observe await average IO operation wait time

Observe the percentage of%util in a second of IO operations-->100% represents a high load

To count the size of a directory:

Du-sh/root

Count all directory sizes in this directory:

Du-cks *

DD Command:

Making swap Files

Making a drive disk

Make ISO

such as: DD if=xx of =xx2 bs=65536 count=65536

View average load:

Top

Uptime

W

Past 1,5,15 mintues:the count number of process queue (ready)

If R is often greater than the number of logical CPUs and ID < 50, the CPU load is high.

Monitoring of overall system performance:

Vmstat 1 10

Process:r = number of processes waiting to be allowed b= non-disruptive sleep states

System:in = number of interrupts CS = CPU Switch

Cpu:us = CPU usage time;  SY = CPU system usage time; ID = Idle

R<5, b~=0 normal state;

u%+s% < 70% good performance.

2.System

OS Info:

Uname-a

File/sbin/init

Pci:

Lspci | grep "XXX"

Host Name query:

/etc/hosts

Native hostname:

/etc/sysconfig/network

Configure DNS Server

/etc/resolv.conf

Namserver $IP _addr

3.Network

Ifconfig-a

Ping

Netstat-an:

Established: Statistics of concurrency

Close-wait: Waiting for local request

Time-wait: Wait for enough time for the confirm to connect to the interrupt;

Statistics Command:

Netstat-an | awk '/^tcp/{++s[$NF]}end{for (A in S) print A, s[a]} '

Other:

Telnet $IP _addr $PORT

NC-NVV $IP _add $PORT

Route

Route = Netstat-r

Route-n

TRACEROUTE: Tracking Packets

Route add-net 192.168.20.0 netmask 255.255.255.0 GW 192.168.10.1

Route add-host $IP _addr Dev eth0

Boot up add:/etc/rc.local

Nslookup:ip address <--> domain name

>mail.163.com

server:10.1.1.1

address:10.1.1.2

or command--dig

Dig www.baidu.com +trace

Finger = W

Lsof-i:22

See which program 22 ports are occupied by

(LS opened file)

Sockstat:-c = connected; -L = Listening

PS Command:

Ps-axu

Vsz:virtual memory Size (KB)

RSS: Physical Memory (KB)

STAT:

D-death

R-ready

S-sleep

T-trace

Z-zombie

<-high priority

N-low Priority

Top command:

Pr:priority

Ni:priority number

Virt:virtual Memroy used

Res:physical Memory Used

Shr:share Memory Used

Stat:s-sleeping; r-running; Z-zombie; N-low Priority

Interactive commands:

P-cpu sort; M-memory sequencing; T-time sequencing; C-full command;

Kill & Killall Command;

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.