No info from Apcupsd

Help
2011-07-03
2012-12-12
  • Per Larsson
    Per Larsson
    2011-07-03

    Hi,

    I've been trying for some time to get my UPS and battery status to show up in phpSysInfo (just upgraded to 3.0.11), however I get nothing about my UPS in the outputted web page. Not an error, not a warning, nothing.

    I'm using apcupsd 3.14.8 on Ubuntu 11.04 with a Smart-UPS 1500. apcaccess works fine, and port 3551 is opened by apcupsd. I can connect to it with for example telnet and there is no firewall blocking it.

    I've confgured phpsysInfo with the following lines and made sure they're not commented out:

    define('PSI_UPS_PROGRAM', 'Apcupsd');
    define('PSI_UPS_APCUPSD_LIST', '127.0.0.1:3551');

    I don't even know where to begin troubleshooting. Can anyone help me?

    Thanks in advance.

     
  • Turn on debugging.

     
  • Per Larsson
    Per Larsson
    2011-07-10

    Ok, I've enabled debugging with

    define('PSI_DEBUG', true);
    

    I can't find where it's outputted. Where would the debug output go?

     
  • Erkan
    Erkan
    2011-07-10

    Hi,

    You can see debug in the xml.php output:
    http://phpsysinfo.sourceforge.net/phpsysinfo/xml.php

    Or /var/log/apache2/access.log and error.log on the server.

    Regards,

     
  • Per Larsson
    Per Larsson
    2011-07-10

    Turns out it couldn't find apcaccess. Thank you very much for your help.

     
  • Alex Kroeze
    Alex Kroeze
    2011-08-12

    Same problem here. When i turn on debug i get an extra error in log.
    http://pastebin.com/ck1YK2AQ
    apcaccess does work when i try it manually in the command line

     
  • Erkan
    Erkan
    2011-08-14

    Hi, can you try this command:

    $> whereis apcaccess

    I think "apcaccess" is located in a different path, so you need to add it to: define('PSI_ADD_PATHS', '…');

    And maybe add change permission on the command with to allow other user (www-data) to execute apcaccess with root privilege. $> chmod +s apcaccess

    Regards

     
  • Alex Kroeze
    Alex Kroeze
    2011-08-14

    Thank you very much, I've tried to find apcaccess with the find command but didn't found something whit whereis I've found it in the /sbin/ directory. I've put the directory in the config file and everything is working as is should be.