[sclug] Performance tuning

Graham lists at Information-Cascade.co.uk
Sat Nov 19 14:18:38 UTC 2005

If you are playing with LD_PRELOAD / libc / waitpid, try:
	man wait4
	man getrusage
They return the values that time(1) uses. (I think, I havent looked)
They should work without BSD process acounting in the kernel.
They are the reason zombies exist (the exit code and then some).

       pid_t wait3(int *status, int options,
             struct rusage *rusage);

       pid_t wait4(pid_t pid, int *status, int options,
             struct rusage *rusage);

            struct rusage {
                struct timeval ru_utime; /* user time used */
                struct timeval ru_stime; /* system time used */
                long   ru_maxrss;        /* maximum resident set size */
                long   ru_ixrss;         /* integral shared memory size */
                long   ru_idrss;         /* integral unshared data size */
                long   ru_isrss;         /* integral unshared stack size */
                long   ru_minflt;        /* page reclaims */
                long   ru_majflt;        /* page faults */
                long   ru_nswap;         /* swaps */
                long   ru_inblock;       /* block input operations */
                long   ru_oublock;       /* block output operations */
                long   ru_msgsnd;        /* messages sent */
                long   ru_msgrcv;        /* messages received */
                long   ru_nsignals;      /* signals received */
                long   ru_nvcsw;         /* voluntary context switches */
                long   ru_nivcsw;        /* involuntary context switches */


More information about the Sclug mailing list