# Sum-up subprocesses

**URL:** <https://discuss.elastic.co/t/sum-up-subprocesses/286097>\
**Category:** Kibana\
**Created:** [October 7, 2021, 7:16am UTC](https://discuss.elastic.co/t/sum-up-subprocesses/286097 "2021-10-07T07:16:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![franknord](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/franknord/32/95536_2.png) [@franknord](https://discuss.elastic.co/u/franknord)\
**Post date:** [October 7, 2021, 7:16am UTC](https://discuss.elastic.co/t/sum-up-subprocesses/286097/1 "2021-10-07T07:16:24Z")

</div>

Hi all,

On my system I have a parent process spawning several sub-processes:

```auto
root 84046 0.0 0.2 392688 36420 ? Ss Sep30 2:47 /usr/sbin/httpd -DFOREGROUND
apache 121160 3.3 0.1 395720 27616 ? S 08:50 0:28 /usr/sbin/httpd -DFOREGROUND
apache 122515 3.3 0.1 395728 27564 ? S 08:58 0:14 /usr/sbin/httpd -DFOREGROUND
apache 123223 1.9 0.1 395828 27368 ? S 09:00 0:05 /usr/sbin/httpd -DFOREGROUND
apache 123338 4.6 0.1 395572 27120 ? R 09:01 0:09 /usr/sbin/httpd -DFOREGROUND
apache 123353 2.2 0.1 395844 27460 ? S 09:01 0:04 /usr/sbin/httpd -DFOREGROUND
apache 123362 3.8 0.1 395448 26460 ? S 09:01 0:07 /usr/sbin/httpd -DFOREGROUND
apache 123468 4.3 0.1 395572 27132 ? S 09:02 0:06 /usr/sbin/httpd -DFOREGROUND
apache 123478 2.9 0.1 395572 27124 ? R 09:02 0:04 /usr/sbin/httpd -DFOREGROUND
apache 123480 3.3 0.1 395596 27120 ? S 09:02 0:04 /usr/sbin/httpd -DFOREGROUND
apache 123564 3.0 0.1 395448 27012 ? S 09:03 0:03 /usr/sbin/httpd -DFOREGROUND
apache 123567 8.5 0.1 395444 26416 ? S 09:03 0:09 /usr/sbin/httpd -DFOREGROUND
apache 123576 1.6 0.1 395720 27344 ? S 09:03 0:01 /usr/sbin/httpd -DFOREGROUND
apache 123577 2.5 0.1 395472 27060 ? S 09:03 0:02 /usr/sbin/httpd -DFOREGROUND
apache 123658 2.7 0.1 395580 27316 ? S 09:03 0:02 /usr/sbin/httpd -DFOREGROUND
apache 123743 3.0 0.1 395460 26964 ? S 09:03 0:02 /usr/sbin/httpd -DFOREGROUND
apache 123978 3.0 0.1 395564 27116 ? S 09:04 0:01 /usr/sbin/httpd -DFOREGROUND
apache 124018 0.6 0.1 395300 26772 ? S 09:04 0:00 /usr/sbin/httpd -DFOREGROUND
apache 124021 5.0 0.1 395168 26040 ? S 09:04 0:01 /usr/sbin/httpd -DFOREGROUND
apache 124023 1.2 0.1 395168 26168 ? S 09:04 0:00 /usr/sbin/httpd -DFOREGROUND
apache 124024 0.8 0.1 395168 26036 ? S 09:04 0:00 /usr/sbin/httpd -DFOREGROUND
apache 124035 2.7 0.1 395324 26676 ? S 09:04 0:00 /usr/sbin/httpd -DFOREGROUND

```

I now want to display a graph histogram that lists all processes by CPU usage BUT I want all httpd processes summed up. More generic, I want to sum up all processes with the same name to be summed up and the results to be sorted descending. I'm pretty sure this is a rather basic question, but I wasn't able to get it working. I'm using ELK 7.11.2. All beats are 7.11.2 as well.

Kind regards,

Frank

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [October 12, 2021, 3:11pm UTC](https://discuss.elastic.co/t/sum-up-subprocesses/286097/2 "2021-10-12T15:11:41Z")

</div>

hi @franknord

I think you should be able to get there with Kibana-Lens

Drag two fields on the middle-pan:

- one with the sub-process-name (this will go on horizontal axis)
- one for the CPU-usage (this will go on vertical axis)

Then on the right, select the cpu-usage field from the vertical axis, and change the metric to `sum`.

The default ordering is descending.

This is a screenshot from similar graph I created with sample-data.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/c/1c7ca6095a25c6a7fbfe87f62a85112278a4393d.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 9, 2021, 3:11pm UTC](https://discuss.elastic.co/t/sum-up-subprocesses/286097/3 "2021-11-09T15:11:46Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
