Question: 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 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
