# Improve system and process monitoring for tests in PTL

**URL:** <https://community.openpbs.org/t/improve-system-and-process-monitoring-for-tests-in-ptl/1594>\
**Category:** Developers\
**Created:** [May 14, 2019, 7:04am UTC](https://community.openpbs.org/t/improve-system-and-process-monitoring-for-tests-in-ptl/1594 "2019-05-14T07:04:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![visheshh](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/visheshh/32/209_2.png) [@visheshh](https://community.openpbs.org/u/visheshh)\
**Post date:** [May 14, 2019, 7:04am UTC](https://community.openpbs.org/t/improve-system-and-process-monitoring-for-tests-in-ptl/1594/1 "2019-05-14T07:04:00Z")

</div>

Hi,

I am proposing to add few additional sensors to measure for system and process monitoring in PTL.  
Please review the proposal and provide suggestions to improve test monitoring process for stress/load tests. [https://pbspro.atlassian.net/wiki/spaces/PD/pages/1285947399/Improve+system+and+process+monitoring+for+tests+in+PTL](https://pbspro.atlassian.net/wiki/spaces/PD/pages/1285947399/Improve+system+and+process+monitoring+for+tests+in+PTL)

Regards,  
Vishesh

---

<div class="post-metadata">

**Author:** ![crjayadev](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/crjayadev/32/119_2.png) [@crjayadev](https://community.openpbs.org/u/crjayadev)\
**Post date:** [July 30, 2019, 2:29am UTC](https://community.openpbs.org/t/improve-system-and-process-monitoring-for-tests-in-ptl/1594/2 "2019-07-30T02:29:28Z")

</div>

I presume the test results are pushed to the disk periodically - after every test or set of tests. Long running tests are intended to run for several days. We should be able to review how the long running tests are progressing, in between.

---

<div class="post-metadata">

**Author:** ![visheshh](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/visheshh/32/209_2.png) [@visheshh](https://community.openpbs.org/u/visheshh)\
**Post date:** [July 31, 2019, 6:34am UTC](https://community.openpbs.org/t/improve-system-and-process-monitoring-for-tests-in-ptl/1594/3 "2019-07-31T06:34:19Z")

</div>

Hi @crjayadev,

After the benchpress finishes running the tests, the monitored data is stored in the JSON file.  
While running the tests, there is no way to know the data. I agree it is very important.  
I propose we can have an additional output file where we would write after every interval so that the results can be viewed when the test is in progress.

---

<div class="post-metadata">

**Author:** ![crjayadev](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/crjayadev/32/119_2.png) [@crjayadev](https://community.openpbs.org/u/crjayadev)\
**Post date:** [July 31, 2019, 10:38am UTC](https://community.openpbs.org/t/improve-system-and-process-monitoring-for-tests-in-ptl/1594/4 "2019-07-31T10:38:15Z")

</div>

Yes, having some means of intermediate reporting is critical for long running tests. We don’t want to run tests for several days and not have any results because the benchpress hanged, or some system issue. That would be bad 🙂

---

<div class="post-metadata">

**Author:** ![sujatapatnaik52](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@sujatapatnaik52](https://community.openpbs.org/u/sujatapatnaik52)\
**Post date:** [July 31, 2019, 1:50pm UTC](https://community.openpbs.org/t/improve-system-and-process-monitoring-for-tests-in-ptl/1594/5 "2019-07-31T13:50:55Z")

</div>

Hi Vishesh,

Thank you for the EDD. I have few comments:

1. Adding open\_fds as a parameter for process monitoring might help.
2. Will the results be added to other db types which PTL supports?
3. If my understanding is correct, I see in your PR, there is flag which checks for benchpress not present in the process name. In a case, where I would want to use this API explicitly for monitoring benchpress process, I won’t be able to do that. Please confirm this.
4. I am not sure about this but If we add the process start time at a testsuite level, it might help to make sure the daemon is not restarted in a case of long running tests. No need to explicitly use the ps command.

---

<div class="post-metadata">

**Author:** ![visheshh](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/visheshh/32/209_2.png) [@visheshh](https://community.openpbs.org/u/visheshh)\
**Post date:** [August 1, 2019, 7:37am UTC](https://community.openpbs.org/t/improve-system-and-process-monitoring-for-tests-in-ptl/1594/6 "2019-08-01T07:37:14Z")

</div>

Hi @sujatapatnaik52,

Thanks for your comments.

1. Adding open\_fds as a parameter for process monitoring might help.  
Vishesh - \> Will add it.

2. Will the results be added to other db types which PTL supports?  
Vishesh-\> No, for reporting of Performance/Load tests. We have chosen JSON. as it’s easily machine-readable and will, therefore be helpful for reporting purposes.  
The data itself is stored in dict in the framework. Can be stored in any db format.

3. If my understanding is correct, I see in your PR, there is flag which checks for benchpress not present in the process name. In a case, where I would want to use this API explicitly for monitoring benchpress process, I won’t be able to do that. Please confirm this.

Vishesh-\> I had put a condition to remove it because it was unnecessarily showing up because of the grep output. But now, I know the use-case. I will remove the condition, So benchpress will be always present by default.

1. I am not sure about this but If we add the process start time at a testsuite level, it might help to make sure the daemon is not restarted in a case of long-running tests. No need to explicitly use the ps command.

Vishesh -\> I don’t think I got you completely. When the daemon restarts the pid will change. Do we need process start time?

Thanks,  
Vishesh

---

<div class="post-metadata">

**Author:** ![sujatapatnaik52](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@sujatapatnaik52](https://community.openpbs.org/u/sujatapatnaik52)\
**Post date:** [August 1, 2019, 7:49am UTC](https://community.openpbs.org/t/improve-system-and-process-monitoring-for-tests-in-ptl/1594/7 "2019-08-01T07:49:14Z")

</div>

> [@visheshh](#):
>
> I don’t think I got you completely. When the daemon restarts the pid will change. Do we need process start time?

In a case where I don’t want to restart the daemon in a case of long running test like for months. In that case it would be good to have this option.
