maybe via procfs ?
take a look into /proc/$PID/status - this gives some information about $PID
so - maybe
cat /proc/*/status |egrep "Name|VmSize|VmRSS"
gives what you want. you may need to parse/re-sort that values for being
better readable
regards
roland
----- Original Message -----
From: "zhanglinbao2000" <zha...@16...>
To: "roland" <de...@we...>; <lin...@li...>;
<ntf...@li...>; "Szakacsits Szabolcs" <sz...@si...>;
"Yuval Fledel" <yu...@gm...>; "Yura Pakhuchiy" <pak...@gm...>
Sent: Thursday, November 30, 2006 12:05 PM
Subject: Re: [ntfs-3g-devel] About how to reduce the memory usage of ntfs-3g
,I want to mount at least 6 partions at the same time ,but my memory is only
32M .I want to modify the code ,need help and experience
> hi ,
>
> My "ps" command is too poor , it only output limit info ,like this , it
> doesn't any parameters as the "ps" on PC
> # ps
> PID TTY Uid Size State Command
> 1 root 1584 S init
> 2 root 0 S [keventd]
> 3 root 0 S [ksoftirqd_CPU0]
> 4 root 0 S [kswapd]
> .............
> others ...
>
> Do you have any method to query the physical memory usage of ntfs-3g ?
>
> ----- Original Message -----
> From: "roland" <de...@we...>
> To: "zhanglinbao2000" <zha...@16...>;
> <lin...@li...>; <ntf...@li...>;
> "Szakacsits Szabolcs" <sz...@si...>; "Yuval Fledel"
> <yu...@gm...>; "Yura Pakhuchiy" <pak...@gm...>
> Sent: Thursday, November 30, 2006 5:48 PM
> Subject: Re: [ntfs-3g-devel] About how to reduce the memory usage of
> ntfs-3g ,I want to mount at least 6 partions at the same time ,but my
> memory is only 32M .I want to modify the code ,need help and experience
>
>
>> maybe you could take a closer look, how your processes growing - for
>> getting
>> a feeling, if 32mb is enough at all for what you want to do ?
>>
>> for example:
>>
>> while true;do sleep 1; echo;echo `date`; ps -eo vsz,rss,comm
>> |sort -rn|head
>> ;done >/tmp/ps.log
>>
>> ok, you don`t have rss if i understand correctly, but maybe this
>> one-liner
>> is helpful
>>
>>
>>
|