top / htop; group process by command
Clash Royale CLAN TAG#URR8PPP
up vote
15
down vote
favorite
I'd like to know how much resource a specific command is using.
top
and htop
displays information on per process basis but I'd like the information to be shown on per command basis. E.g. I'd like to know how much RAM chrome is using.
linux top xubuntu htop
add a comment |Â
up vote
15
down vote
favorite
I'd like to know how much resource a specific command is using.
top
and htop
displays information on per process basis but I'd like the information to be shown on per command basis. E.g. I'd like to know how much RAM chrome is using.
linux top xubuntu htop
5
Utilities such astop
andps
vary by OS. You should tag the question with the OS you are using.
â jordanm
Nov 7 '12 at 22:17
@jordanm thanks, I'm using Linux
â brillout
Nov 8 '12 at 0:26
add a comment |Â
up vote
15
down vote
favorite
up vote
15
down vote
favorite
I'd like to know how much resource a specific command is using.
top
and htop
displays information on per process basis but I'd like the information to be shown on per command basis. E.g. I'd like to know how much RAM chrome is using.
linux top xubuntu htop
I'd like to know how much resource a specific command is using.
top
and htop
displays information on per process basis but I'd like the information to be shown on per command basis. E.g. I'd like to know how much RAM chrome is using.
linux top xubuntu htop
linux top xubuntu htop
edited Nov 7 '12 at 22:25
asked Nov 7 '12 at 22:13
brillout
17615
17615
5
Utilities such astop
andps
vary by OS. You should tag the question with the OS you are using.
â jordanm
Nov 7 '12 at 22:17
@jordanm thanks, I'm using Linux
â brillout
Nov 8 '12 at 0:26
add a comment |Â
5
Utilities such astop
andps
vary by OS. You should tag the question with the OS you are using.
â jordanm
Nov 7 '12 at 22:17
@jordanm thanks, I'm using Linux
â brillout
Nov 8 '12 at 0:26
5
5
Utilities such as
top
and ps
vary by OS. You should tag the question with the OS you are using.â jordanm
Nov 7 '12 at 22:17
Utilities such as
top
and ps
vary by OS. You should tag the question with the OS you are using.â jordanm
Nov 7 '12 at 22:17
@jordanm thanks, I'm using Linux
â brillout
Nov 8 '12 at 0:26
@jordanm thanks, I'm using Linux
â brillout
Nov 8 '12 at 0:26
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
7
down vote
You could run top
in batch mode -b
with 1 iteration -n1
. You grep it, pipe it to awk
, SUM
the result and print it.
top -b -n1 | grep chrome | awk ' SUM += $9 END print SUM '
I don't know which column you want to output. Change $9
to fit your needs.
add a comment |Â
up vote
2
down vote
This is possible in atop
. Just press p
when running it. From the help:
Accumulated figures:
'u' - total resource consumption per user
'p' - total resource consumption per program (i.e. same process name)
'j' - total resource consumption per container
add a comment |Â
up vote
0
down vote
Pressing H
in htop
group the processes by the main thread (command), actually it toggles the threads visibility.
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
7
down vote
You could run top
in batch mode -b
with 1 iteration -n1
. You grep it, pipe it to awk
, SUM
the result and print it.
top -b -n1 | grep chrome | awk ' SUM += $9 END print SUM '
I don't know which column you want to output. Change $9
to fit your needs.
add a comment |Â
up vote
7
down vote
You could run top
in batch mode -b
with 1 iteration -n1
. You grep it, pipe it to awk
, SUM
the result and print it.
top -b -n1 | grep chrome | awk ' SUM += $9 END print SUM '
I don't know which column you want to output. Change $9
to fit your needs.
add a comment |Â
up vote
7
down vote
up vote
7
down vote
You could run top
in batch mode -b
with 1 iteration -n1
. You grep it, pipe it to awk
, SUM
the result and print it.
top -b -n1 | grep chrome | awk ' SUM += $9 END print SUM '
I don't know which column you want to output. Change $9
to fit your needs.
You could run top
in batch mode -b
with 1 iteration -n1
. You grep it, pipe it to awk
, SUM
the result and print it.
top -b -n1 | grep chrome | awk ' SUM += $9 END print SUM '
I don't know which column you want to output. Change $9
to fit your needs.
edited Nov 8 '12 at 7:55
answered Nov 8 '12 at 7:45
ThomasFrederiksen
74143
74143
add a comment |Â
add a comment |Â
up vote
2
down vote
This is possible in atop
. Just press p
when running it. From the help:
Accumulated figures:
'u' - total resource consumption per user
'p' - total resource consumption per program (i.e. same process name)
'j' - total resource consumption per container
add a comment |Â
up vote
2
down vote
This is possible in atop
. Just press p
when running it. From the help:
Accumulated figures:
'u' - total resource consumption per user
'p' - total resource consumption per program (i.e. same process name)
'j' - total resource consumption per container
add a comment |Â
up vote
2
down vote
up vote
2
down vote
This is possible in atop
. Just press p
when running it. From the help:
Accumulated figures:
'u' - total resource consumption per user
'p' - total resource consumption per program (i.e. same process name)
'j' - total resource consumption per container
This is possible in atop
. Just press p
when running it. From the help:
Accumulated figures:
'u' - total resource consumption per user
'p' - total resource consumption per program (i.e. same process name)
'j' - total resource consumption per container
edited May 4 at 11:46
answered May 4 at 11:36
Nemo
16516
16516
add a comment |Â
add a comment |Â
up vote
0
down vote
Pressing H
in htop
group the processes by the main thread (command), actually it toggles the threads visibility.
add a comment |Â
up vote
0
down vote
Pressing H
in htop
group the processes by the main thread (command), actually it toggles the threads visibility.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Pressing H
in htop
group the processes by the main thread (command), actually it toggles the threads visibility.
Pressing H
in htop
group the processes by the main thread (command), actually it toggles the threads visibility.
answered Sep 27 at 20:03
BG Adrian
1011
1011
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%2f55148%2ftop-htop-group-process-by-command%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
5
Utilities such as
top
andps
vary by OS. You should tag the question with the OS you are using.â jordanm
Nov 7 '12 at 22:17
@jordanm thanks, I'm using Linux
â brillout
Nov 8 '12 at 0:26