IMAT5122 Computer Systems and Networks - Linux Change Logger Script
VerifiedAdded on 2022/11/16
|5
|1446
|410
Practical Assignment
AI Summary
This document presents a comprehensive solution for a Linux System Change Logger Script assignment, addressing the requirements of a Computer Systems and Networks module (IMAT5122). The script's design considerations are outlined, focusing on collecting data related to CPU and memory usage, network interfaces, and running processes. The document details the commands used for listing processes (ps command), identifying top CPU and RAM consumers, and listing user home directories. It also explains the use of commands like 'ip link show' for network interface monitoring, 'awk' for data manipulation and report generation, and 'cut' for specific data extraction. Furthermore, the document covers how to determine the operating system version and emphasizes the importance of resource management and performance monitoring. The solution highlights the use of multiple UNIX monitoring commands to diagnose and resolve performance bottlenecks. The document concludes by reflecting on the script's value in optimizing system performance and preventing resource degradation.

User instruction for the execution of the change logger script for Linux
Linux operating system is considered to be beneficial for individual users as well as the
bigger organizations. It is because of its features which are quite noteworthy enhancing
versatility of Linux operating system for various computing frameworks. Though it is preferred
by many, but like all other Operating Systems Linux has some vulnerabilities such as deadlock
issues, imperative breaches and many more.
There are certain commands those are available in the Linux Operating system; these
commands requires super user privilege over the basic clients, like requirement of root privilege
for execution of a command. In the Linux distributions such as Fedora and Ubuntu default root
level privileges are absent for the user in maximum cases. Thus the utilization of ‘sudo’ is
recommended for the execution of the shell scripts that accompanies and the generation of the
health report, and for all time vigilance of the process in the particular Linux server as and when
required.
Whenever any directory or a file is created in the Linux, it is automatically assigned the
default permissions depending upon the umask value. The umask value is set by the umask
command. There are certain digits in the command that specify various details of the permissions
granted, like the first digit of the command is the permission for the user who is the creator of the
file, the second digit represents the group’s permission from which the user belongs. The
permission for the other users is represented by the value in the third digit.
The ‘chmod’ command is suggested for making the script executable. Some files which
needs some specific access restrictions can make use of this command. The special mode flags
can be altered using this command.
Linux operating system is considered to be beneficial for individual users as well as the
bigger organizations. It is because of its features which are quite noteworthy enhancing
versatility of Linux operating system for various computing frameworks. Though it is preferred
by many, but like all other Operating Systems Linux has some vulnerabilities such as deadlock
issues, imperative breaches and many more.
There are certain commands those are available in the Linux Operating system; these
commands requires super user privilege over the basic clients, like requirement of root privilege
for execution of a command. In the Linux distributions such as Fedora and Ubuntu default root
level privileges are absent for the user in maximum cases. Thus the utilization of ‘sudo’ is
recommended for the execution of the shell scripts that accompanies and the generation of the
health report, and for all time vigilance of the process in the particular Linux server as and when
required.
Whenever any directory or a file is created in the Linux, it is automatically assigned the
default permissions depending upon the umask value. The umask value is set by the umask
command. There are certain digits in the command that specify various details of the permissions
granted, like the first digit of the command is the permission for the user who is the creator of the
file, the second digit represents the group’s permission from which the user belongs. The
permission for the other users is represented by the value in the third digit.
The ‘chmod’ command is suggested for making the script executable. Some files which
needs some specific access restrictions can make use of this command. The special mode flags
can be altered using this command.
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

The change of permission for a particular shell script can be achieved by the following
procedure:
chmod + x mySysMonitor.sh
After this change in permission is achieved, the following command is used to execute the script:
sudo_/ mySysMonitor.sh
Design consideration for health monitoring script:
To create a health monitoring script according to the project requirement, the script that
will be created generates a log after collection of data describing different allocations of the
Linux based system like the usage of the processor, memories as well as the utilization of the
resources. A script tracking usage of home directories, file usage and other processes; the
available interfaces for the different networks, their available status and list of USB devices will
be developed. This script will also check the on-going process.
Listing of the current processes:
The command used for listing all the process in the particular Linux operating is the
psCommand. The process status command or the ps is used for retrieving information of the
process which is running in the system currently. The out of this command include some unique
specification numbers which are known as the PIDs. The running instance of a program which is
a process inside the system is known as task.
List of top 5 CPU and RAM utilizing processes:
There are a few commands in Linux, which is used for listing top 5 CPU and RAM
consuming processes. They are;
ps -eo pid, ppid, cmd, %cpu, %mem --sort=-%mem | head
procedure:
chmod + x mySysMonitor.sh
After this change in permission is achieved, the following command is used to execute the script:
sudo_/ mySysMonitor.sh
Design consideration for health monitoring script:
To create a health monitoring script according to the project requirement, the script that
will be created generates a log after collection of data describing different allocations of the
Linux based system like the usage of the processor, memories as well as the utilization of the
resources. A script tracking usage of home directories, file usage and other processes; the
available interfaces for the different networks, their available status and list of USB devices will
be developed. This script will also check the on-going process.
Listing of the current processes:
The command used for listing all the process in the particular Linux operating is the
psCommand. The process status command or the ps is used for retrieving information of the
process which is running in the system currently. The out of this command include some unique
specification numbers which are known as the PIDs. The running instance of a program which is
a process inside the system is known as task.
List of top 5 CPU and RAM utilizing processes:
There are a few commands in Linux, which is used for listing top 5 CPU and RAM
consuming processes. They are;
ps -eo pid, ppid, cmd, %cpu, %mem --sort=-%mem | head

The extracting of any sort of data about the processes and sorting them according to their status
of memory consumption can be obtained by the usage of the above mention command.
Listing of the user home dictionary:
Key directories:
The top directories can be found out using the following command:
du -a /home | sort -n -r | head -n 5
The directory consisting of the maximum number of user data in different part of the operating
system can be listed using this command.
Network interfaces and their states:
In the latest versions of the Linux distributions, it is possible to list all the interfaces
available in the system using the ip link show command. The command ip link show is preffered
over the command ‘ifconfig’ command and it is proven in the researches. The latest versions of
the Linux is more compatible with this command over the ‘ifconfig’ command as the output
work better for it. This command can is of much use in utilization of dynamic routing,
containerized apps and many other network issues.
The awk command:
The command that is utilized for manipulating data and generation of reports is the awk
command. The command, awk, is a scripting language used for text processing. It can be used to
look for words, match and find certain specific patterns.
Administrators can use arithmetic and string operators, define variables, use and define
controlled loops and flow, and can generate customized and user defined reports. This utility tool
is capable of manipulating the collected data. This is done according to the fields taken from the
system and are placed in the general reports afterwards. Compiling is unnecessary in the Linux
of memory consumption can be obtained by the usage of the above mention command.
Listing of the user home dictionary:
Key directories:
The top directories can be found out using the following command:
du -a /home | sort -n -r | head -n 5
The directory consisting of the maximum number of user data in different part of the operating
system can be listed using this command.
Network interfaces and their states:
In the latest versions of the Linux distributions, it is possible to list all the interfaces
available in the system using the ip link show command. The command ip link show is preffered
over the command ‘ifconfig’ command and it is proven in the researches. The latest versions of
the Linux is more compatible with this command over the ‘ifconfig’ command as the output
work better for it. This command can is of much use in utilization of dynamic routing,
containerized apps and many other network issues.
The awk command:
The command that is utilized for manipulating data and generation of reports is the awk
command. The command, awk, is a scripting language used for text processing. It can be used to
look for words, match and find certain specific patterns.
Administrators can use arithmetic and string operators, define variables, use and define
controlled loops and flow, and can generate customized and user defined reports. This utility tool
is capable of manipulating the collected data. This is done according to the fields taken from the
system and are placed in the general reports afterwards. Compiling is unnecessary in the Linux
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

environment for this scripting language. Thus it is easier to manipulate strings numerical and
logical operations.
The script programmers or the system administrators can develop small and useful scripts
with the help of this tool. Simple Linux commands can be used for the development of the
smaller scripts which in terms are more useful. Text patterns can be extracted with the help of
this script and are important for health monitoring system. This text patterns are important for
any configuration file. The data that is extracted from the systems are placed in a specific format
of report. Wherever some kind of match is found at the time of retrieval, the retrieve results can
be carried out too.
Cut command:
It is command that helps the user to be more specific. Only a specific number of columns
or character from any file or results output can be extracted using this command. It acts as a filter
command as it is very important to mention the delimiter among the fields to cut out specific row
or column. The way in which the columns are divided in a text is identified by the delimiter so
that the command can identify the field sections.
Other information:
Version of the operating system:
There are certain commands which are used to find out the version of operating system
installed in the system. The cat/ etc/os-release are the commands used within the script for
finding out the OS version. The cat command is the abbreviation for “concatenate”. Amongst the
few most used command in Linux and UNIX operating system, cat is one of them. The cat
command allows the users to create single a\or multiple files according to the users’ requirement.
logical operations.
The script programmers or the system administrators can develop small and useful scripts
with the help of this tool. Simple Linux commands can be used for the development of the
smaller scripts which in terms are more useful. Text patterns can be extracted with the help of
this script and are important for health monitoring system. This text patterns are important for
any configuration file. The data that is extracted from the systems are placed in a specific format
of report. Wherever some kind of match is found at the time of retrieval, the retrieve results can
be carried out too.
Cut command:
It is command that helps the user to be more specific. Only a specific number of columns
or character from any file or results output can be extracted using this command. It acts as a filter
command as it is very important to mention the delimiter among the fields to cut out specific row
or column. The way in which the columns are divided in a text is identified by the delimiter so
that the command can identify the field sections.
Other information:
Version of the operating system:
There are certain commands which are used to find out the version of operating system
installed in the system. The cat/ etc/os-release are the commands used within the script for
finding out the OS version. The cat command is the abbreviation for “concatenate”. Amongst the
few most used command in Linux and UNIX operating system, cat is one of them. The cat
command allows the users to create single a\or multiple files according to the users’ requirement.
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

It also views the data contained in the file, the output of file can be redirected by the command
and the data of a file can be concatenated into another file with the help of this command.
Conclusion/ Reflection:
The importance of managing the available resources can be obtained by the script
designed for system help monitoring created in the Linux based operating system. The resource
management in a system is very essential as they can be used in optimized manner such that the
system do to struggle for the required essential resources like CPU and memory resources. The
administrators of the system can ensure the performance of the processes with the help of
performance monitoring, so that degradation of the process are prevented. The performance
monitor also checks for the zombie files which can consume resources and helps in removing
them.
There are scripts that uses multiple UNIX monitoring commands like ip link, show, ps .
They are very useful as they provide metrics for critical performances for the OS that helps in
upgrading performances of different operating systems processes. The performances are
managed by the system administrator to diagnose the cause of degrading performances and the
bottlenecks for the resource availability. Diagnosis of system performance using different tools
in a manual way can be very time consuming.
and the data of a file can be concatenated into another file with the help of this command.
Conclusion/ Reflection:
The importance of managing the available resources can be obtained by the script
designed for system help monitoring created in the Linux based operating system. The resource
management in a system is very essential as they can be used in optimized manner such that the
system do to struggle for the required essential resources like CPU and memory resources. The
administrators of the system can ensure the performance of the processes with the help of
performance monitoring, so that degradation of the process are prevented. The performance
monitor also checks for the zombie files which can consume resources and helps in removing
them.
There are scripts that uses multiple UNIX monitoring commands like ip link, show, ps .
They are very useful as they provide metrics for critical performances for the OS that helps in
upgrading performances of different operating systems processes. The performances are
managed by the system administrator to diagnose the cause of degrading performances and the
bottlenecks for the resource availability. Diagnosis of system performance using different tools
in a manual way can be very time consuming.
1 out of 5
Related Documents

Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
Copyright © 2020–2025 A2Z Services. All Rights Reserved. Developed and managed by ZUCOL.