Monitor network traffic of a process and all its subprocesses
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I want to know the amount of the network traffic (inbound and outbound) in a time period, generated a specific process and all subprocesses that it spawns.
I have developed a software that contains a "job manager" that runs forever and generates no network traffic on its own. It instead spawns child "workers" that does the main work, including the majority of network traffic. The tricky point is, several "workers" may work simultaneously, and a single worker process is expected to exit after a short period (a few hours). Furthermore, these workers also spawns more subprocesses that generates traffic like git fetch
that needs to be monitored as well.
There will be only one instance of "job manager" and it can be started or killed on-demand on my development and testing server, which runs Ubuntu Server 18.04, architecture amd64.
I want to monitor the network traffic of all the workers and the processes that workers spawn, for a prolonged period (one week or more). Is there a solution?
networking process monitoring
add a comment |Â
up vote
2
down vote
favorite
I want to know the amount of the network traffic (inbound and outbound) in a time period, generated a specific process and all subprocesses that it spawns.
I have developed a software that contains a "job manager" that runs forever and generates no network traffic on its own. It instead spawns child "workers" that does the main work, including the majority of network traffic. The tricky point is, several "workers" may work simultaneously, and a single worker process is expected to exit after a short period (a few hours). Furthermore, these workers also spawns more subprocesses that generates traffic like git fetch
that needs to be monitored as well.
There will be only one instance of "job manager" and it can be started or killed on-demand on my development and testing server, which runs Ubuntu Server 18.04, architecture amd64.
I want to monitor the network traffic of all the workers and the processes that workers spawn, for a prolonged period (one week or more). Is there a solution?
networking process monitoring
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I want to know the amount of the network traffic (inbound and outbound) in a time period, generated a specific process and all subprocesses that it spawns.
I have developed a software that contains a "job manager" that runs forever and generates no network traffic on its own. It instead spawns child "workers" that does the main work, including the majority of network traffic. The tricky point is, several "workers" may work simultaneously, and a single worker process is expected to exit after a short period (a few hours). Furthermore, these workers also spawns more subprocesses that generates traffic like git fetch
that needs to be monitored as well.
There will be only one instance of "job manager" and it can be started or killed on-demand on my development and testing server, which runs Ubuntu Server 18.04, architecture amd64.
I want to monitor the network traffic of all the workers and the processes that workers spawn, for a prolonged period (one week or more). Is there a solution?
networking process monitoring
I want to know the amount of the network traffic (inbound and outbound) in a time period, generated a specific process and all subprocesses that it spawns.
I have developed a software that contains a "job manager" that runs forever and generates no network traffic on its own. It instead spawns child "workers" that does the main work, including the majority of network traffic. The tricky point is, several "workers" may work simultaneously, and a single worker process is expected to exit after a short period (a few hours). Furthermore, these workers also spawns more subprocesses that generates traffic like git fetch
that needs to be monitored as well.
There will be only one instance of "job manager" and it can be started or killed on-demand on my development and testing server, which runs Ubuntu Server 18.04, architecture amd64.
I want to monitor the network traffic of all the workers and the processes that workers spawn, for a prolonged period (one week or more). Is there a solution?
networking process monitoring
networking process monitoring
asked 1 hour ago


iBug
721523
721523
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
Probably the easiest way is to put the job manager in a network namespace. All child processes will also be in that namespace. Connect up the namespace via veth or macvlan, measure traffic on that interface.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Probably the easiest way is to put the job manager in a network namespace. All child processes will also be in that namespace. Connect up the namespace via veth or macvlan, measure traffic on that interface.
add a comment |Â
up vote
2
down vote
Probably the easiest way is to put the job manager in a network namespace. All child processes will also be in that namespace. Connect up the namespace via veth or macvlan, measure traffic on that interface.
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Probably the easiest way is to put the job manager in a network namespace. All child processes will also be in that namespace. Connect up the namespace via veth or macvlan, measure traffic on that interface.
Probably the easiest way is to put the job manager in a network namespace. All child processes will also be in that namespace. Connect up the namespace via veth or macvlan, measure traffic on that interface.
answered 21 mins ago
dirkt
15.2k21032
15.2k21032
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476812%2fmonitor-network-traffic-of-a-process-and-all-its-subprocesses%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