-   Linux - General (
-   -   pmap (

nano2 05-31-2012 03:43 AM

Hi ,

Have the following code
But have an issue trying to get it to interpret the the while loop
i.e print the total any ideas

fn "pmap" "bash" "-c 'while ((1));do `pmap @PID@ | grep total | ${t_awk} {'print $2'}`; sleep 1 ; done'"

fn ()


pan64 05-31-2012 04:36 AM

is this code works at all? what is the output?

nano2 05-31-2012 04:53 AM

Yes this is the output for args:

args: -c 'while ((1));do mem=; sleep 1; done'

The issue is that it can interpret what's inside the while loop
"pmap" "bash" "-c 'while ((1));do mem=`pmap @PID@ | grep total | ${t_awk} {'print $2'}`; sleep 1; done'"

All times are GMT -5. The time now is 04:19 PM.