Monitor network traffic per client

All we need is an easy explanation of the problem, so here it is.

I’m investigating intermittent performance issues on a database running MariaDB 10.4 and I notice extraordinarily high network traffic. Bytes_sent is about 20TB after running for 58 hours (379GB per hour). There are only 8 clients, and typical traffic is expected to be about 2GB per hour. Is there some way to monitor bytes_sent per client to help track down the issue?

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

MariaDB has a user statistics plugin that provides a breakdown per user.

It can be enabled dynamicly:

SET GLOBAL userstat=1;

And examined:


It seems like such a increase is potentially a brute force attempt or some abnormal use. I’d look at the SHOW PROCESSLIST and see if the queries being run are extraordinary and/or you’ll probably see there a client with more connections than expected.

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply