X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fapcups.c;h=174febe45f5a5346124d7ad97ec83890cc964bda;hb=57d32cdea9ed71a34cfdf62e8b0050749486319e;hp=a4aa34df7e29112a68070726bb0539a822ee7a60;hpb=f0c44c295d16ab49ba6e7e36d8ae9aae78e460f4;p=collectd.git diff --git a/src/apcups.c b/src/apcups.c index a4aa34df..174febe4 100644 --- a/src/apcups.c +++ b/src/apcups.c @@ -1,9 +1,11 @@ /* * collectd - src/apcups.c + * Copyright (C) 2007 Florian octo Forster * Copyright (C) 2006 Anthony Gialluca * Copyright (C) 2000-2004 Kern Sibbald * Copyright (C) 1996-99 Andre M. Hedrick * + * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General * Public License as published by the Free Software Foundation. @@ -134,7 +136,7 @@ static int net_open (char *host, char *service, int port) if (status != 0) { char errbuf[1024]; - DEBUG ("getaddrinfo failed: %s", + INFO ("getaddrinfo failed: %s", (status == EAI_SYSTEM) ? sstrerror (errno, errbuf, sizeof (errbuf)) : gai_strerror (status)); @@ -165,7 +167,7 @@ static int net_open (char *host, char *service, int port) if (status != 0) /* `connect(2)' failed */ { char errbuf[1024]; - DEBUG ("connect failed: %s", + INFO ("connect failed: %s", sstrerror (errno, errbuf, sizeof (errbuf))); close (sd); return (-1); @@ -391,7 +393,7 @@ static void apc_submit (struct apc_detail_s *apcups_detail) apc_submit_generic ("voltage", "output", apcups_detail->outputv); apc_submit_generic ("voltage", "battery", apcups_detail->battv); apc_submit_generic ("charge", "", apcups_detail->bcharge); - apc_submit_generic ("percent", "charge", apcups_detail->loadpct); + apc_submit_generic ("percent", "load", apcups_detail->loadpct); apc_submit_generic ("timeleft", "", apcups_detail->timeleft); apc_submit_generic ("temperature", "", apcups_detail->itemp); apc_submit_generic ("frequency", "input", apcups_detail->linefreq);