Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Python, write a script that determines all users that have processes running and the percentage of CPU time each user is occupying. Your script

Using Python, write a script that determines all users that have processes running and the percentage of CPU time each user is occupying.
Your script should accept 3 arguments:
Total amount of time to collect for
Time between samples
Output file
Your output file should include:
Users (this includes the System users) with running tasks.
A marker indicating if the user is currently logged on.
Average percentage of processor time across all samples.
The user may have multiple programs running for a sample. The user's total utilization for the sample is the sum of all of the programs.
The average here, is the average of each samples total.
Apply the secure coding principles we have talked about.
Input validation.
Input Canonicalization
Input Sanitization
Secure Error Handling & Exception Handling
Principle of Least Privilege.

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

Students also viewed these Databases questions

Question

What is a verb?

Answered: 1 week ago

Question

What will you do or say to Anthony about this issue?

Answered: 1 week ago