Page 2 of 3

Re: PROCS WARNING: 257 processes with STATE = RSZDT

Posted: Thu Nov 14, 2013 6:11 am
by WillemDH
Ok, rebooting the server was apparently a bad idead. I sent an email to xisupport with details. All our hosts are grey since the reboot. Open service problems is not updated correctly.

in the meantime adn after a mysql repair, the host are green again..

Re: PROCS WARNING: 257 processes with STATE = RSZDT

Posted: Thu Nov 14, 2013 11:03 am
by slansing
It would make sense if you did not reboot in a safe manner, or nagios, ndo or mysql did not have time to close properly that you would have database corruption and a repair would fix that issue.

Re: PROCS WARNING: 257 processes with STATE = RSZDT

Posted: Thu Nov 14, 2013 12:31 pm
by WillemDH
What's your definition of a safe reboot for the Nagios XI server?

Re: PROCS WARNING: 257 processes with STATE = RSZDT

Posted: Thu Nov 14, 2013 3:53 pm
by abrist

Code: Select all

shutdown -h now
or:

Code: Select all

reboot
Basically, any way that does not result in immediate loss of power.

Re: PROCS WARNING: 257 processes with STATE = RSZDT

Posted: Thu Nov 14, 2013 5:25 pm
by WillemDH
Well shutdown -r now was the command I executed, but still I got grey hosts afterwards... :( I thought maybe I'd better stop mysqld first or so...?

Re: PROCS WARNING: 257 processes with STATE = RSZDT

Posted: Thu Nov 14, 2013 5:36 pm
by abrist
hmmm, maybe it was a stuck process. You could:

Code: Select all

service ndo2db stop
service mysqld stop
service postgresql stop
service nagios stop
shutdown -h now

Re: PROCS WARNING: 257 processes with STATE = RSZDT

Posted: Fri Nov 15, 2013 9:18 am
by WillemDH
The strange thing is that since the reboot, the swap usage is 0 % and seems to stay that way. I never got an answer on my question if I should make our swap file larger by the way?

Re: PROCS WARNING: 257 processes with STATE = RSZDT

Posted: Fri Nov 15, 2013 11:35 am
by abrist
I would not bother if swap is empty. Something must have happened to fill swap, and more swap space may not really compensate for the potential issue that could fill swap quickly. The usual suggestion though is to set swap to 2x your server's ram. Though once you get upwards of 8gb of ram or more, increasing swap will do little good. In fact, swap should not really be used unless your server has too little memory.

Re: PROCS WARNING: 257 processes with STATE = RSZDT

Posted: Thu Apr 17, 2014 5:59 am
by WillemDH
Andy,

It has been some time now since the server rebooted. At the moment the swap space is again in the 'red zone'. I'm considering making the swap larger, but never had to do this in Linux. Is it safe to follow the following procedure I found here: http://www.centos.org/docs/5/html/Deplo ... dding.html

Code: Select all

5.2.1. Extending Swap on an LVM2 Logical Volume

To extend an LVM2 swap logical volume (assuming /dev/VolGroup00/LogVol01 is the volume you want to extend):

    Disable swapping for the associated logical volume:

    # swapoff -v /dev/VolGroup00/LogVol01

    Resize the LVM2 logical volume by 256 MB:

    # lvm lvresize /dev/VolGroup00/LogVol01 -L +256M

    Format the new swap space:

    # mkswap /dev/VolGroup00/LogVol01

    Enable the extended logical volume:

    # swapon -va

    Test that the logical volume has been extended properly:

    # cat /proc/swaps # free

Code: Select all

 df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       20G  9.6G  8.8G  53% /
tmpfs                 1.9G     0  1.9G   0% /dev/shm
/dev/sda1              97M   28M   65M  31% /boot
cifsvol:/root_vdm_2/cifs402/Backups/SRVNAGIOS01
                      4.9T  3.3T  1.6T  68% /var/Digipolis/Backup

Code: Select all

 cat /proc/swaps # free
Filename                                Type            Size    Used    Priority
/dev/dm-0                               partition       262136  214968  -1
Recommendations by CentOs are

Code: Select all

If M < 2
	S = M *2
Else
	S = M + 2
At the moment the swap is 256 MB (still the same value since I downloaded Nagios XI standard image), so as the server now has 4GB RAM, I should make the swap 4 GB? See image for the (d)evolution of the swap usage.

Grtz

Willem

Re: PROCS WARNING: 257 processes with STATE = RSZDT

Posted: Thu Apr 17, 2014 10:41 am
by sreinhardt
As andy said, ideally swap shouldn't be used too much, but it is a good idea to have at least as much swap as memory, to a point (around 6-8gb is more than enough swap). With that said, I would definitely suggest upgrading the swap to a size at least equal to your memory amount, 256mb doesn't give the system much to play around with if memory is getting filled up as well. Your commands above seem just fine for increasing swap, short of changing the sizes that it is allocating.