Tag Info

New answers tagged

-1

Simply you should try this echo 3 > /proc/sys/vm/drop_caches but you one is also working with me Same situation here but works fine [root@I-IDS ~]# w 20:56:35 up 4:03, 2 users, load average: 0.00, 0.00, 0.11 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root tty4 - 16:55 3:48m 0.25s 0.25s -bash root ...


2

Since kernel 2.4 there is no difference between these cache types, there is only the page cache left.


0

Many processes share some of its memory with other processes, e.g. libc is used by nearly every process but only mapped in memory once, but it counts towards the virtual memory usage of every process. Limiting memory usage that's only used by a certain process (mostly RSS) can be done using cgroups. See answers to How to limit the total resources (memory) of ...


0

I created a script that does this, using cgmanager which is used in Ubuntu. One advantage is that this does not require root access. Note that cgroup management is a bit distro specific, so I don't know if this works on distros that use systemd cgroup management. #!/bin/sh set -eu if [ "$#" -lt 2 ] then echo Usage: `basename $0` "<limit> ...


-2

You can try: $ ps -eo vsz,comm= | awk 'NR>1{u[$2]+=$1}END{for(i in u) print u[i]"="i}'


2

The command line option -o (o standing for "Override-sort-field") also works on my Xubuntu machine and according to the Mac man page of top it shoult work on a Macintosh too. If I want to short by memory usage I usually use top -o %MEM which shorts by the column %MEM. But I can use VIRT, RES or SHR too. On a Macintosh I would probably use mem or vsize. I ...


0

This does look like OOM killing: What you can do: Keep checking the memory usage periodically until the programs starts crashing. You will most probably see memory usage about to hit its limits. Increase the swap space. Increasing the swap may make some application response-time slower, but will prevent applications from getting killed or from getting ...


0

The short answer is: ulimit -m 1000000 ulimit -v 1000000 which will limit each process to 1 GB RAM. Limiting the memory the "right" way is in practice extremely complicated: Let us say you have 1 GB RAM. You start a process every 10 seconds and each process uses 1 MB more every second. So after 140 seconds you will have something like this: 10██▎ ...


1

If a process is doing a lot of memory IO, then that will translate into using a lot of cpu time, so the scheduler will account for it, indirectly.


0

I'm pretty sure that 128 MB is more than enough if you're only going to use SSH and AppArmor. I remember Debian taking up less than 64 MB of RAM with just SSH and an Asterisk PBX started.


0

The solution was to edit /etc/init.d/fail2ban. This is the start script: start() { echo -n $"Starting fail2ban: " ulimit -s 256 ${FAIL2BAN} -x start > /dev/null RETVAL=$? if [ $RETVAL = 0 ]; then touch ${lockfile} echo_success else echo_failure fi echo return $RETVAL } Unfortunately it's only saving me 50 mb


0

/etc/default The directory /etc/default is never used on any Red Hat based distros. That's a Debian/Ubuntu-ism. For Centos 7 you can take a look at the packages that were installed that relate to fail2ban like so: $ rpm -aq|grep fail fail2ban-server-0.9-9.el7.noarch fail2ban-sendmail-0.9-9.el7.noarch fail2ban-firewalld-0.9-9.el7.noarch ...


-1

If your machine has usual sysvinit scripts, you can do that in /etc/init.d/fail2ban (early enough, i.e. before the daemon is started). If your machine uses systemd, you can do that via fail2ban.service. For instance, instead of ExecStart=/usr/bin/fail2ban-client -x start do ExecStart=/bin/sh -c 'ulimit -s 256; /usr/bin/fail2ban-client -x start'


0

ps -o pid,user,vsz,rss,comm,args The 4th column (rss) is the resident set size, the non-swapped physical memory used by a task, in kiloBytes.



Top 50 recent answers are included