The Wanderer wrote:
> On 2021-07-05 at 22:42, Victor Sudakov wrote:
>
> > Greg Wooledge wrote:
>
> >> And in any case, when you test this stuff, use the subshells.
> >
> > Well, my goal is to find a way to limit programs run from cron, PHP's
> > proc_open() etc., not from the interactive shell
Victor Sudakov wrote:
>
> FreeBSD has a simple way to run some ad-hoc program with memory limits:
>
> $ limits -m 2G ./mytest
> memoryuse 2097152 kB
> vmemoryuse infinity kB
> $ limits -m 1G ./mytest
> memoryuse 1048576 kB
> vmemoryuse infinity
Greg Wooledge wrote:
> On Mon, Jul 05, 2021 at 11:01:25PM -0400, The Wanderer wrote:
> > On 2021-07-05 at 22:42, Victor Sudakov wrote:
> >
> > > Greg Wooledge wrote:
> >
> > >> And in any case, when you test this stuff, use the subshells.
> > >
> > > Well, my goal is to find a way to limit pro
On Mon, Jul 05, 2021 at 11:11:06PM -0400, Greg Wooledge wrote:
> > > $ prlimit --as=1048576 /bin/ls
> > > /bin/ls: error while loading shared libraries: libselinux.so.1: failed to
> > > map segment from shared object
>
> Sounds like you set it too low. Remember, setrlimit(2) and prlimit(2)
> say
On Mon, Jul 05, 2021 at 11:01:25PM -0400, The Wanderer wrote:
> On 2021-07-05 at 22:42, Victor Sudakov wrote:
>
> > Greg Wooledge wrote:
>
> >> And in any case, when you test this stuff, use the subshells.
> >
> > Well, my goal is to find a way to limit programs run from cron, PHP's
> > proc_o
On 2021-07-05 at 22:42, Victor Sudakov wrote:
> Greg Wooledge wrote:
>> And in any case, when you test this stuff, use the subshells.
>
> Well, my goal is to find a way to limit programs run from cron, PHP's
> proc_open() etc., not from the interactive shell. What would you advise?
Is there a
Greg Wooledge wrote:
[dd]
> >
> >
> > # ulimit -m 1048576 ; stress-ng --vm 1 --vm-bytes 8G
> > stress-ng: info: [10961] defaulting to a 86400 second (1 day, 0.00 secs)
> > run per stressor
> > stress-ng: info: [10961] dispatching hogs: 1 vm
> >
> > stress-ng is not killed. Swap is not enabl
On Mon, Jul 05, 2021 at 10:57:03PM +0700, Victor Sudakov wrote:
> Greg Wooledge wrote:
> > One way would be:
> >
> > (ulimit -m 2097152; ./mytest)
>
> Is the value in KB or MB? Seems KB.
Please read the documentation.
unicorn:~$ ulimit -a | grep -- -m
max memory size (kbytes, -m) un
Victor Sudakov wrote:
> > This assumes you're using bash as your shell.
>
> I am, as you see above. I expect stress-ng to be killed when it tries to
> allocate 2G of memory but it's not happening. Can you reproduce your
> advice?
Even as root, there is no "Operation not permitted" message, but th
Greg Wooledge wrote:
> On Mon, Jul 05, 2021 at 10:15:19AM +0700, Victor Sudakov wrote:
> > FreeBSD has a simple way to run some ad-hoc program with memory limits:
> >
> > $ limits -m 2G ./mytest
> > memoryuse 2097152 kB
> > vmemoryuse infinity kB
> > $ limits -m 1G ./myte
On Mon, Jul 05, 2021 at 10:15:19AM +0700, Victor Sudakov wrote:
> FreeBSD has a simple way to run some ad-hoc program with memory limits:
>
> $ limits -m 2G ./mytest
> memoryuse 2097152 kB
> vmemoryuse infinity kB
> $ limits -m 1G ./mytest
> memoryuse 104857
Dear Colleagues,
FreeBSD has a simple way to run some ad-hoc program with memory limits:
$ limits -m 2G ./mytest
memoryuse 2097152 kB
vmemoryuse infinity kB
$ limits -m 1G ./mytest
memoryuse 1048576 kB
vmemoryuse infinity kB
How do I do the sam
12 matches
Mail list logo