19 Millet network operation and maintenance engineer written test real problem

Source: Internet
Author: User
Tags file info http 2 haproxy


"19 Millet network operation and maintenance engineer written test is true, can you pass the customs?" 》

Topic Goto: Marco Linux operations


The first part: Linux basics


Topic 1:

There are 100 picture files, their addresses are

Http://down.xiaomi.com/img/1.png

Http://down.xiaomi.com/img/2.png

...

Until Http://down.xiaomi.com/img/100.png.

Download these 100 image files in bulk and find out which files are larger than 500KB.


Reference Answer:

#/bin/bash#by Xianwei#2017-9-5echo "Downloading the picture ..." for i in {1..100}do wget "http://down.xiaomi.com/img/ $i. png "Doneecho" Download done! " echo "Find the file which is big than 500k" find. -type f-size +500c-print


Topic 2:

The contents of a text file Info.txt are as follows:

aa,201

zz,502

bb,1

ee,42

Each row is separated by a comma, where the second column is a number, and the file is sorted from the large to the small number in the second column.


Reference Answer:

[Email protected]:/home/dell/shell# cat Info.txt Aa,201zz,502bb,1ee,42[email protected]:/home/dell/shell# Cat Info.txt |sort-t ","-rnk 2zz,502aa,201ee,42bb,1[email protected]:/home/dell/shell#

Examine the Knowledge points:

Use of sort

- R Reverse Order

- n Sort by number

- k Specifies the column

- t specify delimited symbols


Topic 3:

Check to see if the current Linux server is listening on port 80, and if you are listening, find out its process ID and end the process.


Reference answer

Description: Test using 3306-segment port as an example.

1) To view the process ID and process name of the port, there are two ways to lsof and netstat

NETSTAT-TANP |grep 3306

lsof-i:3306

[Email protected]:/home/dell/shell# netstat-tanp |grep 3306 TCP 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1309/mysqld[email protected]:/home/dell/shell# lsof-i:3306 COMMAND PID USER FD TYPE DEV ICE size/off NODE namemysqld 1309 MySQL 16u IPv4 19621 0t0 TCP localhost:mysql (LISTEN)

2) filter out the ID number and kill

Method One: Use the For

For i in ' Netstat-tanp |grep 3306 |awk ' {print $NF} ' |cut-d '/'-F 1 ';d o kill-9 $i;d One

Method Two: Use Xargs

NETSTAT-TANP |grep 3306 |awk ' {print $NF} ' |cut-d '/'-F 1 |xargs-i ' {} ' kill-9 {}

Method Three: Using awk

NETSTAT-TANP |grep 3306 |awk ' {print $NF} ' |cut-d '/'-F 1 |awk ' {print ' kill-9 ' $} ' |bash


Topic 4:

Use the Curl or wget command to get header information for the HTTP service.


Topic 5:

For Linux user accounts, the following statements are correct:

A. The user's password is stored in clear text in the/etc/passwd file.

B. The user's password, which is stored in the/etc/passwd file in ciphertext form

C. The user's password, which is stored in the/etc/shadow file in ciphertext form

D. When a user logs in, the user's password is compared with the saved password.


Reference Answer: C


Topic 6:

For hard disk arrays consisting of n blocks, which of the following is wrong:

A.raid1 reads data faster RAID5 than RAID5

B.RAID1 Higher disk space utilization compared to RAID5 RAID5

C.RAID1 does not affect data integrity in the case of a (N-1) block disk corruption

D.RAID0 the fastest read and write speeds compared to RAID1, RAID5


Reference Answer:

RAID0 is slower to read than RAID1,RAID5 because it reads data from only one disk


Topic 7:

Load balancing, what are the common software you know? Please write at least three or more, and evaluate each of the shortcomings.


Reference Answer:

The drawbacks of Nginx are:

1. Nginx can only support http, HTTPS and email protocol, so it is smaller in the scope of application, this is its disadvantage.

2. The health check of the backend server is only supported by the port , and is not supported by URL detection. The direct hold of the session is not supported , but can be solved by Ip_hash.


The disadvantages of LVS are:

1. The software itself does not support regular Expression processing (only support 4 layer load balancing), can not do static and dynamic separation , and now many sites in this area have strong demand, this is nginx/haproxy+keepalived advantage.

2. If the application of the site is relatively large, lvs/dr+keepalived implementation of the more complex , especially after the Windows server machine, if the implementation and configuration and maintenance process is more complex, relatively nginx/ Haproxy+keepalived is a lot easier.

Please refer to: http://www.ha97.com/5646.html


Topic 8:

Execute the time sleep 2, and the output is as follows:

Real 0m2.003s

User 0m0.004s

SYS 0m0.000s

Please indicate the meaning and difference of the specific representative of real, user and sys.


Reference Answer:

Real Time is the wall clock time, which is the time the command starts executing to the end. This short time includes the time slices that other processes occupy, and the time it takes to block the process.

User Time is the CPU time that the process spends in user mode , which is the only time that is really spent executing the process, and the time in other processes and spending blocking states is not counted.

sys time is the amount of CPU time spent in kernel mode , representing the time it takes to take a system call in the kernel, which is the CPU time actually used by the process.


Topic 9:

The meaning of last, break, redirect and permanent in Nginx rewrite rules.


Topic 10:

WEB Services The difference between a cookie and a session.

Reference Answer:

1. The cookie data is stored on the client's browser and the session data is placed on the server.

2, the cookie is not very safe, others can analyze the cookie stored in the local and make

3. Session will be saved on the server for a certain period of time. When access is increased, it will be more likely to occupy your server's performance

4, a single cookie limit on the client is 3K, that is, a site in the client store cookies can not be greater than 3 K.


Source: http://blog.csdn.net/u010168160/article/details/47128443


Topic 11:

What is the difference between HTTP 1.0 and HTTP 1.1? What are the major changes or advantages of HTTP 2.0?


Reference Answer:

HTTP 1.0 uses short links, http1.1 uses long connections

http2.0 performance and speed have been greatly improved.


Part II: Security Section


Topic 12:

Please list Common Web security issues (not less than three), explain its principle, harm.

Slightly

Topic 13:

Please list common Dos attack types, and describe their rationale and defense methods separately.

Slightly

Topic 14:

What should you do with the server being compromised as a security manager?

Reference answer

Http://netsecurity.51cto.com/art/201608/515574.htm


Part Three: Network part


Topic 15:

Please briefly describe the three-time handshake process for TCP.


Topic 16:

It is found that there are a lot of time_wait in the system, analyzing the reason and making more than three optimization suggestions.



Part IV: Python section


Topic 17:

The similarities and differences between xrange and range.

Reference Answer:

    1. Xrange will be a lot better than range, because you don't need to open up a big memory space.

    2. Range generates a list object directly, and xrange does not directly generate a list, but instead returns one of the values in each call

Topic 18:

Lists A and B, using Python to quickly get the common elements in A and B.

Reference Answer:

For I in A:If i in B:print i

Topic 19:

With 20 servers, echo "123" on all machines and 5 servers in parallel, use Python or shell to write the relevant code.

# encoding:utf-8import Timeimport sysimport osimport threadpooldef cmd (IP): #需先设置远程无密码执行命令 os.system (' SSH IP echo ' 1 "2>&1 ') time.sleep (2) ip_list =[' Xiaozi ', ' aa ', ' BB ', ' cc ', ' dd ', ' ee ']pool = ThreadPool. ThreadPool (5) #创建一个线程池, including the number of threads 10 requests = threadpool.makerequests (cmd, ip_list) #传递函数和参数 [pool.putre Quest (req) for req in requests] #将请求放入线程池进行处理pool. Wait ()


This article is from "operations to Development" blog, please be sure to keep this source http://237085.blog.51cto.com/227085/1962793

19 Millet network operation and maintenance engineer written test real problem

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.