# Buenas

**URL:** <https://forum.ansible.com/t/buenas/27290>\
**Category:** Ansible Project\
**Created:** [April 16, 2018, 3:28pm UTC](https://forum.ansible.com/t/buenas/27290 "2018-04-16T15:28:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jyanezmoncada](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@jyanezmoncada](https://forum.ansible.com/u/jyanezmoncada)\
**Post date:** [April 16, 2018, 3:28pm UTC](https://forum.ansible.com/t/buenas/27290/1 "2018-04-16T15:28:31Z")

</div>

Soy nuevo en el grupo y en el mundo de ansible, necesito chequear el consumo de memoria de cualquier proceso para determinar si este esta por encima de un umbral, y de ser asi, reiniciarlo.

I am new to the group and in the ansible world, I need to check the memory consumption of any process to determine if it is above a threshold, and if so, restart it

---

<div class="post-metadata">

**Author:** ![Osqui](https://avatars.discourse-cdn.com/v4/letter/o/5f8ce5/32.png) [@Osqui](https://forum.ansible.com/u/Osqui)\
**Post date:** [April 16, 2018, 4:15pm UTC](https://forum.ansible.com/t/buenas/27290/2 "2018-04-16T16:15:53Z")

</div>

I’d use MemoryMax= Systemd directive ([https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html](https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html)) or, if not, LimitAS= one ([https://www.freedesktop.org/software/systemd/man/systemd.exec.html](https://www.freedesktop.org/software/systemd/man/systemd.exec.html)). You should establish them in your desired .service/.slice file with a regular Ansible module to manage text file content
