Bug 794562

Summary: virtio-console: Show bytes received / sent statistics per port
Product: Red Hat Enterprise Linux 7 Reporter: Qunfang Zhang <qzhang>
Component: qemu-kvmAssignee: Amit Shah <amit.shah>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, amit.shah, bsarathy, juzhang, knoel, mdeng, michen, mkenneth, rhod, shuang, shu, virt-maint
Target Milestone: rcKeywords: Reopened
Target Release: 7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-14 12:33:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Qunfang Zhang 2012-02-17 05:34:24 UTC
Description of problem:
In bug 772194 some counters were added to the kernel code then to check the bytes sent, received and discarded values during virtio serial communication.

File this bug for the host qemu part, 

For testing, do this in the guest:
(qemu)info qtree should show something like:

(qemu) info qtree
dev: virtserialport, id "port0"
            dev-prop: nr = 1
            dev-prop: chardev = channel0
            dev-prop: name = "org.linux-kvm.port.0"
            port 1, guest off, host on, throttle off, bytes_sent 0,
bytes_received 3085535232, bytes_discarded: 6229302441870433721


Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.230.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. find out the size of the original file (ls -l) in the guest.

2. start transmit of file from guest->host, perform Ctrl+C and redirect to new
file

3. check file sizes of the two host files, add them.

4. check 'bytes_received' value in 'info qtree' output.

5. check 'bytes_discarded' value in 'info qtree' output.

6. check 'bytes_sent' value in GUEST debugfs port

7. Add numbers in step 3 and step 5.

8. Verify: number in step 6 is same as number in step 1

9. Verify: number in step 6 is same as number in step 4

10. Verify: number in step 7 is equal to or slightly less than step 1.  The
number might be slightly lesser since the bytes may have been discarded by
qemu's chardev layer and not virtio-serial.


Actual results:


Expected results:
If all this matches, everything works according to expectation.

Additional info:

Comment 3 RHEL Program Management 2012-07-10 07:00:18 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 4 RHEL Program Management 2012-07-11 02:02:33 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 5 Amit Shah 2012-07-23 11:12:09 UTC
We haven't decided upstream how best to expose debug info.  Closing for now.

Comment 8 Amit Shah 2013-11-14 12:33:03 UTC
QEMU upstream still doesn't have a good way to show debug info, so closing this one.  If we ever need stats later, we'll get to this again.