800 questions milestone

This commit is contained in:
abregman 2020-01-10 02:11:02 +02:00
parent d4cd1e2dd2
commit 5d4942a633

119
README.md
View File

@ -2,9 +2,7 @@
:information_source:  This repository contains questions on various DevOps and SRE related topics :information_source:  This repository contains questions on various DevOps and SRE related topics
:bar_chart:  There are currently **786** questions :bar_chart:  There are currently **800** questions
:books:  To learn more about DevOps check the resources in [DevOpsBit.com](https://devopsbit.com)
:warning:  The purpose of this repo is to help you test your knowledge and prepare for interviews. It doesn't represents a DevOps interview. Please read [Q&A](common-qa.md) for more details :warning:  The purpose of this repo is to help you test your knowledge and prepare for interviews. It doesn't represents a DevOps interview. Please read [Q&A](common-qa.md) for more details
@ -888,6 +886,10 @@ CSMA/CD algorithm:
* hub</summary><br><b> * hub</summary><br><b>
</b></details> </b></details>
<details>
<summary>How does a router works?</summary><br><b>
</b></details>
<details> <details>
<summary>What is NAT?</summary><br><b> <summary>What is NAT?</summary><br><b>
</b></details> </b></details>
@ -1169,8 +1171,6 @@ systemd has many features such as user processes control/tracking, snapshot supp
If we visualize the unix/linux system in layers, systemd would fall directly after the linux kernel. If we visualize the unix/linux system in layers, systemd would fall directly after the linux kernel.
Hardware -> Kernel -> <u>Daemons</u>, System Libraries, Server Display. Hardware -> Kernel -> <u>Daemons</u>, System Libraries, Server Display.
</b> </b>
</details> </details>
@ -1188,7 +1188,7 @@ Hardware -> Kernel -> <u>Daemons</u>, System Libraries, Server Display.
<summary>How do you kill a process in D state?</summary><br><b> <summary>How do you kill a process in D state?</summary><br><b>
</b></details> </b></details>
##### Debugging ##### Debugging (Beginner)
<details> <details>
<summary>What are you using for troubleshooting and debugging <b>network</b> issues?</summary><br><b> <summary>What are you using for troubleshooting and debugging <b>network</b> issues?</summary><br><b>
@ -1223,11 +1223,16 @@ Hardware -> Kernel -> <u>Daemons</u>, System Libraries, Server Display.
</b></details> </b></details>
<details> <details>
<summary>You get a call saying "my system is slow" - how would you deal with it?</summary><br><b> <summary>You get a call from someone claiming "my system is SLOW". What do yo do?</summary><br><b>
1. Check with <code>top</code> if anything consumes your CPU or RAM. * Check with `top` for anything unusual
2. Run <code>dstat -t</code> to check if it's related to disk or network. * Run `dstat -t` to check if it's related to disk or network.
3. Check I/O stats with <code>iostat</code> * Check if it's network related with `sar`
* Check I/O stats with `iostat`
</b></details>
<details>
<summary>Explain iostat output</summary><br><b>
</b></details> </b></details>
<details> <details>
@ -1238,10 +1243,20 @@ Hardware -> Kernel -> <u>Daemons</u>, System Libraries, Server Display.
<summary>What kind of information one can find in /proc?</summary><br><b> <summary>What kind of information one can find in /proc?</summary><br><b>
</b></details> </b></details>
<details>
<summary>What is the difference between CPU load and utilization?</summary><br><b>
</b></details>
<details> <details>
<summary>How you measure time execution of a program?</summary><br><b> <summary>How you measure time execution of a program?</summary><br><b>
</b></details> </b></details>
#### Kernel
<details>
<summary>How do you find out which Kernel version your system is using?</summary><br><b>
</b></details>
<details> <details>
<summary>What is a Linux kernel module and how do you load a new module?</summary><br><b> <summary>What is a Linux kernel module and how do you load a new module?</summary><br><b>
</b></details> </b></details>
@ -1309,7 +1324,7 @@ Each number has different meaning, based on how the application was developed.
I consider this as a good blog post to read more about it: https://shapeshed.com/unix-exit-codes I consider this as a good blog post to read more about it: https://shapeshed.com/unix-exit-codes
</b></details> </b></details>
##### Storage & Filesystem ##### Storage & Filesystem (Beginner)
<details> <details>
<summary>What's an inode?</summary><br><b> <summary>What's an inode?</summary><br><b>
@ -1621,6 +1636,17 @@ This is a great article on the topic: https://www.computerhope.com/jargon/f/file
<summary>What is a network namespace? What is it used for?</summary><br><b> <summary>What is a network namespace? What is it used for?</summary><br><b>
</b></details> </b></details>
<details>
<summary>How to check if a certain port is being used?</summary><br><b>
One of the following would work:
```
netstat -tnlp | grep <port_number>
lsof -i -n -P | grep <port_number>
```
</b></details>
<details> <details>
<summary>How can you turn your Linux server into a router?</summary><br><b> <summary>How can you turn your Linux server into a router?</summary><br><b>
</b></details> </b></details>
@ -1629,6 +1655,12 @@ This is a great article on the topic: https://www.computerhope.com/jargon/f/file
<summary>What is a virtual IP? In what situation would you use it?</summary><br><b> <summary>What is a virtual IP? In what situation would you use it?</summary><br><b>
</b></details> </b></details>
<details>
<summary>Can you have more than one default gateway in a given system?</summary><br><b>
Technically, yes.
</b></details>
<details> <details>
<summary>Which port is used in each of the following protocols?: <summary>Which port is used in each of the following protocols?:
@ -1808,7 +1840,11 @@ If wait is not used by a parent process then a child process might become a zomb
</b></details> </b></details>
<details> <details>
<summary>What happens when you execute <code>ls</code>?. Provide a detailed answer</summary><br><b> <summary>What happens when you execute <code>ls</code>?</summary><br><b>
</b></details>
<details>
<summary>What happens when you execute <code>ls -l *.log</code>?</summary><br><b>
</b></details> </b></details>
#### Linux Filesystem & Files #### Linux Filesystem & Files
@ -1862,7 +1898,7 @@ These system calls are reading the file <code>/my/file</code> and 5 is the file
</b></details> </b></details>
<details> <details>
<summary>What <code>traceroute</code> command does? How it works?</summary><br><b> <summary>What the <code>traceroute</code> command does? How does it works?</summary><br><b>
Another common way to task this questions is "what part of the tcp header does traceroute modify?" Another common way to task this questions is "what part of the tcp header does traceroute modify?"
</b></details> </b></details>
@ -2031,11 +2067,17 @@ Role Ansible roles allows you to group resources based on certain functional
</b></details> </b></details>
<details> <details>
<summary>Which Ansible best practices are you familiar with?. Name at least three</summary><br><b> <summary>How Ansible is different from other Automation tools?</summary><br><b>
Ansible is:
* Agent-less
* Minimal run requirements (Python & SSH) and simple to use
* Default mode is "push" (it supports also pull)
</b></details> </b></details>
<details> <details>
<summary>What is an inventory file and how you define one?</summary><br><b> <summary>What is an inventory file and how do you define one?</summary><br><b>
An inventory file defines hosts and/or groups of hosts on which Ansible tasks executed upon. An inventory file defines hosts and/or groups of hosts on which Ansible tasks executed upon.
@ -2092,6 +2134,10 @@ spun up and shut down, without you tracking every change in these sources.
When given a written code, always inspect it thoroughly. If your answer is “this will fail” then you are right. We are using a fact (ansible_hostname), which is a gathered piece of information from the host we are running on. But in this case, we disabled facts gathering (gather_facts: no) so the variable would be undefined which will result in failure. When given a written code, always inspect it thoroughly. If your answer is “this will fail” then you are right. We are using a fact (ansible_hostname), which is a gathered piece of information from the host we are running on. But in this case, we disabled facts gathering (gather_facts: no) so the variable would be undefined which will result in failure.
</b></details> </b></details>
<details>
<summary>Which Ansible best practices are you familiar with?. Name at least three</summary><br><b>
</b></details>
<details> <details>
<summary>Write a playbook to install zlib and vim on all hosts if the file /tmp/mario exists on the system.</summary><br><b> <summary>Write a playbook to install zlib and vim on all hosts if the file /tmp/mario exists on the system.</summary><br><b>
@ -2185,7 +2231,6 @@ A full list can be found at the link above. Also, note there is a significant di
<summary>What is ansible-pull? How its different compared to ansible-playbook?</summary><br><b> <summary>What is ansible-pull? How its different compared to ansible-playbook?</summary><br><b>
</b></details> </b></details>
<a name="ansible-advanced"></a> <a name="ansible-advanced"></a>
#### :star: Advanced #### :star: Advanced
@ -2638,6 +2683,14 @@ Statements are instructions executed by the interpreter like variable assignment
<summary>What is Object Oriented Programming? Why is it important?</summary><br><b> <summary>What is Object Oriented Programming? Why is it important?</summary><br><b>
</b></details> </b></details>
<details>
<summary>Are you familiar with SOLID design principals?</summary><br><b>
SOLID design principals are about:
* Make it easier to extend functionality
</b></details>
<details> <details>
<summary>What are the four pillars of object oriented programming?</summary><br><b> <summary>What are the four pillars of object oriented programming?</summary><br><b>
</b></details> </b></details>
@ -3383,6 +3436,10 @@ Detailed answer can be found here: http://codingshell.com/python-all-string-perm
<summary>Count the number of spaces in a string</summary><br><b> <summary>Count the number of spaces in a string</summary><br><b>
</b></details> </b></details>
<details>
<summary>Given a string, find the N most repeated words</summary><br><b>
</b></details>
<details> <details>
<summary>Given the string (which represents a matrix) "1 2 3\n4 5 6\n7 8 9" create rows and colums variables (should contain integers, not strings)</summary><br><b> <summary>Given the string (which represents a matrix) "1 2 3\n4 5 6\n7 8 9" create rows and colums variables (should contain integers, not strings)</summary><br><b>
@ -3602,12 +3659,20 @@ What would be the result of is_int(2) and is_int(False)?
<summary>Implement Hash table in Python</summary><br><b> <summary>Implement Hash table in Python</summary><br><b>
</b></details> </b></details>
##### Tests ##### Python Testing
<details> <details>
<summary>What is your experience with writing tests in Python?</summary><br><b> <summary>What is your experience with writing tests in Python?</summary><br><b>
</b></details> </b></details>
<details>
<summary>How would you check if two strings are equal? What about booleans?</summary><br><b>
</b></details>
<details>
<summary>How to test if an exception was raised?</summary><br><b>
</b></details>
<details> <details>
<summary>What <code>assert</code> does in Python?</summary><br><b> <summary>What <code>assert</code> does in Python?</summary><br><b>
</b></details> </b></details>
@ -5529,6 +5594,20 @@ TODO: explain what is actually a Cookie
<summary>What is faster than RAM?</summary><br><b> <summary>What is faster than RAM?</summary><br><b>
</b></details> </b></details>
<details>
<summary>What is your favorite protocol?</summary><br><b>
SSH
HTTP
DHCP
DNS
...
</b></details>
<details>
<summary>What is Cache API?</summary><br><b>
</b></details>
<details> <details>
<summary>What is the C10K problem? Is it relevant today?</summary><br><b> <summary>What is the C10K problem? Is it relevant today?</summary><br><b>
@ -5640,6 +5719,12 @@ You can use and elaborate on one or all of the following:
* Creativity (be able to support it with some actual examples) * Creativity (be able to support it with some actual examples)
</b></details> </b></details>
#### Team Lead
<details>
<summary>How would you improve productivity in your team?</summary><br><b>
</b></details>
## Questions you CAN ask ## Questions you CAN ask
<a name="questions-you-ask"></a> <a name="questions-you-ask"></a>