Note that there are some explanatory texts on larger screens.

plurals
  1. POIs getrusage broken in Linux (2.6.30)
    text
    copied!<p>This code </p> <pre><code> void print_usage(char * msg) { struct rusage usage; getrusage(RUSAGE_SELF, &amp;usage); printf("Limits: %s\n", msg); printf(" %s, %li\n", " maximum resident set size " , usage.ru_maxrss ); printf(" %s, %li\n", " integral shared memory size " , usage.ru_ixrss ); printf(" %s, %li\n", " integral unshared data size " , usage.ru_idrss ); printf(" %s, %li\n", " integral unshared stack size " , usage.ru_isrss ); printf(" %s, %li\n", " page reclaims " , usage.ru_minflt ); printf(" %s, %li\n", " page faults " , usage.ru_majflt ); printf(" %s, %li\n", " swaps " , usage.ru_nswap ); printf(" %s, %li\n", " block input operations " , usage.ru_inblock ); printf(" %s, %li\n", " block output operations " , usage.ru_oublock ); printf(" %s, %li\n", " messages sent " , usage.ru_msgsnd ); printf(" %s, %li\n", " messages received " , usage.ru_msgrcv ); printf(" %s, %li\n", " signals received " , usage.ru_nsignals); printf(" %s, %li\n", " voluntary context switches " , usage.ru_nvcsw ); printf(" %s, %li\n", " involuntary context switches " , usage.ru_nivcsw ); } </code></pre> <p>reports only zeroes for many fields, even if I use it in rather big program (after jvm start)</p> <pre><code> maximum resident set size , 0 integral shared memory size , 0 integral unshared data size , 0 integral unshared stack size , 0 page reclaims , 2514 page faults , 0 swaps , 0 block input operations , 0 block output operations , 0 messages sent , 0 messages received , 0 signals received , 0 voluntary context switches , 137 involuntary context switches , 1 </code></pre> <p>The non-zero fields are "<code>*vcsw</code>", "<code>*flt</code>".</p> <p>All <code>*rss</code>, <code>*swap</code>, <code>msg*</code>, <code>*block</code>, <code>*signals</code> are Zero.</p> <p>Is there something broken?</p> <p>Linux is x86 2.6.30.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload