[CentOS] Gracefully powering off system in case of power failure

Sat Jul 4 06:27:45 UTC 2015
Jatin Davey <jashokda at cisco.com>

Hi

I am using the system as shown below.

*********************************
[root at localhost sbin]# cat /etc/*release
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphi 
cs-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Red Hat Enterprise Linux Server release 6.5 (Santiago)
Red Hat Enterprise Linux Server release 6.5 (Santiago)
[root at localhost sbin]# uname -a
Linux localhost.localdomain 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 
22:19:54 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
[root at localhost sbin]#

**********************************

In case of power failure on this server , how can i make the system to 
shutdown gracefully so that it unmounts the file-system and cleans up 
the required buffers.

My server does have a battery backup so it will help in shutting down 
the system more gracefully.

I tried looking at this link:

https://www.olimex.com/forum/index.php?topic=3326.0

But it did not help. Appreciate if someone can help me in this regard.

Thanks
Jatin