Issue 462 in psutil: Cache processes informations

1 view
Skip to first unread message

psu...@googlecode.com

unread,
Jan 3, 2014, 4:08:43 AM1/3/14
to psutil-...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Enhancement Priority-Medium

New issue 462 by nicolash...@gmail.com: Cache processes informations
http://code.google.com/p/psutil/issues/detail?id=462

Proposal

In the Process class, the return of the cmdline function is not cached. Is
it possible to cache it ? Does a command line can change during the process
execution ?

Thk in advance





--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

psu...@googlecode.com

unread,
Jan 3, 2014, 6:39:37 AM1/3/14
to psutil-...@googlegroups.com

Comment #1 on issue 462 by g.rodola: Cache processes informations
http://code.google.com/p/psutil/issues/detail?id=462

Yes it can change (I also wasn't aware), see issue 331.
Perhaps we can investigate whether this is also true on Windows though.

psu...@googlecode.com

unread,
Jan 3, 2014, 7:53:08 AM1/3/14
to psutil-...@googlegroups.com

Comment #2 on issue 462 by nicolash...@gmail.com: Cache processes
informations
http://code.google.com/p/psutil/issues/detail?id=462

Sorry, i did not see the issue 331. I understand why the cmdline is not
cached. Netherless, I just try to see if i can reduce the CPU consumption
of Glances (http://github.com/nicolargo/glances). Compare to stop, it take
arround 10x CPU.

If you have any idea to reduce it...

Thk for your answer !

psu...@googlecode.com

unread,
Jan 3, 2014, 8:41:23 AM1/3/14
to psutil-...@googlegroups.com

Comment #3 on issue 462 by g.rodola: Cache processes informations
http://code.google.com/p/psutil/issues/detail?id=462

Sure I know glances (very nice tool).
What platform are you talking about? Linux?
If it takes too much I think it's fine if you cache the cmdline yourself.
After all it's not something which should change that often.
Same for uids, gids, terminal and possibly others.
You might decide to cache those metrics and, say, update them every 10 secs
or something.

psu...@googlecode.com

unread,
Jan 3, 2014, 9:30:11 AM1/3/14
to psutil-...@googlegroups.com

Comment #4 on issue 462 by nicolash...@gmail.com: Cache processes
informations
http://code.google.com/p/psutil/issues/detail?id=462

Ok i will try to make some benchs. Thk for support.

psu...@googlecode.com

unread,
May 26, 2014, 11:12:05 AM5/26/14
to psutil-...@googlegroups.com

Comment #5 on issue 462 by g.rodola: Cache processes informations
http://code.google.com/p/psutil/issues/detail?id=462

psutil has been migrated from Google Code to Github (see:
http://grodola.blogspot.com/2014/05/goodbye-google-code-im-moving-to-github.html).
Please do NOT reply here but use this instead:
https://github.com/giampaolo/psutil/issues/462
Reply all
Reply to author
Forward
0 new messages