search for: ru_maxrss

Displaying 6 results from an estimated 6 matches for "ru_maxrss".

2006 Mar 02
1
Failing to understand getrusage()
...seem like it would be terribly complicated. I've attached the code. My aim is to verify that I can use getrusage() to do (admittedly crude) instrumentation of which functions in my program are allocating lots of memory[1]. So I figure I can call getrusage() at various points and look at the ru_maxrss member. I'm confused because the results I'm getting don't make a great deal of sense. The attached program, when run 10 times one after the other, produces the following output; before: 0, after: 1300 before: 0, after: 0 before: 0, after: 0 before: 188, after: 188 bef...
2008 Jan 11
0
Deadlock of asterisk on app_system
..._system (s=0x41a3c9f0 "sudo -u apache echo `date` 1200071726.3163 SIP/204.11.200.152-c0070ed0 8505755211 28901 0 >> /var/l pid = 0^ x = -1073476672^ res = 10922^ rusage = {ru_utime = {tv_sec = 1101244208, tv_usec = 1101244640}, ru_stime = {tv_sec = 1101244224, tv_usec = 5241072}, ru_maxrss = 469252700480, ru_ixrss status = 0^ __PRETTY_FUNCTION__ = "ast_safe_system"^ ... Seems that asterisk got locked on fork() and that's quite strange. Other threads shouldn't have any effect of it. Any ideas what might have happened? Regards, Atis -- Atis Lezdins VoIP Develo...
2010 Oct 04
0
Python resource module returns just zeros
I'm using a call to the resource module's getrusage method. On openSUSE this works, on CentOS [python26-2.6.5-3.el5] it 'works' but just returns zeros for the memory utilization values. resource.getrusage(resource.RUSAGE_SELF).ru_maxrss openSUSE: returns 5512 CentOS: returns 0 Anyone know what condition causes this? Or is there a better / more-reliable way to check memory utilization of the current process [from python]? -- Adam Tauno Williams <awilliam at whitemice.org> LPIC-1, Novell CLA <http://www.whitemiceconsu...
2023 Jan 14
1
[klibc:time64] resource: Avoid using <linux/resource.h>
...+#include <sys/types.h> +#include <sys/time.h> + +#define RUSAGE_SELF 0 +#define RUSAGE_CHILDREN (-1) +#define RUSAGE_BOTH (-2) +#define RUSAGE_THREAD 1 + +struct rusage { + struct timeval ru_utime; /* user time used */ + struct timeval ru_stime; /* system time used */ + __kernel_long_t ru_maxrss; /* maximum resident set size */ + __kernel_long_t ru_ixrss; /* integral shared memory size */ + __kernel_long_t ru_idrss; /* integral unshared data size */ + __kernel_long_t ru_isrss; /* integral unshared stack size */ + __kernel_long_t ru_minflt; /* page reclaims */ + __kernel_long_t ru_majflt; /...
2023 Jan 14
1
[klibc:time64] time: Use 64-bit time types on all architectures
.../sys/resource.h @@ -15,8 +15,8 @@ #define RUSAGE_THREAD 1 struct rusage { - struct timeval ru_utime; /* user time used */ - struct timeval ru_stime; /* system time used */ + struct timeval_old ru_utime; /* user time used */ + struct timeval_old ru_stime; /* system time used */ __kernel_long_t ru_maxrss; /* maximum resident set size */ __kernel_long_t ru_ixrss; /* integral shared memory size */ __kernel_long_t ru_idrss; /* integral unshared data size */ diff --git a/usr/include/sys/time.h b/usr/include/sys/time.h index e8163303..0ad639fa 100644 --- a/usr/include/sys/time.h +++ b/usr/include/sy...
2015 May 18
5
kernel/libc uapi changes for y2038
...Reno @@ -20,7 +26,7 @@ #define RUSAGE_BOTH (-2) /* sys_wait4() uses this */ #define RUSAGE_THREAD 1 /* only the calling thread */ -struct rusage { +struct __old_kernel_rusage { struct timeval ru_utime; /* user time used */ struct timeval ru_stime; /* system time used */ __kernel_long_t ru_maxrss; /* maximum resident set size */ diff --git a/include/uapi/linux/time.h b/include/uapi/linux/time.h index 72d894df3013..b3988606128f 100644 --- a/include/uapi/linux/time.h +++ b/include/uapi/linux/time.h @@ -6,11 +6,24 @@ #ifndef _STRUCT_TIMESPEC #define _STRUCT_TIMESPEC -struct timespec { + +#...