网易游戏运维笔试题

来源:互联网 发布:天津港港口网络 编辑:程序博客网 时间:2024/04/29 21:21


看完题目你有何感觉?满满的都是鸟哥的影响啊,出题人在拿着鸟哥那本书出题目的吧,有木有大哭


1、

[plain] view plaincopyprint?
  1. 普通文件、目录、字符设备文件、块设备文件、符号链接文件  
  2.   
  3. http://blog.csdn.net/yangcs2009/article/details/38011137  

2、
[plain] view plaincopyprint?
  1. 常见的格式包括有rpm、tar、gz、tgz、bz、bz2等等。   


3、常见Linux文件系统4个

  1. 网络文件系统,如 nfs、cifs 等;
  2. 磁盘文件系统,如 ext4、ext3 等;
  3. 特殊文件系统,如 proc、sysfs、ramfs、tmpfs 等。

4、shell脚本中  /bash/false的作用

10、NAT的实现方式有3种 1、静态NAT(一对一)  2、动态NAT(多对多)  3、端口多路复用NAT(多对一)

http://20100823.blog.51cto.com/2031838/401704

14、使用shell命令输出当前时间  输出格式为 2012-12-12 12:12:12

[plain] view plaincopyprint?
  1. michael@ubuntu:~$ date "+%Y-%m-%d %H:%M:%S"  
  2. 2014-09-28 05:27:12  

15、在shell中 *表示 0个或多个字符     在正则表达式中*表示 匹配前面的子表达式零次或多次


三、简答

1、Linux常用 load balance的3个数字表示系统负载,请问

1)这三个数字分别代表什么?

The load average numbers give the number of jobs in the run queue averaged over 1, 5 and 15 minutes.

可以用以下命令获取系统的平均负载值.

top

uptime

w


2)这里的”负载“的真实含义是什么?


3)请列举3个可能导致负载高的原因

http://wenku.baidu.com/view/bd3c31fa700abb68a982fb40.html

http://blog.chinaunix.net/uid-22646981-id-3196212.html

查看系统负载

[plain] view plaincopyprint?
  1. michael@ubuntu:~$ vmstat  
  2. procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----  
  3.  r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa  
  4.  0  0      0 474124  38812 563256    0    0   217   357   80  215  3  5 87  5  
  5. michael@ubuntu:~$   

2、


3、foo1; foo2 && foo3 | foo4 > foo5

请解释该命令执行的过程,其中foo5可能包含什么内容?

[plain] view plaincopyprint?
  1. foo1, foo2 , foo3 与 foo4 都是命令, foo5 是装置或文件。整串命令意义为:  
  2.   
  3. (0)执行 foo1 ;  
  4. (1)执行foo2,当 foo2 运行结果有错误时,则该命令串结束;  
  5. (2)若 foo2 运行结果没有错误时,则运行 foo3 | foo4 > foo5 ;其中:  
  6. (2-1)foo3 将 stdout 输出的结果传给 foo4 处理;  
  7. (2-2)foo4 将来自 foo3 的 stdout 当成 stdin ,处理完后将数据流重新导向 foo5 这个装置/文件  
  8.   
  9. http://vbird.dic.ksu.edu.tw/linux_basic/0320bash_7.php  




6、AB

行内元素有:a b span I b em img input select strong块级元素有:div ul ol li dl dt dd h1 h2 h3 h4…p盒模型:margin border padding content


8、C

  • 2内连接
    • 2.1相等链接
    • 2.2自然连接
    • 2.3交叉连接
  • 3外连接
    • 3.1左外连接
    • 3.2右外连接
    • 3.3全连接
  • 4自连接
http://zh.wikipedia.org/wiki/%E8%BF%9E%E6%8E%A5_(SQL)#.E8.87.AA.E8.BF.9E.E6.8E.A5


9、AD

聚集索引(clustered index)就是按照每张表的主键构造一棵B+树,同时叶子节点中存放的为整张表的行记录数据。也将聚集索引的叶子节点称为数据页。同B+树数据结构一样,每个数据页都通过一个双向链表进行链接。

由于实际的数据页只能按照一棵B+树进行排序,因此每张表只能拥有一个聚集索引。在多数情况下,查询优化倾向于采用聚集索引。因为聚集索引能够在B+树索引的叶子节点直接找到数据。另外,由于定义了数据的逻辑顺序,聚集索引能够特别快的访问针对范围的查询。

聚集索引的存储并不是物理上连续的,而是逻辑上连续的。这其中有两点原因:一是数据页通过双向链表链接,数据页按照主键的顺序排序;另一点是每个页中的记录也是通过双向链表进行维护的,物理存储上可以同样不按照主键存储。


3、-*+-*+ABCDEFG

中缀表达式:运算符放在两个运算对象中间,如:(2+1)*3

后缀表达式:不包含括号,运算符放在两个运算对象的后面,所有的计算按运算符出现的顺序,严格从左向右进行(不再考虑运算符的优先规则,如:2 1 + 3 *

前缀表达式:同后缀表达式一样,不包含括号,运算符放在两个运算对象的前面,如:* + 2 1 3

6、5

8、

304(未修改)

自从上次请求后,请求的网页未修改过。服务器返回此响应时,不会返回网页内容。

如果网页自请求者上次请求后再也没有更改过,您应将服务器配置为返回此响应(称为 If-Modified-Since HTTP标头)。服务器可以告诉 Googlebot 自从上次抓取后网页没有变更,进而节省带宽和开销。

403(禁止) 服务器拒绝请求。如果您在 Googlebot 尝试抓取您网站上的有效网页时看到此状态码(您可以在 Google网站管理员工具诊断下的网络抓取页面上看到此信息),可能是您的服务器或主机拒绝了Googlebot 访问。


六.2  上面写的答案错误( ⊙ o ⊙ )啊!

1)一棵二叉搜索树的中续遍历结果是从小到大排序好的,算法时间复杂度O(n),空间复杂度O(1)

2)可以先对二叉搜索树进行中序遍历,然后将遍历结果存放到一个数组中,然后判断这个数组是否是从小到大排好序,而且无重复元素的。时间复杂度O(n),空间复杂度O(n).

参见








1、

1)

[sql] view plaincopyprint?
  1. mody@mac:~$ w  
  2.   
  3. 18:36  up  6:42, 6 users, load averages: 1.60 1.74 1.68  
  4.   
  5. USER     TTY      FROM   LOGIN@  IDLE WHAT  
  6.   
  7. mody     console  -                11:55    6:41 -  
  8.   
  9. mody     s000     -                11:55       - -bash  
  10.   
  11. mody     s001     -                12:01    6:35 /usr/bin/python /usr/local/bin/ipython  
  12.   
  13. mody     s002     -                15:31      52 -bash  
  14.   
  15. mody     s003     -                18:33       2 -bash  
  16.   
  17. mody     s004     -                18:36       - w  -h  

mody@mac:~$ man w

W(1)                      BSD General Commands Manual                     W(1)

NAME

     w -- display who is logged in and what they are doing


SYNOPSIS

     w [-hin] [user...]


DESCRIPTION

     The w utility prints a summary of the current activity on the system, including what each user is doing.  The first line displays the current time of day, how long the system has been running, the number of users logged into the system, and the load averages. The load average numbers give the number of jobs in the run queue averaged over 1, 5 and 15 minutes.

     The fields output are the user's login name, the name of the terminal the user is on, the host from which the user is logged in, the time the user logged on, the time since the user last typed anything, and the name and arguments of the current process.

     The options are as follows:

     -h      Suppress the heading.   忽略第一行信息

     -i      Output is sorted by idle time.


2)

[sql] view plaincopyprint?
  1. mody@mac:~$ uptime  
  2.   
  3. 19:08  up  7:14, 6 users, load averages: 1.42 1.23 1.24  
  4.   
  5. mody@mac:~$ man uptime  

UPTIME(1)                 BSD General Commands Manual                UPTIME(1)


NAME

     uptime -- show how long system has been running


3)

[sql] view plaincopyprint?
  1. michael@ubuntu:~$ top  
  2. top - 05:11:28 up 17 min,  2 users,  load average: 0.05, 0.25, 0.34  
  3. Tasks: 178 total,   1 running, 177 sleeping,   0 stopped,   0 zombie  
  4. Cpu(s):  3.0%us,  0.3%sy,  0.0%ni, 90.7%id,  5.6%wa,  0.3%hi,  0.0%si,  0.0%s  
  5. Mem:   1345964k total,   891400k used,   454564k free,    38652k buffers  
  6. Swap:  1340408k total,        0k used,  1340408k free,   562812k cached  
  7.   
  8.   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND           
  9.  6207 root      20   0  242m  19m 7616 S  3.0  1.5   0:04.49 Xorg              
  10.  6624 michael   20   0  208m  14m  10m S  1.3  1.1   0:02.33 gnome-terminal    
  11.  6045 root      20   0 98.6m 4548 3644 S  0.7  0.3   0:02.85 vmtoolsd          
  12.  6865 michael   20   0 19224 1456 1060 R  0.7  0.1   0:00.09 top               
  13.  6462 michael   20   0  302m  10m 7548 S  0.3  0.8   0:00.32 gnome-settings-   
  14.  6478 michael   20   0  260m  24m  18m S  0.3  1.9   0:05.97 vmtoolsd          
  15.     1 root      20   0 23692 1944 1272 S  0.0  0.1   0:01.86 init              
  16.     2 root      20   0     0    0    0 S  0.0  0.0   0:00.01 kthreadd          
  17.     3 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0       
  18.     4 root      20   0     0    0    0 S  0.0  0.0   0:00.08 ksoftirqd/0       
  19.     5 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 watchdog/0        
  20.     6 root      20   0     0    0    0 S  0.0  0.0   0:00.13 events/0          
  21.     7 root      20   0     0    0    0 S  0.0  0.0   0:00.00 cpuset            
  22.     8 root      20   0     0    0    0 S  0.0  0.0   0:00.00 khelper    

michael@ubuntu:~$ man top



NAME
       top - display Linux tasks

SYNOPSIS
       top -hv | -bcHisS -d delay -n iterations -p pid [, pid ...]

       The traditional switches '-' and whitespace are optional.

DESCRIPTION
       The  top program provides a dynamic real-time view of a running system.  It can display system summary information as well as a list of  tasks  currently  being  managed  by the Linux kernel.  The types of system summary information shown and the types, order  and  size  of  information  displayed  for tasks are all user configurable and that configuration can be made persistent across restarts.

4)

[plain] view plaincopyprint?
  1. michael@ubuntu:~$ ps  
  2.   PID TTY          TIME CMD  
  3.  6626 pts/0    00:00:00 bash  
  4.  6874 pts/0    00:00:00 ps  
  5. michael@ubuntu:~$ man ps  
PS(1)                       Linux User's Manual                       PS(1)

NAME
       ps - report a snapshot of the current processes.

SYNOPSIS
       ps [options]

DESCRIPTION
       ps displays information about a selection of the active processes.   If you want a repetitive update of the selection and the displayed  information, use top(1) instead.


2、B

3、BD

http://blog.csdn.net/yangcs2009/article/details/39639749

11、AD

$代表当前shell线程号,即PID;


?代表执行上一条命令返回值,0代表成功,非0代表错误代码

$0就是该bash文件名
$?是上一指令的返回值
$*所有位置参数的内容:就是调用调用本bash shell的参数。
$@基本上与上面相同。
"$*"返回的是一个字符串,字符串中存在多处空格。
"$@"返回多个字符串。
$#返回所有位置参数的个数。

12、AC

>表示以覆盖方式输出,>>表示以追加方式输出



13、A

变量赋值使用=,等号两边不能有空格;变量名只能是英文字母或数字,开头不能是数字;可使用双引号(可转义)、单引号(不可转义);


14、D

2.1 p命令
命令p用于显示模式空间的内容。默认情况下,sed把输入行打印在屏幕上,选项-n用于取消默认的打印操作。当选项-n和命令p同时出现时,sed可打印选定的内容。
 

sed'/my/p' datafile
#默认情况下,sed把所有输入行都打印在标准输出上。如果某行匹配模式my,p命令将把该行另外打印一遍。


sed -n '/my/p' datafile
#选项-n取消sed默认的打印,p命令把匹配模式my的行打印一遍。


15、CD

*     匹配前面的子表达式零次或多次。例如,zo*能匹配“z”以及“zoo”。*等价于{0,}。

0 0