-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DiskIO values as extra attributes in Disk Entity #87
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! I will take a look on Windows, psutil docs says this:
Note: on Windows "diskperf -y" command may need to be executed first otherwise this function won’t find any disk.
It should be called in Initialize on Win, use self.RunCommand()
I don't see how this data is useful for anything this way though, if you see the example application, the difference of these numbers should be divided by the update frequency to get actual speed: https://github.com/giampaolo/psutil/blob/master/scripts/iotop.py These numbers are just sums, counts, not per second, so by itself they don't say much.
Haven't tested just read the code yet.
|
Co-authored-by: infeeeee <gyetpet@mailbox.org>
Doing this with self.RunCommand() at configuration and asking the user to reboot seems okay to me. |
I don't know if the command has to be run as admin, or it can be run as a regular user. If the former, we shouldn't call it here.
Ekkor: 2023. december 11. 18:04:51 CET, lockenkop ***@***.***> írta:
…> so I'd suggest the user to manually use that command in the cmd or ask the user if he wants to enable that characteristic and do it from IoTuring. Although, that would need the configurations to know which is the host OS.
Doing this with self.RunCommand() at configuration and asking the user to reboot seems okay to me.
I'll test if its possible to check for the availability during configuration and show this step if it needs the change and reboot.
Playing around with the windows side of things this week.
--
Reply to this email directly or view it on GitHub:
#87 (comment)
You are receiving this because you commented.
Message ID: ***@***.***>
|
Hi @lockenkop, which is the current state of this entity enhancement ? |
Hi, o had some personal stuff going on and I am abroad until April. I was about to get some coding done starting this week. Sadly my surface's battery decided to become balloon. This PR should be nearly done. I'll see if I can do some finishing on my phone. |
No problem, work on it when you'll have free time or write what's missing so someone else will do it 💪 |
psutil.disk_io_counters() in Disk Entity
Acording to psutil docs (https://psutil.readthedocs.io/en/latest/index.html#psutil.disk_io_counters)
most relevant values are supported on all except BSD.
Namely:
Other platform specific fields will only get accessed if on linux.
Windows may need an extra flag:
Currently tested only on Linux with Console Warehouse. I'll check windows and display in HomeAssistant further this week.