Skip to contentSkip to conversation

Monitoring Screen Activity in QEMU/KVM

Qemu-devel Claudio Fontana 2 participants 2 messages Jun 27, 2013

lore
Share & tools
lore
#0 lore raw
Quoted 9 lines · Shehbaz Jaffer

I want to determine the amount of screen activity taking place on VGA monitor/ Screen for different applications (eg. playing vlc video, normal typing.)

When I do not start the X server, I can easily determine the screen activity by counting the number of pages accessed in the region 0xA0000 - 0xBffff (This is the VGA Monitor region in boot screen).

However when I start the X Server, A diffrent set of pages are hit. Could anyone please explain how the VGA Monitor works in QEMU? Or if someone could suggest an alternate solution to determine amount of screen activity while playing diffrent applications?

[NOTE : I have already checked for the region where X server pages are mapped using cat /proc/iomem. But pages are not getting written to the "possible" X server mmapped region.]

Regards,

If you define "screen activity" = "number of pages accessed in the range 0xa0000-0xbffff per unit of time", you could keep your thing going by just using the generic "vga" driver in your Xorg configuration, and that would keep your model valid I think.

Claudio

#1 lore raw
Quoted 8 lines · Claudio Fontana
Quoted 6 lines · Shehbaz Jaffer

I want to determine the amount of screen activity taking place on VGA monitor/ Screen for different applications (eg. playing vlc video, normal typing.)

When I do not start the X server, I can easily determine the screen activity by counting the number of pages accessed in the region 0xA0000 - 0xBffff (This is the VGA Monitor region in boot screen).

However when I start the X Server, A diffrent set of pages are hit. Could anyone please explain how the VGA Monitor works in QEMU? Or if someone could suggest an alternate solution to determine amount of screen activity while playing diffrent applications?

Quoted 8 lines
Quoted 3 lines

[NOTE : I have already checked for the region where X server pages are mapped using cat /proc/iomem. But pages are not getting written to the "possible" X server mmapped region.]

Regards,

If you define "screen activity" = "number of pages accessed in the range 0xa0000-0xbffff per unit of time", you could keep your thing going by just using the generic "vga" driver in your Xorg configuration, and that would keep your model valid I think.

Pretty sure the vga driver will use VESA interfaces and the VESA BIOS will use PCI bar mapping.

You could also trap accesses to where the BAR gets mapped on the PCI device. Far better to just register a DisplayChangeListener though and let QEMU do the heavy lifting.

Or use VNC as Richard mentioned elsewhere.

Regards,

Anthony Liguori

Quoted 2 lines

Claudio