Monitoring server bandwidth
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I want to collect bandwidth usage statistics on my linux server.
What I want to do, is to write a function (probably will use php exec) that will return the number of bytes, and then store it in DB.
I had tried several methods, but all return complex data.
Is there a method to get simple bandwidth usage in bytes for the server.
I don't need to know which ip or service using it.
I need only in going and out going usage.
linux bandwidth
add a comment |Â
up vote
1
down vote
favorite
I want to collect bandwidth usage statistics on my linux server.
What I want to do, is to write a function (probably will use php exec) that will return the number of bytes, and then store it in DB.
I had tried several methods, but all return complex data.
Is there a method to get simple bandwidth usage in bytes for the server.
I don't need to know which ip or service using it.
I need only in going and out going usage.
linux bandwidth
1
Useifconfig
command for TX and RX bytes.
â Ipor Sircer
Jun 21 at 16:09
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I want to collect bandwidth usage statistics on my linux server.
What I want to do, is to write a function (probably will use php exec) that will return the number of bytes, and then store it in DB.
I had tried several methods, but all return complex data.
Is there a method to get simple bandwidth usage in bytes for the server.
I don't need to know which ip or service using it.
I need only in going and out going usage.
linux bandwidth
I want to collect bandwidth usage statistics on my linux server.
What I want to do, is to write a function (probably will use php exec) that will return the number of bytes, and then store it in DB.
I had tried several methods, but all return complex data.
Is there a method to get simple bandwidth usage in bytes for the server.
I don't need to know which ip or service using it.
I need only in going and out going usage.
linux bandwidth
asked Jun 21 at 15:23
matisa
306
306
1
Useifconfig
command for TX and RX bytes.
â Ipor Sircer
Jun 21 at 16:09
add a comment |Â
1
Useifconfig
command for TX and RX bytes.
â Ipor Sircer
Jun 21 at 16:09
1
1
Use
ifconfig
command for TX and RX bytes.â Ipor Sircer
Jun 21 at 16:09
Use
ifconfig
command for TX and RX bytes.â Ipor Sircer
Jun 21 at 16:09
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
See if this will work for you.
This will list the received bytes for eth0
ifconfig eth0 | grep 'RX b' | sed 's/:/ /g' | awk 'print $3'
This will list the sent bytes for eth0
ifconfig eth0 | grep 'RX b' | sed 's/:/ /g' | awk 'print $8'
If you need for other interfaces you can change the name.
This is great, but it gives me the total transmitted. Is there a way to get current transmitted on total over the last X time? Or the only way is to get delta over time?
â matisa
Jun 21 at 17:02
The amount of data per second must bae implemented at the level of the visualization program : grafana have a derivative function.
â MUY Belgium
Jun 21 at 17:21
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
See if this will work for you.
This will list the received bytes for eth0
ifconfig eth0 | grep 'RX b' | sed 's/:/ /g' | awk 'print $3'
This will list the sent bytes for eth0
ifconfig eth0 | grep 'RX b' | sed 's/:/ /g' | awk 'print $8'
If you need for other interfaces you can change the name.
This is great, but it gives me the total transmitted. Is there a way to get current transmitted on total over the last X time? Or the only way is to get delta over time?
â matisa
Jun 21 at 17:02
The amount of data per second must bae implemented at the level of the visualization program : grafana have a derivative function.
â MUY Belgium
Jun 21 at 17:21
add a comment |Â
up vote
1
down vote
accepted
See if this will work for you.
This will list the received bytes for eth0
ifconfig eth0 | grep 'RX b' | sed 's/:/ /g' | awk 'print $3'
This will list the sent bytes for eth0
ifconfig eth0 | grep 'RX b' | sed 's/:/ /g' | awk 'print $8'
If you need for other interfaces you can change the name.
This is great, but it gives me the total transmitted. Is there a way to get current transmitted on total over the last X time? Or the only way is to get delta over time?
â matisa
Jun 21 at 17:02
The amount of data per second must bae implemented at the level of the visualization program : grafana have a derivative function.
â MUY Belgium
Jun 21 at 17:21
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
See if this will work for you.
This will list the received bytes for eth0
ifconfig eth0 | grep 'RX b' | sed 's/:/ /g' | awk 'print $3'
This will list the sent bytes for eth0
ifconfig eth0 | grep 'RX b' | sed 's/:/ /g' | awk 'print $8'
If you need for other interfaces you can change the name.
See if this will work for you.
This will list the received bytes for eth0
ifconfig eth0 | grep 'RX b' | sed 's/:/ /g' | awk 'print $3'
This will list the sent bytes for eth0
ifconfig eth0 | grep 'RX b' | sed 's/:/ /g' | awk 'print $8'
If you need for other interfaces you can change the name.
answered Jun 21 at 16:34
K. Kirilov
514
514
This is great, but it gives me the total transmitted. Is there a way to get current transmitted on total over the last X time? Or the only way is to get delta over time?
â matisa
Jun 21 at 17:02
The amount of data per second must bae implemented at the level of the visualization program : grafana have a derivative function.
â MUY Belgium
Jun 21 at 17:21
add a comment |Â
This is great, but it gives me the total transmitted. Is there a way to get current transmitted on total over the last X time? Or the only way is to get delta over time?
â matisa
Jun 21 at 17:02
The amount of data per second must bae implemented at the level of the visualization program : grafana have a derivative function.
â MUY Belgium
Jun 21 at 17:21
This is great, but it gives me the total transmitted. Is there a way to get current transmitted on total over the last X time? Or the only way is to get delta over time?
â matisa
Jun 21 at 17:02
This is great, but it gives me the total transmitted. Is there a way to get current transmitted on total over the last X time? Or the only way is to get delta over time?
â matisa
Jun 21 at 17:02
The amount of data per second must bae implemented at the level of the visualization program : grafana have a derivative function.
â MUY Belgium
Jun 21 at 17:21
The amount of data per second must bae implemented at the level of the visualization program : grafana have a derivative function.
â MUY Belgium
Jun 21 at 17:21
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f451129%2fmonitoring-server-bandwidth%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Use
ifconfig
command for TX and RX bytes.â Ipor Sircer
Jun 21 at 16:09