A
A
Alons2020-02-29 08:42:02
Python
Alons, 2020-02-29 08:42:02

How to calculate the time for disk processing requests?

I'm trying to calculate the percentage of time the disk is processing read or write requests - this is how this indicator is called in the win 10 task manager.
There is a similar topic on stackoverflow, but alas, no answer
https://stackoverflow.com/questions/...g-using-python
and she's been there for a long time.
The option indicated there could not be finalized, and it was also taken as a basis.
Exactly like
https://stackoverflow.com/questions/...e-using-python
and the links inside.
I need it for Windows, so I compare the indicators with the task manager. But on Linux I tried the same, no result.
The problem I'm trying to solve as follows sounds something like this: I need to know when all the applications will be downloaded on the machine. At this point, the CPU (obtained in 1 line of psutil) drops to 5%> and the disk is 5%> idle.
I managed to get data on the processor using psutil, but alas, this data is not enough to unambiguously decide that the system is idle.
How can I get this information on a disk using python? And/or are there alternative ways to tell if the PC is idle?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Armenian Radio, 2020-02-29
@gbg

Just wait a couple of minutes after starting?

J
javedimka, 2020-02-29
@javedimka

One thing in the title, another thing in the question, another thing in the comments. No, is everything okay?
Make your own web service, on the computer, add your script as the last item to autoload, which will pull your web service and say that all applications have started

A
Artem @Jump, 2020-02-29
curated by the

In short, I need to know when the PC is idle.
This happens only if no programs are running on it, including the OS.
A PC is a complex complex of different nodes interacting with each other.
Different nodes are idle at different times.
For example, if the processor is 100% loaded, then most of the other nodes will be idle most often.
Or, for example, the disk is 100% loaded - the processor does not receive data and is idle.
It looks like you're trying to measure something that doesn't exist.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question