How much RAM do your dæmons use?

I have a notebook, an old Acer Aspire One with only 512 MB RAM. I try to minimise RAM usage, by only running things that I really need. To get an overview of the RAM usage by system dæmons, the following snippet was useful:

ps aux | grep -E '[r]oot|www-data|sbin' | mawk {'print $6 "\t" $11 " " $12 " " \
                  $13 " " $14'} | grep -v '\[' | sort -n -r
11724   X :0 vt7 vt7
3088    /usr/sbin/hald
2972    sshd: root@notty
2632    ssh -x -a -oClearAllForwardings=yes
2568    wvdial
2360    /usr/sbin/slapd -h ldap:/// ldapi:///
2212    /usr/sbin/console-kit-daemon --no-daemon
1844    /usr/sbin/privoxy --pidfile /var/run/privoxy.pid --user
1268    /usr/sbin/rsyslogd -c4
1152    hald-runner
1148    sudo wvdial
1088    hald-addon-input: Listening on /dev/input/event10
1068    /usr/sbin/pppd 460800 modem crtscts
1056    sshfs root@127.0.0.1:/ mnt/local/
1028    /usr/lib/openssh/sftp-server
1004    /usr/lib/hal/hald-addon-rfkill-killswitch
1004    /usr/lib/hal/hald-addon-leds
988     /usr/lib/hal/hald-addon-cpufreq
960     /usr/sbin/hostapd -B -P /var/run/hostapd.wlan0.pid
872     /usr/sbin/sshd
852     /usr/sbin/nodm
852     /usr/sbin/dnsmasq -x /var/run/dnsmasq/dnsmasq.pid -u
848     /usr/sbin/pcscd
796     /usr/sbin/cron
636     /usr/sbin/exim4 -bd -q30m
632     ssh -o ServerAliveInterval=30 -i
628     /usr/bin/xinit /usr/sbin/nodm -- vt7
548     /usr/sbin/acpid
512     /usr/sbin/nodm
512     udevd --daemon
472     /sbin/getty 38400 tty1
404     /usr/sbin/ifplugd -i eth0 -q
380     /sbin/portmap
324     udevd --daemon
324     udevd --daemon
296     /usr/sbin/atd
144     /usr/sbin/acpi_fakekeyd

The leftmost columns shows the amount of resident RAM used.

The mawk stuff can probably be enhanced, but - as is - it gives the essential information.

The output above is what I have now, after stopping some dæmons that took a lot of RAM, specifically tor, which I now only run when I need it. Another dæmon that could be started when needed is pcscd, which could be started automatically when a card-reader is inserted into a USB-port.

comments powered by Disqus


Back to the index

Blog roll

R-bloggers, Debian Weekly
Valid XHTML 1.0 Strict [Valid RSS] Valid CSS! Emacs Muse Last modified: oktober 17, 2019