 in most of linux. If for any reason this package is no installed , then use below yum command to install it manually :
# yum install sos
Generate the report
Open the terminal type sosreport command :
This command will normally complete within a few minutes. Depending on local configuration and the options specified in some cases the command may take longer to finish. Once completed, sosreport will generate a compressed a file under /tmp folder. The file should be provided to Redhat support representative as an attachment to open a support case.
Ques 13. What is swappiness in Linux Memory Management and how do we configure that ?
Ans – The swappiness parameter controls the tendency of the kernel to move processes out of physical memory and onto the swap disk. Because disks are much slower than RAM, this can lead to slower response times for system and applications if processes are too aggressively moved out of memory.
swappiness can have a value of between 0 and 100
swappiness=0 tells the kernel to avoid swapping processes out of physical memory for as long as possible
swappiness=100 tells the kernel to aggressively swap processes out of physical memory and move them to swap cache
The default setting in Redhat/Ubuntu based Linux distros is swappiness=60. Reducing the default value of swappiness will probably improve overall performance for a typical Ubuntu desktop installation.
~$ cat /proc/sys/vm/swappiness 60
If we have enough RAM, we can turn that down to 10 or 15. The swap file will then only be used when the RAM usage is around 80 or 90 percent.
To change the system swappiness value, open /etc/sysctl.conf as root. Then, change or add this line to the file:
vm.swappiness = 10
Reboot for the change to take effect
You can also change the value while your system is still running
We can also clear swap by running swapoff -a and then swapon -a as root instead of rebooting to achieve the same effect.
Ques 14. What is git ?
Ans : Git is a very popular and efficient open source Version Control System. It tracks content such as files and directories. It stores the file content in BLOBs – binary large objects. The folders are represented as trees. Each tree contains other trees (subfolders) and BLOBs along with a simple text file which consists of the mode, type, name and Secure Hash Algorithm of each blob and subtree entry. During repository transfers, even if there are several files with the same content and different names, the GIT software will transfer the BLOB once and then expand it to the different files.
Ques 15. What is inode ? Briefly explain the structure ?
Ans : Inode is a data structure that keeps track of all the information about a file. When we keep our information in a file and the OS stores the information about a file in an inode. Information about files is sometimes called metadata. We can say that an inode is metadata of the data. In a file system, inodes consist roughly of 1% of the total disk space, whether it is a whole storage unit or a partition on a storage unit. The inode space is used to ?track? the files stored on the hard disk. The inode entries store metadata about each file, directory or object, but only points to these structures rather than storing the data. Each entry is 128 bytes in size. The metadata contained about each structure can include the following:
Access Control List (ACL)
Direct/indirect disk blocks
Number of blocks
File access, change and modification time
File deletion time
File generation number
Number of links
Inode structure of a directory consists of a name to inode mapping of files and directories in that directory.In a directory, You can find the inode number corresponding to the files using the command “ls -i”
#ls -i 786727 -rw------- 1 root root 4226530 May 29 13:17 sudo.log 786437 -rw-------. 1 root root 32640 Jun 23 20:11 tallylog 786440 -rw-rw-r--. 1 root utmp 276096 Jul 20 06:45 wtmp 786741 -rw------- 1 root root 9653 Jul 17 09:38 yum.log
Similar way, the number of inodes allocated, used and free in a Filesystem can be listed using “df -i” command
# df -i /root Fi