Computer Systems and Networks - Shell Script for Monitoring System Changes
VerifiedAdded on 2023/05/29
|15
|4230
|150
AI Summary
This report demonstrates the usage of shell script for monitoring the changes in the computer system and generating a HTML page for displaying the details of the processes running on the system. It includes the specification for the installation of the script, design consideration, and extensive test results with exemplary log and screen output.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
Running head: COMPUTER SYSTEMS AND NETWORKS
IMAT5122 – Computer Systems and Networks
Name of the Student
Name of the University
Author’s Note
IMAT5122 – Computer Systems and Networks
Name of the Student
Name of the University
Author’s Note
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
1
COMPUTER SYSTEMS AND NETWORKS
Table of Contents
Introduction................................................................................................................................2
Specification for the installation and using the script................................................................2
Design Consideration.................................................................................................................2
Extensive test results with exemplary log and screen output...................................................11
Conclusion................................................................................................................................12
Bibliography.............................................................................................................................13
COMPUTER SYSTEMS AND NETWORKS
Table of Contents
Introduction................................................................................................................................2
Specification for the installation and using the script................................................................2
Design Consideration.................................................................................................................2
Extensive test results with exemplary log and screen output...................................................11
Conclusion................................................................................................................................12
Bibliography.............................................................................................................................13
2
COMPUTER SYSTEMS AND NETWORKS
Introduction
The report is prepared for the demonstration of the usage of shell script for monitoring
the changes in the computer system and generating a HTML page for displaying the details of
the processes running on the system. The specification for the installation of the script is
attached with the report that would help to understand the procedure followed for the
development of the shell script. An extensive test is done on the prepared shell script and the
screen shot of the result is attached with the report. In the last section the advantages and
disadvantage of the of the techniques are discussed with the details of the configurable logs
that can be used by the network administrator for finding the changes in the system.
Specification for the installation and using the script
For the development of the shell program an Ubuntu system is used and the nano
editor is used for the creation of the file named “mySysMonitor.sh”. The commands that are
needed for displaying the current processes, users currently logged in, Devices plugged in,
disk usage, network interface and other key information are used for the development of the
shell script. After adding the command in the shell script root permission is needed to be
added using the command “chmod +x mySysMonitor.sh” to the file for running the script.
The command used for running the shell program is “./mySysMonitor.sh”.
Design Consideration
For designing the shell script and generating the output local variables are declared
and it is called for generating the output. The output for each of the function is defined under
a menu and added to the html script for generating the output. The output of the command is
stored in a log file named as “MySysMonitor.log”, and it is result and the program is given
below:
COMPUTER SYSTEMS AND NETWORKS
Introduction
The report is prepared for the demonstration of the usage of shell script for monitoring
the changes in the computer system and generating a HTML page for displaying the details of
the processes running on the system. The specification for the installation of the script is
attached with the report that would help to understand the procedure followed for the
development of the shell script. An extensive test is done on the prepared shell script and the
screen shot of the result is attached with the report. In the last section the advantages and
disadvantage of the of the techniques are discussed with the details of the configurable logs
that can be used by the network administrator for finding the changes in the system.
Specification for the installation and using the script
For the development of the shell program an Ubuntu system is used and the nano
editor is used for the creation of the file named “mySysMonitor.sh”. The commands that are
needed for displaying the current processes, users currently logged in, Devices plugged in,
disk usage, network interface and other key information are used for the development of the
shell script. After adding the command in the shell script root permission is needed to be
added using the command “chmod +x mySysMonitor.sh” to the file for running the script.
The command used for running the shell program is “./mySysMonitor.sh”.
Design Consideration
For designing the shell script and generating the output local variables are declared
and it is called for generating the output. The output for each of the function is defined under
a menu and added to the html script for generating the output. The output of the command is
stored in a log file named as “MySysMonitor.log”, and it is result and the program is given
below:
3
COMPUTER SYSTEMS AND NETWORKS
#! /bin/bash
#Author : - Ubaidnazir
#Declaring variables
#set -x
#1) Current Processes:
echo "**********List of Current Process**********
$(ps -aux | sort -rk 3,3 | head -n 6)" >>mySysMonitor.log
current_processes_pid=`ps -ef | awk {'print$2'} | cut -f2 -d'-'`
current_processes_time=`ps -ef | awk {'print$5'} | cut -f2 -d'-'`
current_processes_process=`ps -ef | awk {'print$8'} | cut -f2 -d'-'`
#2) Users Currently Logged in:
echo " **********Users Currently Logged in*********
$(who)" >>mySysMonitor.log
Username_of_Current_logged_in_users=`who | awk {'print$1'} | cut -f1 -d','`
Date_of_Current_logged_in_users=`who | awk {'print$3'} | cut -f1 -d','`
Time_of_Current_logged_in_users=`who | awk {'print$4'} | cut -f1 -d','`
#3) Devices Plugged in
echo " **********Devices Plugged in**********
$(ls -l)" >>mySysMonitor.log
Plugged_in_Device_Permission=`ls -l /dev/ | awk {'print$1'}`
Plugged_in_Device_UID=`ls -l /dev/ | awk {'print$3'}`
Plugged_in_Device_Number=`ls -l /dev/ | awk {'print$6'}`
Plugged_in_Device_Month=`ls -l /dev/ | awk {'print$7'}`
Plugged_in_Device_Date=`ls -l /dev/ | awk {'print$8'}`
Plugged_in_Device_Time=`ls -l /dev/ | awk {'print$9'}`
Plugged_in_Device_Disk=`ls -l /dev/ | awk {'print$10'}`
#4) Disk Usage
echo "**********Disk Usage**********
COMPUTER SYSTEMS AND NETWORKS
#! /bin/bash
#Author : - Ubaidnazir
#Declaring variables
#set -x
#1) Current Processes:
echo "**********List of Current Process**********
$(ps -aux | sort -rk 3,3 | head -n 6)" >>mySysMonitor.log
current_processes_pid=`ps -ef | awk {'print$2'} | cut -f2 -d'-'`
current_processes_time=`ps -ef | awk {'print$5'} | cut -f2 -d'-'`
current_processes_process=`ps -ef | awk {'print$8'} | cut -f2 -d'-'`
#2) Users Currently Logged in:
echo " **********Users Currently Logged in*********
$(who)" >>mySysMonitor.log
Username_of_Current_logged_in_users=`who | awk {'print$1'} | cut -f1 -d','`
Date_of_Current_logged_in_users=`who | awk {'print$3'} | cut -f1 -d','`
Time_of_Current_logged_in_users=`who | awk {'print$4'} | cut -f1 -d','`
#3) Devices Plugged in
echo " **********Devices Plugged in**********
$(ls -l)" >>mySysMonitor.log
Plugged_in_Device_Permission=`ls -l /dev/ | awk {'print$1'}`
Plugged_in_Device_UID=`ls -l /dev/ | awk {'print$3'}`
Plugged_in_Device_Number=`ls -l /dev/ | awk {'print$6'}`
Plugged_in_Device_Month=`ls -l /dev/ | awk {'print$7'}`
Plugged_in_Device_Date=`ls -l /dev/ | awk {'print$8'}`
Plugged_in_Device_Time=`ls -l /dev/ | awk {'print$9'}`
Plugged_in_Device_Disk=`ls -l /dev/ | awk {'print$10'}`
#4) Disk Usage
echo "**********Disk Usage**********
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
4
COMPUTER SYSTEMS AND NETWORKS
$(du -sh)" >>mySysMonitor.log
overall_disk_usage=`du -sh | tail -l | awk {'print$1'}`
Plugged_in_Device_Number=`ls -l /dev/ | awk {'print$6'}`
home_directory_disk_usage=`du -sh /home/ | tail -l | awk {'print$1'}`
Disk_Usage_for_Other_Directory=`du -sh /home/student/Downloads | tail -l | awk
{'print$1'}`
#5)Network Interfaces and their states
echo "**********Network Interfaces and their states**********
$(ip -s link)" >>mySysMonitor.log
network_interface_status=`ip -s link`
#6)RAM Usage
echo "**********RAM Usage**********
$(free -hm)" >>mySysMonitor.log
Ram_Used=`free -hm | head -2 | tail -1 | awk {'print$3'}`
Total_Ram=`free -hm | head -2 | tail -1 | awk {'print$2'}`
#7)Current Operating System Version
echo "**********Current Operating System Version**********
$(uname -r)" >>mySysMonitor.log
OS_Information=`uname -r `
#Creating a directory if it doesn't exist to store reports first, for easy maintenance.
if [ ! -d ${HOME}/Linux_System_Monitor ]
then
mkdir ${HOME}/Linux_System_Monitor
fi
html="${HOME}/Linux_System_Monitor/Linux-System-Monitor-`hostname`-`date +%y%m
%d`-`date +%H%M`.html"
#Generating HTML file
echo "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">" >> $html
COMPUTER SYSTEMS AND NETWORKS
$(du -sh)" >>mySysMonitor.log
overall_disk_usage=`du -sh | tail -l | awk {'print$1'}`
Plugged_in_Device_Number=`ls -l /dev/ | awk {'print$6'}`
home_directory_disk_usage=`du -sh /home/ | tail -l | awk {'print$1'}`
Disk_Usage_for_Other_Directory=`du -sh /home/student/Downloads | tail -l | awk
{'print$1'}`
#5)Network Interfaces and their states
echo "**********Network Interfaces and their states**********
$(ip -s link)" >>mySysMonitor.log
network_interface_status=`ip -s link`
#6)RAM Usage
echo "**********RAM Usage**********
$(free -hm)" >>mySysMonitor.log
Ram_Used=`free -hm | head -2 | tail -1 | awk {'print$3'}`
Total_Ram=`free -hm | head -2 | tail -1 | awk {'print$2'}`
#7)Current Operating System Version
echo "**********Current Operating System Version**********
$(uname -r)" >>mySysMonitor.log
OS_Information=`uname -r `
#Creating a directory if it doesn't exist to store reports first, for easy maintenance.
if [ ! -d ${HOME}/Linux_System_Monitor ]
then
mkdir ${HOME}/Linux_System_Monitor
fi
html="${HOME}/Linux_System_Monitor/Linux-System-Monitor-`hostname`-`date +%y%m
%d`-`date +%H%M`.html"
#Generating HTML file
echo "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">" >> $html
5
COMPUTER SYSTEMS AND NETWORKS
echo "<html>" >> $html
echo "<head>" >> $html
echo "<title>mySysMonitor</title>" >> $html
echo "<meta charset="utf-8">" >> $html
echo "<meta name="viewport" content="width=device-width, initial-scale=1">" >> $html
echo "<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">" >> $html
echo "<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></
script>" >> $html
echo "<script
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>"
>> $html
echo "<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>" >>
$html
echo "</head>" >> $html
echo "<body>" >> $html
echo "<br>" >> $html
echo "<div class="container">" >> $html
echo "<fieldset>" >> $html
echo "<center>" >> $html
echo "<h2>Linux System Change Logger Script" >> $html
echo "<h3><legend>Script authored by Ubaidnazir</legend></h3>" >> $html
echo "</center>" >> $html
echo "</fieldset>" >> $html
echo "<br>" >> $html
echo "<!-- Nav pills -->" >> $html
echo "<ul class="nav nav-pills" role="tablist">" >> $html
echo "<li class="nav-item">" >> $html
echo "<a class="nav-link active" data-toggle="pill" href="#menu1">Current Processes
Running</a>" >> $html
echo "</li>" >> $html
echo "<li class="nav-item">" >> $html
COMPUTER SYSTEMS AND NETWORKS
echo "<html>" >> $html
echo "<head>" >> $html
echo "<title>mySysMonitor</title>" >> $html
echo "<meta charset="utf-8">" >> $html
echo "<meta name="viewport" content="width=device-width, initial-scale=1">" >> $html
echo "<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">" >> $html
echo "<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></
script>" >> $html
echo "<script
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>"
>> $html
echo "<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>" >>
$html
echo "</head>" >> $html
echo "<body>" >> $html
echo "<br>" >> $html
echo "<div class="container">" >> $html
echo "<fieldset>" >> $html
echo "<center>" >> $html
echo "<h2>Linux System Change Logger Script" >> $html
echo "<h3><legend>Script authored by Ubaidnazir</legend></h3>" >> $html
echo "</center>" >> $html
echo "</fieldset>" >> $html
echo "<br>" >> $html
echo "<!-- Nav pills -->" >> $html
echo "<ul class="nav nav-pills" role="tablist">" >> $html
echo "<li class="nav-item">" >> $html
echo "<a class="nav-link active" data-toggle="pill" href="#menu1">Current Processes
Running</a>" >> $html
echo "</li>" >> $html
echo "<li class="nav-item">" >> $html
6
COMPUTER SYSTEMS AND NETWORKS
echo "<a class="nav-link" data-toggle="pill" href="#menu2">Users Logged in</a>" >>
$html
echo "</li>" >> $html
echo "<li class="nav-item">" >> $html
echo "<a class="nav-link" data-toggle="pill" href="#menu3">Devices Plugged in</a>" >>
$html
echo "</li>" >> $html
echo "<li class="nav-item">" >> $html
echo "<a class="nav-link" data-toggle="pill" href="#menu4">Disk Usage</a>" >> $html
echo "</li>" >> $html
echo "<li class="nav-item">" >> $html
echo "<a class="nav-link" data-toggle="pill" href="#menu5">Networks</a>" >> $html
echo "</li>" >> $html
echo "<li class="nav-item">" >> $html
echo "<a class="nav-link" data-toggle="pill" href="#menu6">Ram Usage</a>" >> $html
echo "</li>" >> $html
echo "<li class="nav-item">" >> $html
echo "<a class="nav-link" data-toggle="pill" href="#menu7">Current Operating System
Version</a>" >> $html
echo "</li>" >> $html
echo "</ul>" >> $html
echo "</body>" >> $html
echo "</br>" >> $html
echo "<div class="tab-content">" >> $html
echo "<div id="menu1" class="tab-pane fade in active">" >> $html
echo "<h3>List of Current Processes Running</h3>" >> $html
echo "<br>" >> $html
echo "<table class="table table-striped">" >> $html
echo "<thead>" >> $html
echo "<tr>" >> $html
echo "<th>PID</th>" >> $html
echo "<th>Starting Time</th>" >> $html
echo "<th>Processes</th>" >> $html
COMPUTER SYSTEMS AND NETWORKS
echo "<a class="nav-link" data-toggle="pill" href="#menu2">Users Logged in</a>" >>
$html
echo "</li>" >> $html
echo "<li class="nav-item">" >> $html
echo "<a class="nav-link" data-toggle="pill" href="#menu3">Devices Plugged in</a>" >>
$html
echo "</li>" >> $html
echo "<li class="nav-item">" >> $html
echo "<a class="nav-link" data-toggle="pill" href="#menu4">Disk Usage</a>" >> $html
echo "</li>" >> $html
echo "<li class="nav-item">" >> $html
echo "<a class="nav-link" data-toggle="pill" href="#menu5">Networks</a>" >> $html
echo "</li>" >> $html
echo "<li class="nav-item">" >> $html
echo "<a class="nav-link" data-toggle="pill" href="#menu6">Ram Usage</a>" >> $html
echo "</li>" >> $html
echo "<li class="nav-item">" >> $html
echo "<a class="nav-link" data-toggle="pill" href="#menu7">Current Operating System
Version</a>" >> $html
echo "</li>" >> $html
echo "</ul>" >> $html
echo "</body>" >> $html
echo "</br>" >> $html
echo "<div class="tab-content">" >> $html
echo "<div id="menu1" class="tab-pane fade in active">" >> $html
echo "<h3>List of Current Processes Running</h3>" >> $html
echo "<br>" >> $html
echo "<table class="table table-striped">" >> $html
echo "<thead>" >> $html
echo "<tr>" >> $html
echo "<th>PID</th>" >> $html
echo "<th>Starting Time</th>" >> $html
echo "<th>Processes</th>" >> $html
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
7
COMPUTER SYSTEMS AND NETWORKS
echo "</tr>" >> $html
echo "</thead>" >> $html
echo "<tbody>" >> $html
echo "<tr>" >> $html
echo "<td>$current_processes_pid</td>" >> $html
echo "<td>$current_processes_time</td>" >> $html
echo "<td>$current_processes_time</td>" >> $html
echo "</tr>" >> $html
echo "</tbody>" >> $html
echo "</table>" >> $html
echo "</div>" >> $html
echo "<div id="menu2" class="tab-pane fade">" >> $html
echo "<h3>Currently Logged in Users</h3>" >> $html
echo "<br>" >> $html
echo "<table class="table table-striped">" >> $html
echo "<thead>" >> $html
echo "<tr>" >> $html
echo "<th>Username</th>" >> $html
echo "<th>From</th>" >> $html
echo "<th>Login Time</th>" >> $html
echo "</tr>" >> $html
echo "</thead>" >> $html
echo "<tbody>" >> $html
echo "<tr>" >> $html
echo "<td>$h</td>" >> $html
echo "<td>$Date_of_Current_logged_in_users</td>" >> $html
echo "<td>$Time_of_Current_logged_in_users</td>" >> $html
echo "</tr>" >> $html
echo "</tbody>" >> $html
echo "</table>" >> $html
echo "</div>" >> $html
echo "<div id="menu3" class="tab-pane fade">" >> $html
COMPUTER SYSTEMS AND NETWORKS
echo "</tr>" >> $html
echo "</thead>" >> $html
echo "<tbody>" >> $html
echo "<tr>" >> $html
echo "<td>$current_processes_pid</td>" >> $html
echo "<td>$current_processes_time</td>" >> $html
echo "<td>$current_processes_time</td>" >> $html
echo "</tr>" >> $html
echo "</tbody>" >> $html
echo "</table>" >> $html
echo "</div>" >> $html
echo "<div id="menu2" class="tab-pane fade">" >> $html
echo "<h3>Currently Logged in Users</h3>" >> $html
echo "<br>" >> $html
echo "<table class="table table-striped">" >> $html
echo "<thead>" >> $html
echo "<tr>" >> $html
echo "<th>Username</th>" >> $html
echo "<th>From</th>" >> $html
echo "<th>Login Time</th>" >> $html
echo "</tr>" >> $html
echo "</thead>" >> $html
echo "<tbody>" >> $html
echo "<tr>" >> $html
echo "<td>$h</td>" >> $html
echo "<td>$Date_of_Current_logged_in_users</td>" >> $html
echo "<td>$Time_of_Current_logged_in_users</td>" >> $html
echo "</tr>" >> $html
echo "</tbody>" >> $html
echo "</table>" >> $html
echo "</div>" >> $html
echo "<div id="menu3" class="tab-pane fade">" >> $html
8
COMPUTER SYSTEMS AND NETWORKS
echo "<h3>Currently Plugged in Devices</h3>" >> $html
echo "<br>" >> $html
echo "<table class="table table-striped">" >> $html
echo "<thead>" >> $html
echo "<tr>" >> $html
echo "<th>Permissions</th>" >> $html
echo "<th>UID</th>" >> $html
echo "<th>Disk Number</th>" >> $html
echo "<th>Month</th>" >> $html
echo "<th>Date</th>" >> $html
echo "<th>time</th>" >> $html
echo "<th>Disk Name</th>" >> $html
echo "</tr>" >> $html
echo "</thead>" >> $html
echo "<tbody>" >> $html
echo "<tr>" >> $html
echo "<td>$Plugged_in_Device_Permission</td>" >> $html
echo "<td>$Plugged_in_Device_UID</td>" >> $html
echo "<td>$Plugged_in_Device_Number</td>" >> $html
echo "<td>$Plugged_in_Device_Month</td>" >> $html
echo "<td>$Plugged_in_Device_Date</td>" >> $html
echo "<td>$Plugged_in_Device_Time</td>" >> $html
echo "<td>$Plugged_in_Device_Disk</td>" >> $html
echo "</tr>" >> $html
echo "</tbody>" >> $html
echo "</table>" >> $html
echo "</div>" >> $html
echo "<div id="menu4" class="tab-pane fade">" >> $html
echo "<h3>Overall Disk Usage</h3>" >> $html
echo "<br>" >> $html
echo "<table class="table table-striped">" >> $html
echo "<thead>" >> $html
COMPUTER SYSTEMS AND NETWORKS
echo "<h3>Currently Plugged in Devices</h3>" >> $html
echo "<br>" >> $html
echo "<table class="table table-striped">" >> $html
echo "<thead>" >> $html
echo "<tr>" >> $html
echo "<th>Permissions</th>" >> $html
echo "<th>UID</th>" >> $html
echo "<th>Disk Number</th>" >> $html
echo "<th>Month</th>" >> $html
echo "<th>Date</th>" >> $html
echo "<th>time</th>" >> $html
echo "<th>Disk Name</th>" >> $html
echo "</tr>" >> $html
echo "</thead>" >> $html
echo "<tbody>" >> $html
echo "<tr>" >> $html
echo "<td>$Plugged_in_Device_Permission</td>" >> $html
echo "<td>$Plugged_in_Device_UID</td>" >> $html
echo "<td>$Plugged_in_Device_Number</td>" >> $html
echo "<td>$Plugged_in_Device_Month</td>" >> $html
echo "<td>$Plugged_in_Device_Date</td>" >> $html
echo "<td>$Plugged_in_Device_Time</td>" >> $html
echo "<td>$Plugged_in_Device_Disk</td>" >> $html
echo "</tr>" >> $html
echo "</tbody>" >> $html
echo "</table>" >> $html
echo "</div>" >> $html
echo "<div id="menu4" class="tab-pane fade">" >> $html
echo "<h3>Overall Disk Usage</h3>" >> $html
echo "<br>" >> $html
echo "<table class="table table-striped">" >> $html
echo "<thead>" >> $html
9
COMPUTER SYSTEMS AND NETWORKS
echo "<tr>" >> $html
echo "<th>Overall Disk Size</th>" >> $html
echo "</tr>" >> $html
echo "</thead>" >> $html
echo "<tbody>" >> $html
echo "<tr>" >> $html
echo "<td>$overall_disk_usage</td>" >> $html
echo "</tr>" >> $html
echo "</tbody>" >> $html
echo "</table>" >> $html
echo "<h3>Users Home-Directory Disk Usage</h3>" >> $html
echo "<table class="table table-striped">" >> $html
echo "<thead>" >> $html
echo "<tr>" >> $html
echo "<th>Home Directory Size</th>" >> $html
echo "</tr>" >> $html
echo "</thead>" >> $html
echo "<tbody>" >> $html
echo "<tr>" >> $html
echo "<td>$home_directory_disk_usage</td>" >> $html
echo "</tr>" >> $html
echo "</tbody>" >> $html
echo "</table>" >> $html
echo "<h3>Other Key Directories (Disk Usage of Download Directory)</h3>" >> $html
echo "<br>" >> $html
echo "<table class="table table-striped">" >> $html
echo "<thead>" >> $html
echo "<tr>" >> $html
echo "<th>Other Directory Disk Size</th>" >> $html
echo "</tr>" >> $html
echo "</thead>" >> $html
COMPUTER SYSTEMS AND NETWORKS
echo "<tr>" >> $html
echo "<th>Overall Disk Size</th>" >> $html
echo "</tr>" >> $html
echo "</thead>" >> $html
echo "<tbody>" >> $html
echo "<tr>" >> $html
echo "<td>$overall_disk_usage</td>" >> $html
echo "</tr>" >> $html
echo "</tbody>" >> $html
echo "</table>" >> $html
echo "<h3>Users Home-Directory Disk Usage</h3>" >> $html
echo "<table class="table table-striped">" >> $html
echo "<thead>" >> $html
echo "<tr>" >> $html
echo "<th>Home Directory Size</th>" >> $html
echo "</tr>" >> $html
echo "</thead>" >> $html
echo "<tbody>" >> $html
echo "<tr>" >> $html
echo "<td>$home_directory_disk_usage</td>" >> $html
echo "</tr>" >> $html
echo "</tbody>" >> $html
echo "</table>" >> $html
echo "<h3>Other Key Directories (Disk Usage of Download Directory)</h3>" >> $html
echo "<br>" >> $html
echo "<table class="table table-striped">" >> $html
echo "<thead>" >> $html
echo "<tr>" >> $html
echo "<th>Other Directory Disk Size</th>" >> $html
echo "</tr>" >> $html
echo "</thead>" >> $html
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
10
COMPUTER SYSTEMS AND NETWORKS
echo "<tbody>" >> $html
echo "<tr>" >> $html
echo "<td>$Disk_Usage_for_Other_Directory</td>" >> $html
echo "</tr>" >> $html
echo "</tbody>" >> $html
echo "</table>" >> $html
echo "</div>" >> $html
echo "<div id="menu5" class="tab-pane fade">" >> $html
echo "<h3>Networks</h3>" >> $html
echo "<p>$Network_Status_Interface</p>" >> $html
echo "</div>" >> $html
echo "<div id="menu6" class="tab-pane fade">" >> $html
echo "<h3>RAM Usage</h3>" >> $html
echo "<br>" >> $html
echo "<table class="table table-striped">" >> $html
echo "<thead>" >> $html
echo "<tr>" >> $html
echo "<th>Used RAM Size</th>" >> $html
echo "</tr>" >> $html
echo "</thead>" >> $html
echo "<tbody>" >> $html
echo "<tr>" >> $html
echo "<td>$Ram_Used</td>" >> $html
echo "</tr>" >> $html
echo "<thead>" >> $html
echo "<tr>" >> $html
echo "<th>Total RAM Size</th>" >> $html
echo "</tr>" >> $html
echo "</thead>" >> $html
echo "<tbody>" >> $html
echo "<tr>" >> $html
echo "<td>$Total_Ram</td>" >> $html
COMPUTER SYSTEMS AND NETWORKS
echo "<tbody>" >> $html
echo "<tr>" >> $html
echo "<td>$Disk_Usage_for_Other_Directory</td>" >> $html
echo "</tr>" >> $html
echo "</tbody>" >> $html
echo "</table>" >> $html
echo "</div>" >> $html
echo "<div id="menu5" class="tab-pane fade">" >> $html
echo "<h3>Networks</h3>" >> $html
echo "<p>$Network_Status_Interface</p>" >> $html
echo "</div>" >> $html
echo "<div id="menu6" class="tab-pane fade">" >> $html
echo "<h3>RAM Usage</h3>" >> $html
echo "<br>" >> $html
echo "<table class="table table-striped">" >> $html
echo "<thead>" >> $html
echo "<tr>" >> $html
echo "<th>Used RAM Size</th>" >> $html
echo "</tr>" >> $html
echo "</thead>" >> $html
echo "<tbody>" >> $html
echo "<tr>" >> $html
echo "<td>$Ram_Used</td>" >> $html
echo "</tr>" >> $html
echo "<thead>" >> $html
echo "<tr>" >> $html
echo "<th>Total RAM Size</th>" >> $html
echo "</tr>" >> $html
echo "</thead>" >> $html
echo "<tbody>" >> $html
echo "<tr>" >> $html
echo "<td>$Total_Ram</td>" >> $html
11
COMPUTER SYSTEMS AND NETWORKS
echo "</tr>" >> $html
echo "</tbody>" >> $html
echo "</table>" >> $html
echo "</div>" >> $html
echo "<div id="menu7" class="tab-pane fade">" >> $html
echo "<h5>Current Operating System Version</h5>" >> $html
echo "<br>" >> $html
echo "<h5><p>$OS_Information</p></h5>" >> $html
echo "</div>" >> $html
echo "</div>" >> $html
echo "</body>" >> $html
echo "</html>" >> $html
Extensive test results with exemplary log and screen output
COMPUTER SYSTEMS AND NETWORKS
echo "</tr>" >> $html
echo "</tbody>" >> $html
echo "</table>" >> $html
echo "</div>" >> $html
echo "<div id="menu7" class="tab-pane fade">" >> $html
echo "<h5>Current Operating System Version</h5>" >> $html
echo "<br>" >> $html
echo "<h5><p>$OS_Information</p></h5>" >> $html
echo "</div>" >> $html
echo "</div>" >> $html
echo "</body>" >> $html
echo "</html>" >> $html
Extensive test results with exemplary log and screen output
12
COMPUTER SYSTEMS AND NETWORKS
Conclusion
From the above report it can be concluded that the creation of the shell script can help
the network administrator to actively involve in the changes that have been made in the
system. The tail -f command is used for comparing the changes and getting the changes at a
singe instance. The output is displayed in a html page that can be opened in any web browser
and simplify the interface for getting the process changes on clicking the link and find the
desired changes in the system. For the development of the report a research is done on the
different commands used for getting the details of the processes, users logged in the system,
plugged in devices, disk usage, state of network and the interface and other relevant
information such as available memory, consumed memory, etc. The commands used for the
development of the shell script is also given in the design consideration section of the report.
COMPUTER SYSTEMS AND NETWORKS
Conclusion
From the above report it can be concluded that the creation of the shell script can help
the network administrator to actively involve in the changes that have been made in the
system. The tail -f command is used for comparing the changes and getting the changes at a
singe instance. The output is displayed in a html page that can be opened in any web browser
and simplify the interface for getting the process changes on clicking the link and find the
desired changes in the system. For the development of the report a research is done on the
different commands used for getting the details of the processes, users logged in the system,
plugged in devices, disk usage, state of network and the interface and other relevant
information such as available memory, consumed memory, etc. The commands used for the
development of the shell script is also given in the design consideration section of the report.
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
13
COMPUTER SYSTEMS AND NETWORKS
Bibliography
Cook, J., 2017. Interactive Programming. In Docker for Data Science (pp. 49-70). Apress,
Berkeley, CA.
Flynt, C., Lakshman, S. and Tushar, S., 2017. Linux Shell Scripting Cookbook. Packt
Publishing Ltd.
Jang, M. and Orsaria, A., 2016. RHCSA/RHCE Red Hat Linux Certification Study Guide
(Exams EX200 & EX300). McGraw-Hill Education Group.
Lin, X.V., Wang, C., Zettlemoyer, L. and Ernst, M.D., 2018. NL2Bash: A Corpus and
Semantic Parser for Natural Language Interface to the Linux Operating System. arXiv
preprint arXiv:1802.08979.
Mishra, D. and Khandelwal, G., 2018. Command-Line Tools in Linux for Handling Large
Data Files. In Bioinformatics: Sequences, Structures, Phylogeny (pp. 375-392). Springer,
Singapore.
Rybczyński, M., Stefanek, G., Broniowski, W. and Bożek, P., 2014. GLISSANDO 2:
GLauber Initial-State Simulation AND mOre…, ver. 2. Computer Physics Communications,
185(6), pp.1759-1772.
Shen, Z., 2015. A Gentler Introduction to Unix.
Stevens, W.R. and Rago, S.A., 2013. Advanced programming in the UNIX environment.
Addison-Wesley.
Taylor, D. and Perry, B., 2016. Wicked Cool Shell Scripts: 101 Scripts for Linux, OS X, and
UNIX Systems. No Starch Press.
COMPUTER SYSTEMS AND NETWORKS
Bibliography
Cook, J., 2017. Interactive Programming. In Docker for Data Science (pp. 49-70). Apress,
Berkeley, CA.
Flynt, C., Lakshman, S. and Tushar, S., 2017. Linux Shell Scripting Cookbook. Packt
Publishing Ltd.
Jang, M. and Orsaria, A., 2016. RHCSA/RHCE Red Hat Linux Certification Study Guide
(Exams EX200 & EX300). McGraw-Hill Education Group.
Lin, X.V., Wang, C., Zettlemoyer, L. and Ernst, M.D., 2018. NL2Bash: A Corpus and
Semantic Parser for Natural Language Interface to the Linux Operating System. arXiv
preprint arXiv:1802.08979.
Mishra, D. and Khandelwal, G., 2018. Command-Line Tools in Linux for Handling Large
Data Files. In Bioinformatics: Sequences, Structures, Phylogeny (pp. 375-392). Springer,
Singapore.
Rybczyński, M., Stefanek, G., Broniowski, W. and Bożek, P., 2014. GLISSANDO 2:
GLauber Initial-State Simulation AND mOre…, ver. 2. Computer Physics Communications,
185(6), pp.1759-1772.
Shen, Z., 2015. A Gentler Introduction to Unix.
Stevens, W.R. and Rago, S.A., 2013. Advanced programming in the UNIX environment.
Addison-Wesley.
Taylor, D. and Perry, B., 2016. Wicked Cool Shell Scripts: 101 Scripts for Linux, OS X, and
UNIX Systems. No Starch Press.
14
COMPUTER SYSTEMS AND NETWORKS
Wang, B., Lu, K. and Chang, P., 2016, August. Design and implementation of Linux firewall
based on the frame of Netfilter/IPtable. In Computer Science & Education (ICCSE), 2016
11th International Conference on (pp. 949-953). IEEE.
COMPUTER SYSTEMS AND NETWORKS
Wang, B., Lu, K. and Chang, P., 2016, August. Design and implementation of Linux firewall
based on the frame of Netfilter/IPtable. In Computer Science & Education (ICCSE), 2016
11th International Conference on (pp. 949-953). IEEE.
1 out of 15
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
© 2024 | Zucol Services PVT LTD | All rights reserved.