[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: libps - PSTAT_TASK_BASIC



> Hi,
> 
> I am trying to access:
> 
> proc_stat_task_basic_info(proc)->virtual_size
> 
> after successfully setting: PSTAT_TASK_BASIC, however, the structure
> reports: 
> (gdb) p *proc->task_basic_info
> $8 = {suspend_count = 0, base_priority = 12, virtual_size = 153505792,
>     resident_size = 1474560, user_time = {seconds = 0, microseconds = 10000},
>     system_time = {seconds = 0, microseconds = 0}, creation_time = {
>     seconds = 949005414, microseconds = 120000}}
> 
> This data seems pretty bad to me, 150 megs for a bash shell?  And nearly
> no CPU time.  Am I setting the wrong flag?

That data looks entirely reasonable to me.  Use ps -l and ps -u on that
process and see what printed values are.  If they match, then you are using
libps properly.  That is the way to see if you are having a problem with libps.
Then the question of whether the values make sense to you can be addressed
separately.


Reply to: