Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Bash programming in linux Write a complete bash script that monitors the number of processes per user on the current CSE Linux machine where the

Bash programming in linux

Write a complete bash script that monitors the number of processes per user on the current CSE Linux machine where the script is running. In particular, you will count all processes and total them per user every 5 seconds and report each user ID with the number of processes running during that time frame. Note this will include system processes.

**This part I need help: If the user enters a list of user IDs as arguments to the program it should only report processes for those users. Example is shown below:

image text in transcribed

This is my current code for that part, Please fill in the missing codes. The output should be like the one above.

for i in $* do echo `date` echo "USER ID Count"

echo "$users USERS,TOTAL PROCESSES $total"

sleep 5 done

$ ./minor2.sh root uuidd WDJ0017 Sun 7 Feb 2021 11:19:06 PM CST User ID Count root 92 wdj 0017 8 uuidd 1 3 USERS, TOTAL PROCESSES 101

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions

Question

l Identify three internal sources for recruiting.

Answered: 1 week ago

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago