Cloud computing interview questions collection are written in test
this article is the first part of the cloud computing practical interview questions:
1. How does Linux mount in a shared directory under Windows
mount -t cifs -o uid=samba,gid=samba,username=administrator,password=123456,dir_mode=0775,file_mode=0664 //192.16.81.100/project /home/samba/mnt
2. Check the number of concurrent requests from http
ps aux |grep httpd |wc -l
3. Use tcpdump to sniff access to port 80 to see who is the highest
tcpdump -i eth0 -tnn dst port 80 -c 1000 | awk -F”.”’{print $1".”$2".”$3".”$4}’ | sort | uniq -c | sort -nr |head- 20
4. View the number of connections for each IP of the current system
netstat -n | awk’/^tcp/ {n=split( (NF-1),array,”:”);if(n<=2)++S[array[(1)]];else++S[array[(4)]];++s[NF];++N} END {for(a in S){printf(“%-20s %s\n”,a, S[a]) ;++I}printf(“%-20s %s\n”,”TOTAL_IP”,I);for(a in s) printf(“%-20s %s\n”,a, s[a]); printf(“%-20s %s\n”,”TOTAL_LINK”,N);}’
5. 32-bit random password generation under the shell
tr -dc ~!@#$%^&*-_+=|\?/.>,<a-za-z0–9_ <=”” dev=”” urandom|head=”” -c=”” 32|xargs
6. Statistic the top 5 most visited IPs in apache’s access.log
cat /var/log/httpd/access_log |awk’{print $1}’ |sort -nr |uniq -c |sort -r
sed -n’/$1/p ‘/var/log/httpd/access_log |sort -nr |uniq -c |sort -r
7. What does VSZ in ps aux stand for? What does RSS stand for? Possible signs in STAT
ps aux: output all process information of all users of the current terminal in user-based format
VSZ: the amount of virtual memory occupied by the process
RSS: The fixed amount of memory occupied by the process (the number of pages residing in)
START: The time the process was triggered to start
STAT: the status of the process
S: Sleep, usually waiting for an event
R: run, run
D: Uninterruptible sleep (waiting)
T: Stop, usually controlled by the shell job and stop, or the process is under the control of the debugger
Z: Zombie process,
N: low priority task
s: the process is the first session process
+: The process belongs to the foreground process group
<: Advanced priority tasks
8. What are the ways of script execution in Linux, and what are the differences?
1. Direct command execution (being given permission before execution)
1. Absolute path: listed as /root/a to run the script a (you must be given permission to run a)
2. Relative path: ./a (a must be given permission to run)
3. Use variables: add the script a to any directory in the PATH variable, and then a run
Second, the bash process to perform: bash a or sh a
3. Source a or .a
the difference:
One and two will generate a new bash environment to execute the script, and three will be executed in the current environment, so if the variables in the script file are set, the variables set in the script will be returned when the script returns to the parent process Will not be found. And three because the script is executed in the parent process bash, so after the script is executed, you can find the variables set in the script file. First, grant permissions first, and as long as you have shell execution permissions.
9. The difference between symbolic links and hard links
Hard link: (ln source file link file)
Do not connect to the directory; the link file and the source file have the same inode number; when deleting one file, the other file can still be accessed
Soft link: (ln -s source file link file)
You can link to the directory; the inode number of the link file and the source file is different; when you delete or rename a file, the other file cannot be accessed; the link file and the source file can no longer be in a file system, and the content of the soft link file is The path of the source file, the system will automatically guide the source file when reading.
Thanks for reading this post.