pirmdiena, 2012. gada 29. oktobris

Lack of RAM and swap space on Zabbix server

I have heavy loaded Zabbix server, we had 2 GB and it appears we need more, so we added 1 GB RAM but things get worse- swap file is about to end- now what? Zabbix server reports it have no free swap space. Zabbix server must not be stopped because several admins are monitoring country wide systems.

Thanks god I found good manual in internet. http://www.susegeek.com/general/how-to-add-additional-swap-area-in-suseopensuse/ most commands are taken from there. So first check out usage of swap.
free -tom
then check where swap files are located
swapon -s
I use command to look where can I place swapfile
df -h
Command to create 1 GB swap file where /var/swap_1 are place and name of swapfile
dd if=/dev/zero of=/var/swap_1 bs=1024 count=1000000
now we can turn that file onto swapfile
mkswap /var/swap_1
no say to OS to put swap on that file
swapon /var/swap_1
to check out if swap working
free -tom
to make those changes permanent you have to  change fstab file
vi /etc/fstab
 and add something like this
/var/swap_1          swap                 swap       defaults              0 0
"Problemo solved" says penguin. Check out Zabbix console to see if swap file is in use.



3 komentāri:

  1. Hi Giors,

    Looking at this page:
    http://faqwiki.blogspot.co.uk/2012/10/lack-of-ram-and-swap-space-on-zabbix.html

    Can you remember the macro you or process you did to make that graph? I'm new to Zabbix, and using v2.4. I don't have "free swap space" on my dropdown, just "swap space" and a pie chart, but no graph appearing.

    I'd be grateful if you could post instructions on this.

    Cheers,

    AtbildētDzēst
    Atbildes
    1. Type in Zabbix server search zabbix server name, swap ->details, then click on swap.

      Dzēst