Output of nettop command
up vote
3
down vote
favorite
I want to calculate net transfer of bytes(in & out) for every 2 seconds.
I'm using nettop
to know the usage(bytes_in
and bytes_out
).
Command:
nettop -x -k state -k interface -k rx_dupe -k rx_ooo -k re-tx -k rtt_avg -k rcvsize -k tx_win -k tc_class -k tc_mgt -k cc_algo -k P -k C -k R -k W -l 1 -t wifi -t wired
Taking bytes_in
bytes_out
according to application summary.
1Q). The data(bytes_in
and bytes_out
) displayed is calculated from startup for every application. Am I right?
I thought I'm right and ran the nettop
command two times with 2 seconds interval and subtracted these two values to get the net transfer of bytes for 2 seconds.
But sometimes, the first output is greater than second output.
2Q). How is that possible? Always the second output must be greater or equal to first output right?
OS: macOS Sierra.
networking macos command-line terminal
add a comment |
up vote
3
down vote
favorite
I want to calculate net transfer of bytes(in & out) for every 2 seconds.
I'm using nettop
to know the usage(bytes_in
and bytes_out
).
Command:
nettop -x -k state -k interface -k rx_dupe -k rx_ooo -k re-tx -k rtt_avg -k rcvsize -k tx_win -k tc_class -k tc_mgt -k cc_algo -k P -k C -k R -k W -l 1 -t wifi -t wired
Taking bytes_in
bytes_out
according to application summary.
1Q). The data(bytes_in
and bytes_out
) displayed is calculated from startup for every application. Am I right?
I thought I'm right and ran the nettop
command two times with 2 seconds interval and subtracted these two values to get the net transfer of bytes for 2 seconds.
But sometimes, the first output is greater than second output.
2Q). How is that possible? Always the second output must be greater or equal to first output right?
OS: macOS Sierra.
networking macos command-line terminal
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I want to calculate net transfer of bytes(in & out) for every 2 seconds.
I'm using nettop
to know the usage(bytes_in
and bytes_out
).
Command:
nettop -x -k state -k interface -k rx_dupe -k rx_ooo -k re-tx -k rtt_avg -k rcvsize -k tx_win -k tc_class -k tc_mgt -k cc_algo -k P -k C -k R -k W -l 1 -t wifi -t wired
Taking bytes_in
bytes_out
according to application summary.
1Q). The data(bytes_in
and bytes_out
) displayed is calculated from startup for every application. Am I right?
I thought I'm right and ran the nettop
command two times with 2 seconds interval and subtracted these two values to get the net transfer of bytes for 2 seconds.
But sometimes, the first output is greater than second output.
2Q). How is that possible? Always the second output must be greater or equal to first output right?
OS: macOS Sierra.
networking macos command-line terminal
I want to calculate net transfer of bytes(in & out) for every 2 seconds.
I'm using nettop
to know the usage(bytes_in
and bytes_out
).
Command:
nettop -x -k state -k interface -k rx_dupe -k rx_ooo -k re-tx -k rtt_avg -k rcvsize -k tx_win -k tc_class -k tc_mgt -k cc_algo -k P -k C -k R -k W -l 1 -t wifi -t wired
Taking bytes_in
bytes_out
according to application summary.
1Q). The data(bytes_in
and bytes_out
) displayed is calculated from startup for every application. Am I right?
I thought I'm right and ran the nettop
command two times with 2 seconds interval and subtracted these two values to get the net transfer of bytes for 2 seconds.
But sometimes, the first output is greater than second output.
2Q). How is that possible? Always the second output must be greater or equal to first output right?
OS: macOS Sierra.
networking macos command-line terminal
networking macos command-line terminal
edited Mar 22 '17 at 12:04
asked Mar 22 '17 at 10:49
SkrewEverything
2007
2007
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
It would make sense if the statistics were "calculated from startup for every application" but this doesn't appear to be the case. Confusingly, nettop maintains running totals since it started so you can get this data by starting a nettop session at the same time the application being observed is started but this is not really practical for most use cases.
It's notable that the Network tab in Activity Monitor behaves in the same way (totals are from when it starts, not the application being observed) since the underlying operating system service is the same for both Activity Monitor and nettop.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
It would make sense if the statistics were "calculated from startup for every application" but this doesn't appear to be the case. Confusingly, nettop maintains running totals since it started so you can get this data by starting a nettop session at the same time the application being observed is started but this is not really practical for most use cases.
It's notable that the Network tab in Activity Monitor behaves in the same way (totals are from when it starts, not the application being observed) since the underlying operating system service is the same for both Activity Monitor and nettop.
add a comment |
up vote
0
down vote
It would make sense if the statistics were "calculated from startup for every application" but this doesn't appear to be the case. Confusingly, nettop maintains running totals since it started so you can get this data by starting a nettop session at the same time the application being observed is started but this is not really practical for most use cases.
It's notable that the Network tab in Activity Monitor behaves in the same way (totals are from when it starts, not the application being observed) since the underlying operating system service is the same for both Activity Monitor and nettop.
add a comment |
up vote
0
down vote
up vote
0
down vote
It would make sense if the statistics were "calculated from startup for every application" but this doesn't appear to be the case. Confusingly, nettop maintains running totals since it started so you can get this data by starting a nettop session at the same time the application being observed is started but this is not really practical for most use cases.
It's notable that the Network tab in Activity Monitor behaves in the same way (totals are from when it starts, not the application being observed) since the underlying operating system service is the same for both Activity Monitor and nettop.
It would make sense if the statistics were "calculated from startup for every application" but this doesn't appear to be the case. Confusingly, nettop maintains running totals since it started so you can get this data by starting a nettop session at the same time the application being observed is started but this is not really practical for most use cases.
It's notable that the Network tab in Activity Monitor behaves in the same way (totals are from when it starts, not the application being observed) since the underlying operating system service is the same for both Activity Monitor and nettop.
answered Nov 21 at 17:23
Perry
31117
31117
add a comment |
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1191161%2foutput-of-nettop-command%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown