You are not logged in.

#1 2010-05-05 16:59:52

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Conky variables / process resident memory

In my conky display, I want to display the total resident memory used by a process. ${top_mem mem #} only shows the percentage of total memory, which I do not want.

I found that ${pid_vmsize pid} will output what I want, but I need to then determine the PID of the processes I want to show. I don't know how to do that. (I want those using the most memory, like what top_mem does).

${top_mem pid #} will output the PID I want, but I don't know how to take that PID and give it to ${pid_vmsize}.

Does conky have any way to "pipe" the output of one command into the variable field of another? If not, any suggestions on how I can get what I want?

Offline

#2 2010-05-05 17:08:50

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Conky variables / process resident memory

i don't think conky supports piping or nesting it's own ${commands}, could be wrong though.

what you'll likely end up doing is writing a short shell script to get the text that you want and call it with ${exec} or ${execi}.  if you want to add color or formatting in conky's syntax you can add ${anything} to the output of your script and call it with ${execp} or ${execpi} to tell conky to parse those values when displaying.

Last edited by brisbin33 (2010-05-05 17:10:27)

Offline

#3 2010-05-05 17:45:49

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Re: Conky variables / process resident memory

Thanks. I was afraid I would have to do something like that.

I'm kind of surprised that conky doesn't offer the option to display actual memory usage (rather than just a percentage). Or am I missing something?

Offline

Board footer

Powered by FluxBB