Linux Administration

Here we are going to list down the frequently most asked Core Java Interview Questions for professionals. The questions are created and submitted by professionals to help you to ace the job interview.

Q.1 Why is there a need for LVM in Java?
LVM is abbreviated for Logical Volume Manager which is used to resize file system’s size online. We require LVM partition in Linux. Such that size of LVM partition can be extended and reduced using the lvextend & lvreduce commands respectively.
Q.2 How can you assess Memory stats and CPU stats ?
We can assess memory stats and CPU stats using ‘free’ & ‘vmstat’ command that can be used display the physical and virtual memory statistics respectively. Also with the help of ‘sar’ command we see the CPU utilization & other stats.
Q.3 What does Sar offer and at which location 'Sar logs' are stored ?
Sar is used to collect, report, or save system activity information. Such that the default version of the sar command (CPU utilization report) is considered as one of the first facilities the user runs to begin system activity investigation, since it monitors major system resources. Note, in case the CPU utilization is somewhere near 100 percent (user + nice + system), the workload sampled is CPU-bound. Also by default the log files of Sar command are located at /var/log/sa/sadd file, wherein the dd parameter indicates the current day.
Q.4 How can you increase the size of LVM partition ?
The steps to be followed to increase the size of LVM partition are -
1. Firstly, we should use the lvextend command (lvextend -L +100M /dev/ , such that here we are extending the size by 100MB.
2. resize2fs /dev/
3. check the size of partition using ‘df -h’ command
Q.5 What are the steps to shrink the size of LVM partition ?
The steps to be followed to shrink the size of LVM partition are -
1. Umount the filesystem using umount command, -use resize2fs command , e.g resiz2fs /dev/mapper/myvg-mylv 10G
2. Now use the lvreduce command , e.g lvreduce -L 10G /dev/mapper/myvg-mylv The above Command will shrink the size of the LVM partition and will make the filesystem size 10GB.
Q.6 Where are the kernel modules located?
‘/lib/modules/kernel-version/’ directory stores all kernel modules or compiled drivers in Linux operating system. Such that with ‘lsmod’ command we can see all the installed kernel modules.
Q.7 What do you understand by umask ?
umask is abbreviated for ‘User file creation mask’, that is used to determine the settings of a mask that controls file permissions that are set for files and directories when they are created.
Q.8 How will you set the umask permanently for a user?
In order to set this value permanently for a user, it has to be put in the appropriate profile file that depends on the default shell of the user.
Q.9 How can you change the default run level in linux ?
In order to change the run level we have to edit the file “/etc/inittab” and change initdefault entry ( id:5:initdefault:). Using ‘init’ command we change the run level temporary like ‘init 3’ , this command will move the system in runlevl 3.
Q.10 How can you share a directory using nfs?
In order to share a directory using nfs, we first need to edit the configuration file ‘/etc/exportfs’ , add a entry like
‘/ (Options)’ and then restart the nfs service.
Q.11 What do you understand by Network Bonding ?
Network bonding refers to the aggregation of multiple Lan cards into a single bonded interface so as to provide fault tolerance and high performance. Network bonding is also referred as NIC Teaming.
Q.12 How can you assess and verify the status the bond interface?
We can assess and verify the status of bonded interface by using the command ‘cat /proc/net/bonding/bond0’, inm order to understand which mode is enabled and what lan cards are used in this bond.
Q.13 How will you check default route and routing table ?
We can check default route and routing table using the Commands ‘netstat -nr’ and ‘route -n’
Q.14 What are the services enabled at a particular run level in linux server ?
We can use the command ‘chkconfig –list | grep 5:on’ to list all the service that are enabled in run level5. Such that for other run levels just replace 5 with the respective run level.
Q.15 How will you upgrade Kernel in Linux ?
One should never upgrade Linux Kernel , whereas install the new kernel using rpm command since upgrading a kenel can make the linux box in a unbootable state.
Q.16 How can you add and change the Kernel parameters?
Steps to add and change the Kernel parameters are -
1. In order to Set the kernel parameters in linux , you must first edit the file ‘/etc/sysctl.conf’
2. After making the changes save the file and run the command ‘sysctl -p’
3. This command will make the changes permanently without rebooting the machine.
Q.17 Define Puppet Server.
Puppet is one of the open-source and enterprise software used for configuration management toll in UNIX like operating system. Puppet is primarily an IT automation software used to push configuration to its clients (puppet agents) using code. Such that the puppet code can do a variety of tasks from installing new software, to check file permissions, or updating user accounts etc.
Q.18 What do you understand by manifests in Puppet ?
Manifests in Puppet are referred the files in which the client configuration is specified.
Q.19 Where will you find WWN numbers of HBA cards in Linux Server ?
We can find the WWN numbers of HBA cards using the command ‘systool -c fc_host -v | grep port_name’
Q.20 What do you understand by load average in Linux ?
Load Average is referred as the average sum of the number of process waiting in the run queue and number of process currently executing over the period of 1,5 and 15 minutes. Such that using the ‘top’ and ‘uptime’ command we find the load average of a Linux sever.
Get Govt. Certified Take Test