search for: nut_debug_level

Displaying 13 results from an estimated 13 matches for "nut_debug_level".

2008 Jan 27
1
passing nut_debug_level from upsdrvctl to drivers
Is there any reason why we couldn't pass the -D flags (counted by nut_debug_level) from upsdrvctl to the individual drivers? It seems a little strange to suggest to users that they should start the drivers with upsdrvctl normally, but then start them by hand for debugging. (If we want to debug upsdrvctl itself, we could use another flag for that, instead of -D.) -- - Charles L...
2008 Jan 27
1
standardizing debug log levels [was: passing nut_debug_level from upsdrvctl to drivers]
...ising USB subsystem... TRACE: hid_init(): scanning for USB busses... TRACE: hid_init(): scanning for USB devices... NOTICE: hid_init(): successfully initialised HID library. The "trace" messages are one level lower than "notice", and are controlled by a variable similar to nut_debug_level. If we wanted to, we could print the debug level itself, and filter based on that after the fact. Maybe the -D flags could control what gets printed to the console, and if any -D flags are used, a debug log gets written. (We could standardize the filename to include the driver name and date/time,...
2016 Jul 11
0
Proposal for technique to stop a timer at any moment
...ommon.c --- nut-2.7.4.orig/common/common.c 2015-12-29 13:08:34.000000000 +0100 +++ nut-2.7.4.dev/common/common.c 2016-07-01 09:51:14.779883781 +0200 @@ -407,10 +407,25 @@ void upslogx(int priority, const char *f void upsdebug_with_errno(int level, const char *fmt, ...) { va_list va; - - if (nut_debug_level < level) - return; + /* Sysadmin may use "echo n > /etc/ups/NUT_DEBUG_LEVEL" to set debug level n. RP */ + char fn[SMALLBUF]; + FILE *fp; + int ndl; /* 0 through 4 */ + + snprintf(fn, sizeof(fn), "%s/NUT_DEBUG_LEVEL", confpath()); /* E.g. /etc/ups/NUT_DEBUG_LEVEL...
2011 Mar 05
19
[RFC apcsmart V3 00/18] apcsmart driver updates
Sorry for a bit longer delay than I anticipated, I was stuffed with the work. This is the next iteration of the patch adding some functionality to apcsmart driver, and relying on 'ignorelb' recently added. Follow up from previous thread: http://www.mail-archive.com/nut-upsdev at lists.alioth.debian.org/msg02331.html Main differences is that V3 is split into many small patches, so the
2011 Jan 25
1
[RFC] Updates to ACP smart driver
This patch introduces a handful of new options, I mentioned earlier in: http://www.mail-archive.com/nut-upsdev at lists.alioth.debian.org/msg02088.html See the large commit message in the follow-up for the details and rationale. I realize it's a bit larger diff - so if it's required I can split it into few smaller ones. Michal Soltys (1): APC smart driver update and new features.
2011 Feb 07
4
[PATCH/RFC v2 0/3] Updates to ACP smart driver
This is 2nd version of the earlier patch featuring a few new features and fixes to the apcsmart driver, following the remarks in: http://www.mail-archive.com/nut-upsdev at lists.alioth.debian.org/msg02294.html Major changes from v1: - handle battery.charge and battery.runtime checks at main.c level - handle "immutable but writable" conflict gracefully at driver level -
2008 Dec 24
1
Driver removal notification: al175
Hi Kirill, just to notify you that your al175 driver is being removed from the NUT tree, as of 2.4.0-pre1. if you wish to see it entering the tree again, please contact the Development mailing list to talk about it. Merry Christmas and happy New Year. Arnaud -- Linux / Unix Expert R&D - Eaton - http://www.eaton.com/mgeops Network UPS Tools (NUT) Project Leader -
2016 Jul 11
0
Proposal for technique to stop a timer at any moment
...psd.txt 2015-12-29 09:42:34.000000000 +0100 +++ nut-2.7.4.dev/docs/man/upsd.txt 2016-07-07 10:08:51.939354892 +0200 @@ -119,6 +119,16 @@ administrative functions like SET and IN controlled in linkman:upsd.users[5]. UPS definitions are found in linkman:ups.conf[5]. +The file <configpath>/NUT_DEBUG_LEVEL may be used to manage the debugging +level. The file content is a single integer which represents the number of +"-D" options which may be specified on the command line. If the file is +created, modified or removed while the upsd process is running, the effect is +immediate. It is not...
2016 Jul 01
0
Proposal for technique to stop a timer at any moment
...monitor an unreliable UPS. https://github.com/networkupstools/nut/issues/293 Debugging --------- I find it convenient to be able to turn on/up/down/off the debugging level without touching the upsd process. I do this by setting the required debugging depth in optional file <config-path>/NUT_DEBUG_LEVEL . I include the required patch to common.c - perhaps this technique will be useful to others. Testing ------- The proposed patches to 2.7.4 have been tested on openSUSE 13.1 Evergreen long term support with an Eaton ECO 1600 and a tired MGE Ellipse 1500. Programming style ----------------- 1...
2013 Nov 18
2
[PATCH] al175: updated driver, please restore it
...action > > > timeout, I'll be happy to rework the code to use what NUT provides. > > > > > > > Even in the updated driver, I see quite a couple of fprintf() lines. > > > > Although these are in most (all?) cases encased in a 'if > > > > (nut_debug_level > 0)', we have the upsdebug* functions for that. Do > > > > yourself (and your fellow developers) a favor and use those instead. > > > > > > > Another thing related to this is the XTRACE macro. This will only use a > > > > single (1) debug level t...
2011 Oct 03
2
patch: Replace many usleep and some sleep calls with nanosleep
...UPSDELAY, "%s", timer); ret = sdok(); @@ -867,7 +869,8 @@ static int sdcmd_ATn(int cnt) * silent (YMMV); */ ser_send_char(upsfd, APC_CMD_GRACEDOWN); - usleep(UPSDELAY); + delay.tv_sec = 0; delay.tv_nsec = UPSDELAY; + nanosleep(&delay, NULL); ser_flush_in(upsfd, IGNCHARS, nut_debug_level); return 0; @@ -880,7 +883,8 @@ static int sdcmd_K(int dummy) upsdebugx(1, "Issuing delayed poweroff"); ser_send_char(upsfd, APC_CMD_SHUTDOWN); - usleep(CMDLONGDELAY); + struct timespec delay = {CMDLONGDELS, CMDLONGDELNS}; + nanosleep(&delay, NULL); ser_send_char(upsfd, AP...
2015 Aug 20
6
APC BACK UPS 2200 model BZ2200BI-BR
Hi; I'm having some trouble to comunicate with my just bought (08/17/15) Ups. According to SOLIS(8): SUPPORTED HARDWARE This driver has been tested with : Solis 1000 VA Solis 1500 VA Solis 2000 VA Solis 3000 VA Back-UPS BZ1200-BR Back-UPS BZ2200BI-BR So solis is the one to go for. Here is my scenario: SW: nut-2.7.3 (compiled from ports) OS: FreeBSD
2007 Aug 23
1
[nut-commits] svn commit r1073 - in trunk: . drivers
...Process pending events (HID notifications on Interrupt pipe) */ > for (i = 0; i < evtCount; i++) { > > - if (HIDGetDataValue(udev, event[i], &value, 2) != 1) > + if (HIDGetDataValue(udev, event[i], &value, poll_interval) != 1) > continue; > > if (nut_debug_level >= 1) { > @@ -807,7 +812,7 @@ > > void upsdrv_initups(void) > { > - int i; > + int i, mode = MODE_OPEN; > #ifndef SHUT_MODE > /*! > * SHUT is only supported by MGE UPS SYSTEMS units > @@ -831,13 +836,13 @@ > regex_array[4] = getval("serial")...