WEEK 11
System Monitoring
�����System Monitoring��������
System monitoring involves
�����������
Linux system monitoring programs ensure that
Linux system monitors look at
���Linux System Monitoring Tools/Commands����
Commands | Description |
top | Process activity monitoring command |
vmstat | Virtual memory statistics |
w | displays information about the users currently on the machine, and their processes. |
uptime | Tell how long the Linux system has been running |
Log Maintenance
Few Log Files
File name | Information |
/var/log/messages | Contains global system messages, including the messages that are logged during system startup. |
/var/log/auth.log | Contains system authorization information, including user logins and authentication mechanism that were used. |
/var/log/boot.log | Contains information that are logged when the system boots |
/var/log/lastlog | Displays the recent login information for all the users |
/var/log/user.log | Contains information about all user level logs |
/var/log/btmp | This file contains information about failed login attemps |
System Information
option | action |
-v | displays version of kernel |
-m | to know the hadware architecture |
-o | name of the OS |
The uname Command
$uname -option
Get hardware Information with lshw: The lshw utility enables user to fetch important hardware information such as memory, CPU, disks, etc. from system. Run the following command as a super user in order to view this information:�
Get CPU Information with lscpu: The lscpu utility lists detailed CPU information from the files sysfs and /proc/cpuinfo to your screen�
System Architecture
Kernel: The kernel is one of the core section of an operating system. It is responsible for each of the major actions of the Linux OS. The kernel hides details of low-level hardware or application programs to the system.
System Libraries: These libraries can be specified as some special functions. These are applied for implementing the operating system's functionality
System Utility Programs: It is responsible for doing specialized level and individual activities.
Hardware layer: Linux operating system contains a hardware layer that consists of several peripheral devices like monitor,Keyboard,HDD,RAM
Shell: It is an interface among the kernel and user. Ex. Korn shell,c shell,bash shell
System Maintenance
System Maintenance means
Levels of System Maintenance
Hardware maintenance :
maintaining physical components that make up the system.
Software maintenance :
Configuration and update of the operating system.
Database maintenance
Protection, detection and cleaning of malware (viruses, Trojans, spyware, etc.) that can be found on computers.
Documentation maintenance:
will ensure that the documentation is up to date and available for use.
System Maintenance commands
Shutdown
shutdown –h
System Maintenance commands
Rebooting
halt
LINUX BOOT PROCESS AND RUN LEVELS
�����What is Booting ?�������
Booting is the process which is initiated once the computer system starts and executes small set of instructions present in the ROM which will setup system hardware by testing them and load the operating system so that computer system can carry out further tasks.
�����Types of Booting��������
There are two types of Booting available:
����Boot Sequence in OS (Steps in Booting)����
Linux Boot Process (step by step)
BIOS
MBR
GRUB
KERNEL
0 – halt
1 – Single user mode
2 – Multiuser, without NFS
3 – Full multiuser mode
4 – unused
5 – X11
6 – reboot
INIT
Run level 0 – /etc/rc.d/rc0.d/
Run level 1 – /etc/rc.d/rc1.d/
Run level 2 – /etc/rc.d/rc2.d/
Run level 3 – /etc/rc.d/rc3.d/
Run level 4 – /etc/rc.d/rc4.d/
Run level 5 – /etc/rc.d/rc5.d/
Run level 6 – /etc/rc.d/rc6.d/
Run level Programs
LINUX Run Levels
Changing run level
// using sudo to execute telinit
# sudo telinit 5
Need for changing the run level
echo $RUNLEVEL
System Updates
SYSTEM UPDATES AND REPOSITORIES
System Repositories(repo)
Benefits of repository
Types of repositories in Ubuntu
In addition to these repositories, you can also add third-party repositories
To see the list of repositories that you have in your Ubuntu distro, open up a Terminal session (Control + Alt + T) and execute the following command:
sudo nano /etc/apt/sources.list
Linux package management with YUM and RPM
YUM
RPM
For example, install mode
-i installs package
-U upgrades package