# metrics-per-process and old psutil

**URL:** https://discourse.sensu.io/t/metrics-per-process-and-old-psutil/723
**Category:** Sensu Classic (EOL)
**Created:** [November 23, 2016, 4:16pm UTC](https://discourse.sensu.io/t/metrics-per-process-and-old-psutil/723 "2016-11-23T16:16:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Jay\_Kumar](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@Jay\_Kumar](https://discourse.sensu.io/u/Jay_Kumar)
#### Post date: [November 23, 2016, 4:16pm UTC](https://discourse.sensu.io/t/metrics-per-process-and-old-psutil/723/1 "2016-11-23T16:16:23Z")

</div>

Don’t think I can open an issue with sensu-plugins-process-checks github repository for this.

One of the environments I am running Sensu, does not allow me to update python modules and I am stuck with an old version of psutil

Psutil version: psutil==1.2.1

metrics-per-process script errors out with following

Traceback (most recent call last):

File “/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-process-checks-1.0.0/bin/metrics-per-process.py”, line 223, in

main()

File “/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-process-checks-1.0.0/bin/metrics-per-process.py”, line 220, in main

graphite\_printer(stats\_per\_pid(pid), options.graphite\_scheme)

File “/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-process-checks-1.0.0/bin/metrics-per-process.py”, line 114, in stats\_per\_pid

stats[‘cpu.user’] = process\_handler.cpu\_times().user

AttributeError: ‘Process’ object has no attribute ‘cpu\_times’

Is there any workaround or options?

---

<div class="post-metadata">

### Author: ![jspaleta](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/jspaleta/32/141_2.png) [@jspaleta](https://discourse.sensu.io/u/jspaleta)
#### Post date: [November 22, 2018, 2:07am UTC](https://discourse.sensu.io/t/metrics-per-process-and-old-psutil/723/2 "2018-11-22T02:07:43Z")

</div>


