Thanks for taking the time to reply. I failed to mention: I've compiled with -q64, resulting in no change to outcome.
I'll also observe that the manual you pointed me to says:
"Compiler mode is set according to the last-found instance of the -q32 or -q64
compiler options. If neither of these compiler options is set, the compiler mode
is set by the value of the OBJECT_MODE environment variable."
As mentioned in my original post, I set that with
Code:
export OBJECT_MODE=64
Is there something else I'm supposed to get from the manual?
I need some advise.
I have an application server running several applications. When I try and start a particular application when the others are running I receive the following. This is appearing in the core file that is created.
... (1 Reply)
Hellp all,
if there is 3G memory in my Unix server I want to know if all the 3G space can be used by ong sigle process. As i know, in Windows, one process can only access at most 1G memory despite there is probably more than 1G memory is equipped. (1 Reply)
I have a customer with an HP DL380 G4 server running Redhat 2.1 AS that has 4GB memory installed. They want to upgrade in the server to the maximum of 12GB using (6) 2GB DIMMs. I can do this for them, but I read somewhere that Redhat 2.1 has an upper memory limit. Or you need a kernel patch to use... (2 Replies)
I have a Java program. I want to measure the total memory used by the program, especially the peak memory. Is there a way to do it?
I have tried utilities like time (which returns 0) and top (which is not very useful) as the program does not run for long.
Can anyone suggest a way to do this?... (5 Replies)
Is there an input file memory limit for awk?
I have a 38Mb text file that I am trying to print out certatin lines and add a string to the end of that line.
When I excute the script on the 38Mb file the string I am adding is put on a new line. If I do the same with a smaller file the... (3 Replies)
Hi, I have .sh script running php script with "php". When I run php script from web browser, it is running without errors. When I run it from .sh script, I am getting "memory exhausted". It seems to me that running php from .sh does not respect php.ini or have its own setting. So, how can I set... (0 Replies)
i have to shared a variable between two different c programs with shared memory and i do these:
int main() {
int a=5,b=7;
int buffer;
int *point;
int shmid;
shmid=shmget(IPC_PRIVATE , sizeof(buffer),0666);
point=(int *)shmat(shmid,NULL,0);
point=a;
... (21 Replies)
Hi all !
I'm new in this site, so sorry if this question is into wrong place.
How can I limit cpu/core and memory usage by user?
System: RedHat Ent. Linux. 6.4
Tks, (4 Replies)
Discussion started by: Tiago
4 Replies
LEARN ABOUT BSD
setrlimit
GETRLIMIT(2) System Calls Manual GETRLIMIT(2)NAME
getrlimit, setrlimit - control maximum system resource consumption
SYNOPSIS
#include <sys/time.h>
#include <sys/resource.h>
getrlimit(resource, rlp)
int resource;
struct rlimit *rlp;
setrlimit(resource, rlp)
int resource;
struct rlimit *rlp;
DESCRIPTION
Limits on the consumption of system resources by the current process and each process it creates may be obtained with the getrlimit call,
and set with the setrlimit call.
The resource parameter is one of the following:
RLIMIT_CPU the maximum amount of cpu time (in seconds) to be used by each process.
RLIMIT_FSIZE the largest size, in bytes, of any single file that may be created.
RLIMIT_DATA the maximum size, in bytes, of the data segment for a process; this defines how far a program may extend its break with
the sbrk(2) system call.
RLIMIT_STACK the maximum size, in bytes, of the stack segment for a process; this defines how far a program's stack segment may be
extended. Stack extension is performed automatically by the system.
RLIMIT_CORE the largest size, in bytes, of a core file that may be created.
RLIMIT_RSS the maximum size, in bytes, to which a process's resident set size may grow. This imposes a limit on the amount of physi-
cal memory to be given to a process; if memory is tight, the system will prefer to take memory from processes that are
exceeding their declared resident set size.
A resource limit is specified as a soft limit and a hard limit. When a soft limit is exceeded a process may receive a signal (for example,
if the cpu time is exceeded), but it will be allowed to continue execution until it reaches the hard limit (or modifies its resource
limit). The rlimit structure is used to specify the hard and soft limits on a resource,
struct rlimit {
int rlim_cur; /* current (soft) limit */
int rlim_max; /* hard limit */
};
Only the super-user may raise the maximum limits. Other users may only alter rlim_cur within the range from 0 to rlim_max or (irre-
versibly) lower rlim_max.
An "infinite" value for a limit is defined as RLIM_INFINITY (0x7fffffff).
Because this information is stored in the per-process information, this system call must be executed directly by the shell if it is to
affect all future processes created by the shell; limit is thus a built-in command to csh(1).
The system refuses to extend the data or stack space when the limits would be exceeded in the normal way: a break call fails if the data
space limit is reached. When the stack limit is reached, the process receives a segmentation fault (SIGSEGV); if this signal is not caught
by a handler using the signal stack, this signal will kill the process.
A file I/O operation that would create a file that is too large will cause a signal SIGXFSZ to be generated; this normally terminates the
process, but may be caught. When the soft cpu time limit is exceeded, a signal SIGXCPU is sent to the offending process.
RETURN VALUE
A 0 return value indicates that the call succeeded, changing or returning the resource limit. A return value of -1 indicates that an
error occurred, and an error code is stored in the global location errno.
ERRORS
The possible errors are:
[EFAULT] The address specified for rlp is invalid.
[EPERM] The limit specified to setrlimit would have
raised the maximum limit value, and the caller is not the super-user.
SEE ALSO csh(1), quota(2), sigvec(2), sigstack(2)BUGS
There should be limit and unlimit commands in sh(1) as well as in csh.
4th Berkeley Distribution May 13, 1986 GETRLIMIT(2)