2015-04-24linux System Daily management review question explanation

Source: Internet
Author: User
Tags ack rsync

Exercises

Three-time handshake to establish a connection

Are you there? ---me, are you still there? --I'm in. I'm going to send the data.

First handshake: When a connection is established, the client sends a SYN packet (SYN=J) to the server

Second handshake: The server receives the SYN packet and must confirm the customer's SYN

Third handshake: The client receives the server's Syn+ack packet and sends an acknowledgment packet ack (ACK=K+1) to the server

Four times wave close connection

I'm going--all right, let's go--close--bye.

1 Client A sends a fin to turn off client A to Server B data transfer

2 Server B receives this fin, it sends back an ACK,

3 Server B Closes the connection to client A, sends a fin to client a

4 Client A sends back ACK message acknowledgement

1. How do I see the current Linux system with several physical CPUs and the number of cores per CPU?
Cat/proc/cpuinfo
2. Check the system load there are two common commands, which are the two? What do these three numbers mean?
Vmstat W
3. Vmstat R, B, Si, so, bi, bo What do these columns mean?
Run B etc i o
4. In the Linux system, do you know how to differentiate between buffer and cache?
Write to hard disk will write to memory
5. When using top to view system resource usage, which column represents memory consumption?
Top
6. How to check the network card traffic in real time? How do I view historical network card traffic?
SAR Iftop Ifstat
7. How do I see which processes are currently in the system?
PA aux
8. PS when viewing the system process, there is a column stat, if the current process of the stat for SS what meaning? What do you mean by Z?
S has interrupted S main process
9. How do I see which ports are open on my system?
Netstat-lnp
10. How do I check the status of My network connection?
Mii-tool eth0
11. Want to modify the IP, which configuration file to edit, after modifying the configuration file, how to restart the network card, so that the configuration takes effect?
Vi/etc/sysconfig/network-scripts/ifcfg-eth0 Service Network Restart
12. Can I configure multiple IPs for a network card? If so, how to configure?
1 Virtual interface
13. How do I see if a network adapter is connected to the switch?
Mii-tool eth0
14. How to view the host name of the current host, and how to modify the hostname? What configuration file do I need to modify to continue to take effect after reboot?
Hostname cat/etc/sysconfig/network
15. Which configuration file do I need to modify to set DNS?
Cat/etc/resolv.conf
16. Write a rule using iptables: direct rejection of packets with source IP for 192.168.1.101 access to native 80 ports
Iptables-i input-p tcp-s 192.168.1.101--dport 80-j DROP
17. How do you want to save the Iptable rules to a file? How to recover?
Iptables-save Iptables-restore
18. How do I back up a user's task schedule?
Crontab-l

Crontab-l >/backup/1.txt
19. What does the preceding 5-digit table mean in the task plan format?

20. How can I turn off the unused services in the system?
Ntsysv

Chkconfig
21. How to make a service (if the service name is Nginx) open only in 3, 52 runlevel, other levels off?
Chkconfig--level iptables on
What is the difference between the following two methods in the rsync Sync command?
(1) Rsync-av/dira/ip:/dirb/ssh
(2) RSYNC-AV/DIRA/IP::d IRB CS
When Rsync is synchronized, how can I synchronize the destination file or directory of a soft connection if there is a soft connection in the source to be synchronized?
-L
24. When an account logs on to Linux, what log files will the system record related information?
Cat/var/log/secure
25. When there is a problem with the NIC or hard drive, which command can we use to view the information?
Dmesg
26. Use Xargs and exec respectively to implement the requirement to modify the permissions of all files with the suffix. txt in the current directory to 777.
Find.  -type f-name "*.txt" | Xargs-i chmod 755 *.txt

Find. -name "*.txt"-type f-exec chmod "777" "{}" \;

27. There is a script that can run for more than 2 days, how do you make it run uninterrupted, and you can watch the output information of the script at any time?
Screen Top Ctrl + A D Screen-ls using sreen-r Screenid view
28. Under the Linux system, how to capture the package according to the following requirements: only to filter out the HTTP service, the target IP is 192.168.0.111, catch 1000 packets altogether, and save to 1.cap file?
When rsync synchronizes data, how do I filter out all. txt files that are out of sync?
Rsync-av--exclude= "*.txt"/sd//backup/
When rsync synchronizes data, if the target file is newer than the source file, how do I ignore the file?
-U
31. Want to visit a website under the Linux command line, and the site domain name has not been resolved, how to do?
Cat/etc/hosts
32. Which file can we edit when we customize the domain name resolution? Can one IP correspond to multiple domain names? Does a domain name correspond to multiple IPs?
Cat/etc/hosts 1 1
33. Which command can we use to view the historical load of the system (e.g. two days ago)?
[[email protected]sd]# Sar-q-f/var/log/sa/sa08
Linux 2.6.32-358.el6.x86_64 (centos-03) 07/08/2015 _x86_64_ (1 CPU)
09:40:02 PM runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15
09:50:01 PM 1 129 0.01 0.00 0.00
10:00:01 PM 1 129 0.00 0.00 0.00
10:10:01 PM 1 129 0.00 0.00 0.00
10:20:01 PM 1 137 0.00 0.00 0.00
10:30:01 PM 2 133 0.00 0.00 0.00
10:40:01 PM 1 144 0.00 0.00 0.00
10:50:01 PM 1 144 0.00 0.00 0.00
Average:1 135 0.00 0.00 0.00
[[email protected]sd]#

Dmidecode Equipment Brand

34. How do I specify a DNS server under Linux to resolve a domain name?
Yum Install Bind-utils

[email protected] www.baidu.com
35. When using rsync to synchronize data, if we are using SSH, and the target machine sshd port is not the default 22 port, then how do we do?
Rsync-av-e "Ssh-p 2222"
When Rsync synchronizes, how to delete the data of the target data, that is, the source does not exist, but the target exists files or directories?
--delete
37. When using free to view memory usage, which value represents the amount of memory actually available?
Buffers/cache:
38. One day you suddenly find that the company's website access speed is slow and slow, what should you do? (Server can login, prompt: You can start from the system load and network card traffic)
Ping website--Network card traffic--w---top----vmstat 1 10
When Rsync uses the service mode, if we specify a password file, how much permission should the password file be set to?

600

2015-04-24linux System Daily management review question explanation

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.