Q.) How do you identify if you have logged into a physical linux server or a virtual linux server?
Q.) How would you diagnose and resolve a sudden spike in a RHEL server CPU usage?
Q.) What do you mean by Swap memory / space ? and how does it help in the efficient usage of system memory ?
I'll be posting a series of Linux-related questions covering various skill levels. Feel free to share your insights and expertise. Your contributions will benefit learners at all stages, from those in current roles to those preparing for Linux interviews.
How do you identify if you have logged into a physical linux server or a virtual linux server?
simple way to see dmesg ...it will show vm or physical server
) How would you diagnose and resolve a sudden spike in a RHEL server CPU usage?
top command to check which process cosume high cpu
, vmstat ---to show how many process running and blocked due to resource unavailble
sudden spike in cpu usage may be due to something abnoraml happens with application or issue with other resources network or disk
vmstat , iostat and sar good to tools show resource utlizatation and ultimatly resource high usage means servers high load ....we can see in top command or uptime
What do you mean by Swap memory / space ? and how does it help in the efficient usage of system memory ?
Swap memory is secondary memory which is exist on attached storage i.e disk ...earlier servers used to have very less ram and costly so in case running process or new process require more space ,kernel swap out unused pages from ram to swap area and make space for new process ..
lets say new process need 2 gb ram to run but there is no ram available , kerenl will find out which are unused pages or least recenntly pages which is having 2 gb space will be swapped out swap area.
What drawback I found of swapiness kernel wont swapp in those 2 gb pages until their execution needs , else 2 gb pages remains lie in swap space.
there is kernel tunning swappiness parameter we can set how much swapiness we need need according memory use on servers or application behavior,
basically swap space was in demand when we used to use phyical servers but in hypervioser in eviroement , swap rearly needs and cloud vendor like azure they choice us whether swap needs or not.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.