ulimit TOTAL memory can be used per user?
Is there a way to ulimit the total memory allowed by one user ?
--
- paultwang -
PGP: 0x2670EA0E
Is there a way to ulimit the total memory allowed by one user ?
--
- paultwang -
PGP: 0x2670EA0E
> Is there a way to ulimit the total memory allowed by one user ?
> --
> - paultwang -
> PGP: 0x2670EA0E
Andy H
--------------------------
Happy 10th Birthday Linux
> > ulimit TOTAL memory can be used per user?
> > Is there a way to ulimit the total memory allowed by one user ?
> Have you tried looking at the limits.conf file located in /etc/security? it
> allows you to define limits for the number of processes, locked in memory,
> open files etc.
--
2.4.5 in init/main.c(607):
struct task_struct *child_reaper = &init_task;
>> > ulimit TOTAL memory can be used per user?
>> > Is there a way to ulimit the total memory allowed by one user ?
>> Have you tried looking at the limits.conf file located in
>> /etc/security? it allows you to define limits for the number of
>> processes, locked in memory, open files etc.
> What is the difference to ulimit? The settings are exactly the same.
> Or did I miss something?
Michael Heiming
> Somehow the same, ulimit is a bash builtin, /etc/security/limits.conf
> belongs to PAM. "The Linux-PAM System Administrators'
> Guide" (linuxdoc.org), case it didn't came with your distro, for more
> info.
--
2.4.5 in kernel/acct.c(25):
XTerms and EMACS are manifestations of pure evil.
>> Somehow the same, ulimit is a bash builtin,
>> /etc/security/limits.conf belongs to PAM. "The Linux-PAM System
>> Administrators' Guide" (linuxdoc.org), case it didn't came with
>> your distro, for more info.
> I mean, do the same problems appear (vmsize is only a limit
> for a single process and not all together)?
Michael Heiming
> >> Rudolf Polzer wrote at Saturday 01 September 2001 20:19 like only
> >> he can:
> >> > What is the difference to ulimit? The settings are exactly the
> >> > same. Or did I miss something?
> >> Somehow the same, ulimit is a bash builtin,
> >> /etc/security/limits.conf belongs to PAM. "The Linux-PAM System
> >> Administrators' Guide" (linuxdoc.org), case it didn't came with
> >> your distro, for more info.
> > I mean, do the same problems appear (vmsize is only a limit
> > for a single process and not all together)?
> You can set the values to your needs, combining them, settings per
> user are possible.
> I fail to see your problem?
I wanted to know if /etc/security/limits.conf has the same problem.
At least the possible settings are the same, so I guess (do not
know) that /etc/security/limits.conf just calls ulimit() to
do its work.
--
2.4.5 in Documentation/MAINTAINERS:
THE REST
P: Linus Torvalds
S: Buried alive in reporters
>> >> Rudolf Polzer wrote at Saturday 01 September 2001 20:19 like
>> >> only he can:
>> >> > What is the difference to ulimit? The settings are exactly the
>> >> > same. Or did I miss something?
>> >> Somehow the same, ulimit is a bash builtin,
>> >> /etc/security/limits.conf belongs to PAM. "The Linux-PAM System
>> >> Administrators' Guide" (linuxdoc.org), case it didn't came with
>> >> your distro, for more info.
>> > I mean, do the same problems appear (vmsize is only a limit
>> > for a single process and not all together)?
>> You can set the values to your needs, combining them, settings per
>> user are possible.
>> I fail to see your problem?
> I mean: when I do a
> ulimit -v 8192
> I can still use up more than 8M by just using multiple processes.
No, PAM is working through the kernel, where ulimit is used by bash,Quote:> I wanted to know if /etc/security/limits.conf has the same problem.
> At least the possible settings are the same, so I guess (do not
> know) that /etc/security/limits.conf just calls ulimit() to
> do its work.
Michael Heiming
> >> Rudolf Polzer wrote at Saturday 01 September 2001 21:39 like only
> >> he can:
> >> >> Rudolf Polzer wrote at Saturday 01 September 2001 20:19 like
> >> >> only he can:
> >> >> > What is the difference to ulimit? The settings are exactly the
> >> >> > same. Or did I miss something?
> >> >> Somehow the same, ulimit is a bash builtin,
> >> >> /etc/security/limits.conf belongs to PAM. "The Linux-PAM System
> >> >> Administrators' Guide" (linuxdoc.org), case it didn't came with
> >> >> your distro, for more info.
> >> > I mean, do the same problems appear (vmsize is only a limit
> >> > for a single process and not all together)?
> >> You can set the values to your needs, combining them, settings per
> >> user are possible.
> >> I fail to see your problem?
> > I mean: when I do a
> > ulimit -v 8192
> > I can still use up more than 8M by just using multiple processes.
> True, but you may limit the number of process too.
I mean: do both call the ulimit() function? If yes, they must haveQuote:> > I wanted to know if /etc/security/limits.conf has the same problem.
> > At least the possible settings are the same, so I guess (do not
> > know) that /etc/security/limits.conf just calls ulimit() to
> > do its work.
> No, PAM is working through the kernel, where ulimit is used by bash,
> other shells may require another setup, as /etc/profile may not be
> read by them (Ie. csh), so using PAM would enable more global
> settings.
--
www42:~ # mv /mnt/c/windows/win.com /dev/null
mv: /dev/null: data refused
>> >> Rudolf Polzer wrote at Saturday 01 September 2001 21:39 like
>> >> only he can:
>> >> >> Rudolf Polzer wrote at Saturday 01 September 2001 20:19 like
>> >> >> only he can:
>> >> >> > What is the difference to ulimit? The settings are exactly
>> >> >> > the same. Or did I miss something?
>> >> >> Somehow the same, ulimit is a bash builtin,
>> >> >> /etc/security/limits.conf belongs to PAM. "The Linux-PAM
>> >> >> System Administrators' Guide" (linuxdoc.org), case it didn't
>> >> >> came with your distro, for more info.
>> >> > I mean, do the same problems appear (vmsize is only a limit
>> >> > for a single process and not all together)?
>> >> You can set the values to your needs, combining them, settings
>> >> per user are possible.
>> >> I fail to see your problem?
>> > I mean: when I do a
>> > ulimit -v 8192
>> > I can still use up more than 8M by just using multiple processes.
>> True, but you may limit the number of process too.
> So if I want a user to only use up 64 MB and have 32 processes (not
> very much, especially in X), any process only may have 2 MB? No,
> that is not feasible.
>> > I wanted to know if /etc/security/limits.conf has the same
>> > problem. At least the possible settings are the same, so I guess
>> > (do not know) that /etc/security/limits.conf just calls ulimit()
>> > to do its work.
>> No, PAM is working through the kernel, where ulimit is used by
>> bash, other shells may require another setup, as /etc/profile may
>> not be read by them (Ie. csh), so using PAM would enable more
>> global settings.
> I mean: do both call the ulimit() function? If yes, they must have
> the same drawbacks.
Using something like this, should do what you want:
username hard nproc 32
username hard rss 64000
http://www.kernel.org/pub/linux/libs/pam/index.html for more info.
Michael Heiming
> No, they don't as I wrote before.
> Using something like this, should do what you want:
> username hard nproc 32
> username hard rss 64000
rpolzer hard as 8192
rpolzer hard rss 8192
rpolzer hard data 8192
rpolzer hard stack 8192
but this still works:
Perhaps I first need to 'switch on' this limiter? I have Debian 2.2r3
Potato.
Or when do these changes become active? After reboot? I only tried
relogin.
--
Your password must be at least 18770 characters and cannot repeat any of
your previous 30689 passwords. Please type a different password. Type a
password that meets these requirements in both text boxes. [M$]
(Fix: http://support.microsoft.com/support/kb/articles/q276/3/04.ASP)
>> No, they don't as I wrote before.
>> Using something like this, should do what you want:
>> username hard nproc 32
>> username hard rss 64000
> At least it does not work. I have now:
> rpolzer hard as 8192
> rpolzer hard rss 8192
> rpolzer hard data 8192
> rpolzer hard stack 8192
> but this still works:
> Perhaps I first need to 'switch on' this limiter? I have Debian
> 2.2r3 Potato.
> Or when do these changes become active? After reboot? I only tried
> relogin.
this a newsgroup, not a help desk, did you even bother to check the
docs I suggested to read, where it says somewhere concerning the
pam_limits module:
Module Name:
pam_limits
[...]
System dependencies:
requires an /etc/security/limits.conf file and kernel support
for resource limits. Also uses the library, libpwdb.
Good luck
Michael Heiming
> > Or when do these changes become active? After reboot? I only tried
> > relogin.
> Hello,
> this a newsgroup, not a help desk, did you even bother to check the
> docs I suggested to read, where it says somewhere concerning the
> pam_limits module:
This was definitively _not_ the problem. It was /etc/pam.d/loginQuote:> Module Name:
> pam_limits
> [...]
> System dependencies:
> requires an /etc/security/limits.conf file and kernel support
> for resource limits. Also uses the library, libpwdb.
--
{if($c=$s[$x][$y]=1-$s[$x][$y]){($a,$b)=(-$b,$a);}else{($a,$b)=($b,-$a)
.(substr(' .:',$d,1));$x+=$a;$y+=$b;for(1..1000){};}print"\e[HDone.\n"Quote:}$d=$s[$x][$y^1]*(1+($y&1))+(2-($y&1))*$c;print"\e[".int($y/2).";${x}H"
There are some patches to do per-user CPU accounting & resource
limiting (the fairsched patch by Rik van Riel and the unrelated
fairsched.sf.net) which stops one user using up all the CPU unfairly
but I haven't seen one for memory.
--
Nick Craig-Wood
1. How to see memory used per user; memory used per process
I wont to find the offenders on our system..
sorry for a newbie quesion, couldn't find it in my books
2. grep involving a count (display/file output)
3. virtual memory limit per user (ulimit -v)
5. finding total "disk used" per user
7. Raising ulimit's on a per user basis in Linux
9. virtual per user limits (ulimit -v)
10. Total memory reported / memory used
11. Totalling CPU time per user?
12. How to obtain information on amount of Free/Total system/user memory
13. Total Memory Used and Reported