(Sorry if this isn't linked to the original thread, my qubes-devel
subscription messed up and I don't have a reference to the original.)
>> It shows the memory actually in use by programs (hatched/dotted area)
>> as
>> well as the full allocation for the VM (the whole pie slice).
>>
>>
https://github.com/johnyjukya/qmemmon
FYI, updated version on github that fixes the Tooltip information (and
some general tidying up).
>> Obviously, never run any new code in dom0 unless you know what you're
>> doing,
>> and you've preferrably looked over the code yourself. This is 170-ish
>> lines
>> of Python, so giving it a sanity check isn't a huge deal.
Holger Levsen wrote:
> agreed (+done so), but I still dont want to run more qt stuff in dom0…
> :)
>
> however, this might be just me + now, I also do think that the
> information
> this tool is providing is currently missing in QubesOS and that *maybe*
> your
> tool could be tuned to be included by default…
Yes, this tool would most naturally and elegantly be part of
qubes-manager.py. Looking over the manager's code provided the
inspiration for the monitor.
And it's written in Python with Qt4, same to the manager, using the same
PyQt4/Qubes libs.
Since the manager is somewhat "sacred" and not to be updated lightly I
figured separating out the monitor for early feedback might be more
practical to get rolling.
> However, I'm wondering whether it would be possible to split it: do the
> data
> collection in dom0, cause thats where it has to be done and do the data
> processing and presentation in a VM (either existing or specially
> started dispVM).
I'm not sure what you'd gain, other than isolating the new code (which,
as it's author, isn't a big concern for me personally :)).
I would estimate that the code involved in moving the data around would
be more than the 170-ish lines of Python code in the dom0 qmemmon.py,
and more prone to the potential error/failure of moving data around.
The current qubes-manager pokes through xenstore to get its data, then
uses PyQt4 to present it, all in dom0.
This utility does the same thing (xenstore/pyqt4) so you're not adding
any new library/tool/executable dependencies in dom0 over what the
manager requires.
If you tried to present in in a domU, you're exposing all of the memory
information from all domU's to the domU you're using for presentation,
rather than keeping it aggregated in xenstore in dom0 (as is the current
case).
Given that the graphical monitor uses the same tech/libs as
qubes-manager in dom0, I'd say that it's safer (adds less new attack
surface) to keep it as is in dom0, rather than trying to shuffle spread
the data to a domU for presentation and the associated risks of errors
and data leaks.
I'll look at doing a minimal set of patches to integrate the
functionality qubes-manager. Since the manager collects/summarizes the
same information anyway, the code changes for the pie chart etc. might
be quite small. I have a handful of cosmetic improvements I make to my
own copy of the manager, which I'll toss out there as well. Stay tuned.
-JJ