Sponsored Content
Full Discussion: Problem in CPU usage
Top Forums Programming Problem in CPU usage Post 302137934 by reborg on Thursday 27th of September 2007 04:48:56 PM
Old 09-27-2007
Only a guess, but given that it grows over time it could be that you have some kind of list or array-like entity that is growing without reasonable bound, and it is simply taking more CPU cycles to process the growing amount of data. It could be worthwhile to see if memory usage is also growing over time.
 

10 More Discussions You Might Find Interesting

1. Programming

Monitor CPU usage and Memory Usage

how can i monitor usages of CPU, Memory, Hard disk etc. under SUN Solaries through a c program or java program i want to store that data into database so i can show it graphically thanks in advance (2 Replies)
Discussion started by: Gajanad Bihani
2 Replies

2. Shell Programming and Scripting

Getting CPU Usage

For analysis, I need to gather CPU usage from say 1:00 PM to 2:00 PM every 10 seconds on a given day. I heard this can be done with awk, but my UNIX is kind of rusty. (4 Replies)
Discussion started by: WG1
4 Replies

3. Programming

CPU usage and memory usage

Please tell me solaris functions/api for getting following information 1- Function that tells how much memory used by current process 2- Function that tells how much memory used by all running processes 3- Function that tells how much CPU is used by current process 4- Function that tells how... (1 Reply)
Discussion started by: mansoorulhaq
1 Replies

4. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

5. Solaris

current CPU usage, memory usage, disk I/O oid(snmp)

Hi, I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP. I want the oids for above tasks. can you please tell me that Thank you (2 Replies)
Discussion started by: S_venkatesh
2 Replies

6. Solaris

Multi CPU Solaris system shows 100% CPU usage.

Hello Friends, On one of my Solaris 10 box, CPU usage shows 100% using "sar", "vmstat". However, it has 4 CPUs and prstat and glance are not showing enough processes to justify high CPU utilization. ========================================================================= $ prstat -a ... (4 Replies)
Discussion started by: mahive
4 Replies

7. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

8. Programming

CPU usage

Hi all, I'm using python and psutil a library to get system informations like cpu usage (percent) for a given process. My question is if I have the value in % of the cpu usage how I could get the cpu usage in cycle number I mean not in percent? Thanks a lot D. (5 Replies)
Discussion started by: Dedalus
5 Replies

9. AIX

Overall CPU Usage

Hi Guys, I am a newbie on the forum. This is my first post, so first of all I would like to introduce myself. I am a SAS Analyst programmer working for an Health Insurance client. SAS is installed on a 16 CPU AIX Server with partitions running with shared processor. I have couple of... (2 Replies)
Discussion started by: saurabhiim2003
2 Replies

10. AIX

Problem with nmon, actual CPU usage per process

Hi all, I am currently having trouble to get nmon to print me the actual CPU usage for an interval for a process. According to the manual, something like # time nmon -t -C cron -s 5 -c 2 -F outfile real 0m0.98s user 0m0.03s sys 0m0.04s should print out at least the process... (15 Replies)
Discussion started by: zaxxon
15 Replies
amalloc(3)						     Library Functions Manual							amalloc(3)

NAME
acalloc, acreate, adelete, afree, amallinfo, amalloc, amallopt, amallocblksize, arealloc, nacreate - arena memory allocator LIBRARY
Standard C Library (libc.so, libc.a) SYNOPSIS
#include <sys/types.h> #include <malloc.h> #include <numa.h> void *acreate ( void *addr, size_t len, int flags, void *ushdr, void *(*grow_func)(size_t, void *)); void *nacreate (int flags, memalloc_attr_t *attr) int adelete (void *ap); void *amalloc ( size_t size, void *ap); void afree ( void *ptr, void *ap); void *arealloc ( void *ptr, size_t size, void *ap); void *acalloc ( size_t num_elts, size_t elt_size, void *ap); size_t amallocblksize ( void *ptr, void *ap); The following function definitions are provided only for System V compatibility: int amallopt ( int cmd, int value, void *ap); struct mallinfo amallinfo ( void *ap); PARAMETERS
A pointer to a buffer used to hold the arena header information. The size of the buffer in bytes (minimum 1K). Attributes of the arena as the bitwise inclusive OR of any combination of MEM_NOAUTOGROW and MEM_NONCONCURRENT. Currently unused and must be NULL. For non-growing arenas, NULL; for growing arenas, a function to be called when the allocator requires more memory. Points to the memory allocation policy and attributes to be used for allocations from the new arena. A pointer to the arena. A number of bytes of memory. A pointer to a block of memory. The number of elements in an array. The size of each element in an array. A command for the amallopt() function. DESCRIPTION
The amalloc family of routines provides a main memory allocator based on the malloc(3) memory allocator. This allocator has been extended so that an arbitrary memory space ("arena") can be set up as an area from which to allocate memory. Calls to the amalloc family of routines differ from calls to the standard malloc(3) only in that an arena pointer must be supplied. This arena pointer is returned by a call to acreate() or nacreate(). For the acreate() and nacreate() functions, the flags parameter specifies the attributes of a newly created arena: MEM_NOAUTOGROW - Causes the grow_func argument to be ignored and inhibits any attempt to expand the arena beyond the size len of the initial buffer. This parame- ter is not allowed in nacreate(). MEM_NONCONCURRENT - Turns off all attempts to use locking and atomic updates for this arena when allo- cating and freeing memory. This has an affect only when the calling code is multithreaded. In this case, allocations and frees using the arena may happen faster, but the user must be extremely careful to guarantee that no two threads reference this arena at the same time in arena operations. Function descriptions: Sets up an area defined as starting at virtual address addr and extending for len bytes. Arenas can be either grow- ing or non-growing. An arena that is non-growing is constrained to use only up to len bytes of memory. The grow_func parameter should be NULL in this case. If the arena is "growable", len specifies the original size (minimum of 1K bytes) and the grow_func parameter specifies a function that will be called when the allocator requires more memory. Note that the original buffer addr will be used only for the arena header; the first time more memory is required, the "grow" function will be called. The grow function will be called with two parameters: the number of bytes required and a pointer to the arena requiring the space. The number of bytes requested will always be a multiple of M_BLKSZ (see <malloc.h> header file). The function should return the address of a suitably large block of memory. This block does not need to be contiguous with the original arena memory. This block could be obtained from a number of sources, such as by mapping in another file (by means of mmap(2)) or by calling malloc(3) to enlarge the program's data space. If the grow function decides that it cannot provide any more space, it must return (void*)-1. The ushdr function is currently unused and must be NULL. Allocates an arena header and sets up a new growable arena. The location for the arena is determined automatically. The arena will use nmmap() internally to obtain memory from the operating system, passing in the saved attr parameter. Note that use of the MEM_NOAUTOGROW flag is not allowed in calls to nacreate(). The returned arena may be used in all other arena malloc functions; however, it is not specified whether memory freed by afree() from this arena is ever released for reuse outside the arena. Causes any resources allocated for the arena (for example, mutexes) to be freed. Nothing is done with the arena memory itself. No additional calls to any arena functions can be made after calling adelete(). Returns a pointer to a block of at least size bytes suitably aligned for any use. Destroys the contents of a block previously allocated by amalloc(), arealloc(), or acal- loc() and makes this space available for future allocation. The argument to afree() is a pointer to the block previously allocated by amalloc(), arealloc(), or acalloc(). Undefined results will occur if the space assigned by any of the three arena allocator functions is overrun or if some random number is handed to afree(). It is always permitted to pass NULL to afree(). Changes the size of the block pointed to by ptr to size bytes and returns a pointer to the (possibly moved) block. The contents will be unchanged, up to the lesser of the new and old sizes. In the special case of a null ptr, arealloc() degenerates to amalloc(). A zero size causes the passed block to be freed. Allocates space for an array of num_elts elements of size elt_size. The space is initialized to zeros. Returns the actual size of the block pointed to by ptr. The returned size may be greater than the original requested size. Provides for control over the allocation algorithm. The available values for cmd are defined in the <malloc.h> header file. The amallopt() function can be called repeatedly but, for most commands, not after the first small block is allocated. Provides instrumentation describing space usage. It returns the mallinfo() structure defined in the <malloc.h> header file. The structure is zero until after the first space has been allocated from the arena. Each of the allocation routines returns a pointer to space suitably aligned for storage of any type of object. RETURN VALUES
The acreate() function returns NULL and sets errno if either len is less than 1K or the MEM_SHARED flag is passed. The amalloc(), arealloc(), and acalloc() functions return a NULL pointer if there is not enough available memory. When arealloc() returns NULL, the block pointed to by ptr is left intact. If amallopt() is called after any allocation (for most cmd arguments) or if cmd or value is invalid, non-zero is returned. Otherwise, it returns zero. RELATED INFORMATION
Functions: malloc(3), nmmap(2), numa_intro(3), numa_types(4) delim off amalloc(3)
All times are GMT -4. The time now is 12:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy