What are the performance tools you would use on Linux Machine
- dmesg | tail
- vmstat 1
- mpstat -P ALL 1
- pidstat 1
- iostat -xz 1
- free -m
- sar -n DEV 1
- sar -n TCP,ETCP 1
How would you troubleshoot a High I/O Issue
Explain Memory Leak ?
Naive definition: Failure to release unreachable memory, which can no longer be allocated again by any process during execution of the allocating process. This can mostly be cured by using GC (Garbage Collection) techniques or detected by automated tools.
Subtle definition: Failure to release reachable memory which is no longer needed for your program to function correctly.
This is nearly impossible to detect with automated tools or by programmers who are not familiar with the code.
While technically it is not a leak, it has the same implications as the naive one. This is not my own idea only. You can come across projects that are written in a garbage collected language but still mention fixing memory leaks in their changelogs.
Explain Load Average ?
The best definition and internals about
load average can be is explained here.
What are processes and threads?
Process are basically the programs which are dispatched from the ready state and are scheduled in the CPU for execution.
PCB(Process Control Block) holds the concept of process. A process can create other processes which are known as Child Processes.
The process takes more time to terminate and it is isolated means it does not share the memory with any other process.
Explain Linux Inodes
An Inode number points to an Inode. An Inode is a data structure that stores the information about the file or folder
Explain a performance issue with a process
A performance issue with a process could be caused by several factors. It may be due to poorly written or inefficient code, or due to hardware limitations.
Issues can also arise from not enough memory being available for the process, or a disk bottleneck preventing the data from being read and written quickly enough.
Other potential causes are high CPU utilization or network latency. It is important to thoroughly analyze the system and environment in order to determine the root cause of a performance issue.
How to Check Your IP Address in Linux
There are a few ways that you can check your IP address in Linux. One way is to use the “ifconfig -a” command. Another way to check your IP address is to use the “ip addr” command.
Either command will show you all of the network interfaces on your system, as well as their IP addresses.
How to check if you get DDoS attack in Linux?
In order to check if you are receiving a DDoS attack in Linux, you can use the netstat command.
This command will show you a list of all connections that have been made to your system, as well as the source IP address for each connection.
If you notice any suspicious activity such as multiple requests from the same IP address or high number of time_wait connections or an unusual number of connections from different IP addresses, then it is likely that you are being attacked with a DDoS attack.
In this case, you should contact your hosting provider and ask them to investigate the attack. You can also use firewalls or other security measures to protect your system against DDoS attacks.
How can I secure my Linux system from hackers?
When securing your system from hackers, it is important to use strong passwords and firewall configurations. You should also restrict user access and monitor the logs for suspicious activity.
Additionally, you should consider using two-factor authentication, virtual private networks (VPN), and intrusion detection systems (IDS).
You should also apply system updates regularly, and use secure data storage solutions such as encryption.