Question
Script Requirements: Write a Bash script which provides information to the user comparing the statuses of processes and or threads. The specific information to be
Script Requirements:
Write a Bash script which provides information to the user comparing the statuses of processes and or threads.
The specific information to be provided to the user will be determined by the student but must display at least three different values.
The script will use the information from the /proc directory to provide the output.
The script will support multiple uses, which will include a help (-h or --h) option which will display basic usage information.
The script must allow for and use at least 2 command line arguments (in addition to help).
- Command line arguments can change the behavior of the script (e.g. choose what information to display date, time, users, memory used etc). This should relate directly to which function is called.
- Other command line arguments will be used to pass information to the script for searches (e.g. dates, times, user names, PID numbers etc).
The script must include at least three functions.
Some examples of comparisons the script may perform:
- Display the two processes most nearly identical in terms of run-time, memory size, etc.
- Display the processes which closely match specific input parameters for process attributes.
- Display processes which were launched from a particular directory or directory tree, or which were launched from similar locations.
- Display processes in adjacent or nearly adjacent memory locations.
- Display processes where Usernames have matching characteristics.
- Create an on-going list of all process names which have been used on the system.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started