Sponsored Content
Top Forums UNIX for Advanced & Expert Users how to restrict memory usage by a process Post 302138800 by frankkahle on Wednesday 3rd of October 2007 01:12:19 PM
Old 10-03-2007
need general limit

Quote:
Originally Posted by jim mcnamara
ulimit is a bash builtin command. You can limit resource use with that; change the shell script that runs the process. Add ulimit -H (hard) with a -d [size] if the data segment needs to be limited, or overall working set size with -m [size]. [size] is a number of 1024 byte chunks.
I need to have this be a system wide limit, the users are running the ones running the process, I dont really want to modify their scripts.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Memory usage of a process

hi all, i want to write a script that checks the memory usage of processes and send a mail with the name of the process witch is using more then 300mb RAM. dose anybody have a sample script or an idea how i can make it ? PROCCESSES="snmpd sendmail" for myVar in $PROCCESSES do ... (7 Replies)
Discussion started by: tafil
7 Replies

2. HP-UX

how could I get a process Memory Usage

I use pstat API to get Process Infomation I would like to get a process 1.process owner 2.how many physical memory and virtual memory and total memory used(KB) and usage(%) 3.a process excution file create time 4.a process excution file access time I do't know which attribute it i need ... (3 Replies)
Discussion started by: alert0919
3 Replies

3. AIX

How to trace cpu/memory usage for a process

I don't know when the process will start and end, I need write a script to trace it's cpu/memory usage when it is runing. How to write this script? (2 Replies)
Discussion started by: rainbow_bean
2 Replies

4. Programming

Memory usage of a process having shared libraries

Hi, I have the following two processes that's built with static libraries. Both the process have many common libraries. -rwxr-xr-x 1 xxx xxx 152946280 Oct 15 08:38 server1 -rwxr-xr-x 1 xxx xxx 41633880 Oct 15 08:39 server2. I built these two server processes making all the... (1 Reply)
Discussion started by: srivatsan_vn
1 Replies

5. Emergency UNIX and Linux Support

Memory usage of a process having shared libraries

Hi, I have the following two processes that's built with static libraries. Both the process have many common libraries. -rwxr-xr-x 1 xxx xxx 152946280 Oct 15 08:38 server1 -rwxr-xr-x 1 xxx xxx 41633880 Oct 15 08:39 server2. I built these two server processes making all the... (1 Reply)
Discussion started by: srivatsan_vn
1 Replies

6. UNIX for Advanced & Expert Users

collecting memory usage by a process

Hi Guys, I work on a AIX environment and I'm trying to write a script where I can collect all the memory used by a process. Basically I'm executing the command 'ps -fu userid' to get all the process ids and then executing the 'ps v PID' to get all the memory allocated by PPID. My question is... (2 Replies)
Discussion started by: arizah
2 Replies

7. HP-UX

Virtual Memory Usage a Process

Hi all, Is there any command which shows the virtual memory usage of a particular process in HP-UX machine. I have tried with ps, top but could not get what I want. Kindly provide me a solution. Thanks in Advance ARD (4 Replies)
Discussion started by: ard
4 Replies

8. Solaris

Process memory usage

hi all gurus: I want to find out Solaris process memory usage, but got a bit confused, see if any one can provide me some guidance. i tend to use prstat -a to get total memory consumption by user (I know prstat likely have a bug that simply sum up the memory, regardless if the memory being... (5 Replies)
Discussion started by: oakville
5 Replies

9. UNIX for Beginners Questions & Answers

How can I check actual memory usage each Process?

I can't check actual memory usage in the Redhat 5.5... The used memory is 14214 Mb of Total 15919 by Free -m command. I sum the RSS value on PS aux command result and the value is 5428.66Mb. Yes It's quite different actual usage memory and RSS value. So I added Shared memory value... (5 Replies)
Discussion started by: tom8254
5 Replies

10. Solaris

Find memory usage for a process

I have multiple oracle databases on one server. All the database are running from the same user i.e. oraent. The process for each database can be distinguished by the ps -ef command Eg : ps -ef | grep oraentThe Output : oraent 5361 1 0 20:58:05 ? 0:00 oracledb1... (11 Replies)
Discussion started by: yashreads
11 Replies
ULIMIT(3)						     Linux Programmer's Manual							 ULIMIT(3)

NAME
ulimit - get and set user limits SYNOPSIS
#include <ulimit.h> long ulimit(int cmd, long newlimit); DESCRIPTION
Warning: This routine is obsolete. The include file is no longer provided by glibc. Use getrlimit(2), setrlimit(2) and sysconf(3) instead. For the shell command ulimit, see bash(1). The ulimit call will get or set some limit for the current process. The cmd argument can have one of the following values. UL_GETFSIZE Return the limit on the size of a file, in units of 512 bytes. UL_SETFSIZE Set the limit on the size of a file. 3 (Not implemented for Linux.) Return the maximum possible address of the data segment. 4 (Implemented but no symbolic constant provided.) Return the maximum number of files that the calling process can open. RETURN VALUE
On success, ulimit returns a nonnegative value. On error, -1 is returned, and errno is set appropriately. ERRORS
EPERM A non-root process tried to increase a limit. CONFORMING TO
SVID. SEE ALSO
bash(1), getrlimit(2), setrlimit(2), sysconf(3) Linux 2.0 1998-06-12 ULIMIT(3)
All times are GMT -4. The time now is 10:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy