But the site is far remote and having alert on battery exhaustion can no longer help . As I said before , I am suspicious if it comes from frequent power cuts so seeking some means to distinguish it among the system logs. Thank you in advance On Sun, Oct 30, 2016 at 12:08 AM, Mike Mohr <akihana at gmail.com> wrote:> If your battery backup can handle 2 hours of runtime then it almost > certainly has a network management interface. Why aren't you using it to > send alerts? > > On Oct 30, 2016 12:05 AM, "Hadi Motamedi" <motamedi24 at gmail.com> wrote: > > > Thank you for your reply. You are correct and the ups is present there > but > > the battery charger can no longer bear power cuts more than two hours so > I > > need some means to distinguish frequent power cuts there among the system > > logs. > > > > On Sun, Oct 30, 2016 at 12:02 AM, Eero Volotinen <eero.volotinen at iki.fi> > > wrote: > > > > > you could use smart ups and connect information from it to system, so > it > > > can shutdown system in clean way. > > > > > > Eero > > > > > > 2016-10-30 7:12 GMT+02:00 Hadi Motamedi <motamedi24 at gmail.com>: > > > > > > > Dear All > > > > I am using a centos server for cdr billing and mediation device on a > > > remote > > > > network. I am experiencing problem that I am suspicious it comes from > > > main > > > > supply power cut at the remote site. The power supply to the remote > > site > > > > comes from battery charger that will be automatically switched in > > circuit > > > > under main supply power cut but cannot provide adequate power for > more > > > than > > > > 2 hours . I am suspicious that the remote system is suffering from > many > > > > frequent main supply power cut . Can you please do me favor and let > me > > > know > > > > if there is any log on my centos server that I can check to see if > > there > > > > would be many frequent power cut there ? > > > > Thank you for your time > > > > _______________________________________________ > > > > CentOS mailing list > > > > CentOS at centos.org > > > > https://lists.centos.org/mailman/listinfo/centos > > > > > > > _______________________________________________ > > > CentOS mailing list > > > CentOS at centos.org > > > https://lists.centos.org/mailman/listinfo/centos > > > > > _______________________________________________ > > CentOS mailing list > > CentOS at centos.org > > https://lists.centos.org/mailman/listinfo/centos > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >
On 30/10/16 07:11, Hadi Motamedi wrote:> But the site is far remote and having alert on battery exhaustion can no > longer help . As I said before , I am suspicious if it comes from frequent > power cuts so seeking some means to distinguish it among the system logs. > Thank you in advance > >Your UPS should be capable of logging to /var/log/messages and should also be capable of powering down the system cleanly when the battery reaches a predetermined critical level (either run time remaining or percentage charge), so there shouldn't be any uninitiated shutdowns. The UPS logs should tell you exactly how many power outages you are getting together with how long each one lasts. It sounds like you haven't configured your UPS.
Thank you very much for your help. I have received plentiful helpful messages . Please consider this case as solved. Thank you again On Sun, Oct 30, 2016 at 12:47 AM, Ned Slider <ned at unixmail.co.uk> wrote:> On 30/10/16 07:11, Hadi Motamedi wrote: > >> But the site is far remote and having alert on battery exhaustion can no >> longer help . As I said before , I am suspicious if it comes from frequent >> power cuts so seeking some means to distinguish it among the system logs. >> Thank you in advance >> >> >> > Your UPS should be capable of logging to /var/log/messages and should also > be capable of powering down the system cleanly when the battery reaches a > predetermined critical level (either run time remaining or percentage > charge), so there shouldn't be any uninitiated shutdowns. The UPS logs > should tell you exactly how many power outages you are getting together > with how long each one lasts. It sounds like you haven't configured your > UPS. > > > > > > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >
On 10/30/2016 12:47 AM, Ned Slider wrote:> On 30/10/16 07:11, Hadi Motamedi wrote: >> But the site is far remote and having alert on battery exhaustion can no >> longer help . As I said before , I am suspicious if it comes from >> frequent >> power cuts so seeking some means to distinguish it among the system >> logs. > > Your UPS should be capable of logging to /var/log/messages and should > also be capable of powering down the system cleanly when the battery > reaches a predetermined critical level (either run time remaining or > percentage charge), so there shouldn't be any uninitiated shutdowns. > The UPS logs should tell you exactly how many power outages you are > getting together with how long each one lasts. It sounds like you > haven't configured your UPS.if its a proper enterprise/server grade commercial UPS, you should be able to monitor the charge state of the battery via the USB network interface... I don't know what sort of UPS this is, and I've seen some pictures of some awful things in the third world that use a charger module, and a bunch of old car batteries on the floor, and an inverter, running whole households during the regular afternoon brownouts. I don't think those sorts of things *have* network monitoring, but enterprise grade UPS's like newer SmartUPS, Eaton PowerWare, etc DO have this ability. APC tend to be worse at this than most of the better alternatives like Eaton. if this UPS *does* have any sort of thing that will give you battery state information, use NUT, the Network UPS Tool, on linux, and if you're dealing with a homebrew UPS, build your own module that can monitor that voltage. I would use NUT initiate an OS shutdown when you get to 20% battery charge state, which is around 12.0VDC (fully charged 12V lead acid battery is 12.6VDC, on the AC powered charger, its more like 13.8-14.1V). NUT is quite powerful, and very flexible. one server could monitor the UPS (maybe even via using a USB digital volt meter module connected directly to the batteries), and that master NUT node could tell all the other nodes/systems to shutdown, too. Letting this sort of homebrew UPS fully run down the batteries to totally dead shortens the batteries life. if you could shut the systems AND the UPS off at before the batteries are totally run down, they'll last a lot longer. if this UPS is the homebrew third world bodge I described, you could pretty easily build a NUT master w/ a raspberry pi and a ADC 'hat' -- john r pierce, recycling bits in santa cruz