Re: [Nut-upsuser] Old thread on belkin

2009-12-28 Thread Arjen de Korte

Citeren Gene Heskett gene.hesk...@gmail.com:


Just starting it with the fedora service command gets this:
[r...@coyote rules.d]# service ups start
/etc/sysconfig/ups: line 4: UPSD_OPTIONS: command not found
Starting UPS driver controller:[FAILED]
Starting upsd: [FAILED]
Starting UPS monitor (master): [FAILED]

UPSD_OPTIONS is empty in /etc/sysconfig/ups


We've have issues with the Fedora (and RedHat) scripts before. NUT  
doesn't use /etc/sysconfig/ups, this is something that your distro  
added. Chances are that this was written for an earlier version of NUT  
and since never changed. It's not needed either, since all information  
needed to startup the drivers, server and clients is in the NUT  
configuration files already. Could you try if running


/path/to/upsdrvctl start
/path/to/upsd
/path/to/upsmon

improves the situation?

For debugging purposes you shouldn't use the startup scripts from  
*any* distribution, because they will invariably direct the startup  
messages to /dev/null (it might already tell you what's wrong now).



And the log shows:
Dec 27 18:16:56 coyote upsd[21863]: listening on 127.0.0.1 port 3493
Dec 27 18:16:56 coyote upsd[21863]: Can't chdir to /var/run/nut: Permission
denied


This is the STATEPATH directory (which is compiled in) and should be  
writeable by the user 'upsd' is running as. It almost certainly isn't.


Best regards, Arjen
--
Please keep list traffic on the list


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


[Nut-upsuser] Megatec driver floods logs #2 mail notifications

2009-12-28 Thread Yury V. Zaytsev
Hi there!

I'm a n00b NUT user trying to get it running on RHEL5 and actually do
something useful for me. Few questions:

1) I want it to notify me by email on power loss and power back events.
I can't find any sample scripts for this purpose... Where shall I look
for them?

2) So far, I've backported the package from Fedora and got my Ablerex
running (previously used with Upsilon / Megatec on a Windows server).

The major problem so far is that it keeps flooding my logs just as
someone reported last year:

http://www.mail-archive.com/nut-upsuser@lists.alioth.debian.org/msg03762.html

Is there a way to somehow mute these messages?

upsc able...@localhost
battery.charge: 95.0
battery.voltage: 13.50
battery.voltage.nominal: 12.0
driver.name: megatec
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ttyS0
driver.version: 2.4.1
driver.version.internal: 1.6
input.frequency: 49.0
input.frequency.nominal: 50.0
input.voltage: 232.0
input.voltage.fault: 195.0
input.voltage.maximum: 233.0
input.voltage.minimum: 22.0
input.voltage.nominal: 230.0
output.voltage: 232.0
ups.beeper.status: disabled
ups.delay.shutdown: 0
ups.delay.start: 2
ups.load: 17.0
ups.mfr: -
ups.model: -- VS000361
ups.serial: unknown
ups.status: OL
ups.temperature: 30.0
ups.type: standby

Dec 28 13:02:46 calculon megatec[17799]: Communications with UPS lost: No 
status from UPS.
Dec 28 13:02:47 calculon megatec[17799]: Communications with UPS re-established
Dec 28 13:05:09 calculon megatec[17799]: Communications with UPS lost: No 
status from UPS.
Dec 28 13:05:09 calculon megatec[17799]: Communications with UPS re-established

Thanks!
 
-- 
Sincerely yours,
Yury V. Zaytsev


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


[Nut-upsuser] CyberPower Online Series

2009-12-28 Thread Tanstaafl
Hi,

Is anyone using nut with any of the CyberPower Online Series UPS'?

I'm looking specifically at the OL3000RMXL2U...

Thanks,

-- 

Best regards,

Charles

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Megatec driver floods logs #2 mail notifications

2009-12-28 Thread Yury V. Zaytsev
Hi!

On Mon, 2009-12-28 at 08:26 -0500, Justin Piszcz wrote:
 
 For no. 1:

I'm actually trying to make use of upssched to avoid notifications for
short outages like ~ 1 minute or so. So far I've added two lines:

# The timers, here 60 sec after the ONBATT (ups on battery) event
AT ONBATT * START-TIMER onbatt 60

# Cancel the countdown is power is back
AT ONLINE * CANCEL-TIMER onbatt

As far as I understand, my

CMDSCRIPT /mnt/data/scripts/ups-notifier

will get triggered with onbatt parameter if the outage lasts more than
60 seconds, but I would like it to be triggered if, say when the power
comes back online within a reasonable amount of time and the shutdown is
canceled to inform everybody that there's no need to rush to the lab.

Is there a way to achieve these two goals at the same time?

Thanks! 
 
-- 
Sincerely yours,
Yury V. Zaytsev


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Downloads are not available

2009-12-28 Thread Arnaud Quette
Hi there,

back from a week of vacation...

2009/12/26 Arjen de Korte nut+us...@de-korte.org:
 Citeren Yury V. Zaytsev y...@shurup.com:

 I know that for now I can rip the sources of some of the SRPMs floating
 around etc. but I guess this is something that is ought to be fixed
 ASAP.

 The sources are also still available through

    http://old.networkupstools.org/source.html

 I agree however that this should be fixed, since users by default are now
 directed to the new site.

right, sorry about that.
Eaton has decided to switch some of its webserver last week... bad idea!
I'm trying to restore the situation, but expect some more issues
during this week.

For the time being, the old website with its content (including
downloads) is still available at:
http://networkupstools.org
http://old.networkupstools.org

http://www.networkupstools.org points toward
http://new.networkupstools.org and doesn't honor the download section.
There are still a few changes needed, but the switch to this new
website is for very soon...

cheers,
Arnaud
-- 
Linux / Unix Expert RD - Eaton - http://www.eaton.com/mgeops
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] XPCC XVRT-1000 driver

2009-12-28 Thread Jeffrey B. Green
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Charles Lepple wrote:
 On Dec 27, 2009, at 2:28 PM, Jeffrey B. Green wrote:
 
 I'll be talking with a XPCC support person tomorrow, though I suspect
 he'll punt it back to me when it comes to my nut driver problem.
 
 I don't know anything about XPCC, but if you do get in touch with them,
 you could see if they suggest any third-party monitoring software, as a
 quick look around their website currently doesn't turn up a link to
 their recommended UPSMON tool.

The upsmon (and upsdisp) tools are provided in a tar file on a cd with
the ups. I'm not sure whether XPCC wrote them in-house or farmed them
out. However, they are fairly simple tools and not configurable beyond
the command line arguments specifying the serial line and polling times.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAks4xXkACgkQMfiP4rwHDZxGcQCeNEwyugH2StQsclbOORJ2Xa1e
ShcAniXcnQ+tZBoibldqOswhb/x6E5oy
=8a8K
-END PGP SIGNATURE-

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] XPCC XVRT-1000 driver

2009-12-28 Thread Jeffrey B. Green
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jeffrey B. Green wrote:
 However, they are fairly simple tools and not configurable beyond
 the command line arguments specifying the serial line and polling times.

Sorry, small correction. Not polling times, rather the breakout delay
time and the UPS shutdown delay time.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAks4x9gACgkQMfiP4rwHDZxHKgCgg/jGicmzMlg8/flXgyq1GMd9
1oUAnRxXypkhRLJm9ogxjqztDCuxbGsm
=adOH
-END PGP SIGNATURE-

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Old thread on belkin

2009-12-28 Thread Gene Heskett
On Monday 28 December 2009, Arjen de Korte wrote:
Citeren Gene Heskett gene.hesk...@gmail.com:
 Just starting it with the fedora service command gets this:
 [r...@coyote rules.d]# service ups start
 /etc/sysconfig/ups: line 4: UPSD_OPTIONS: command not found
 Starting UPS driver controller:[FAILED]
 Starting upsd: [FAILED]
 Starting UPS monitor (master): [FAILED]

 UPSD_OPTIONS is empty in /etc/sysconfig/ups

We've have issues with the Fedora (and RedHat) scripts before. NUT
doesn't use /etc/sysconfig/ups, this is something that your distro
added.
Nuked.

Chances are that this was written for an earlier version of NUT
and since never changed. It's not needed either, since all information
needed to startup the drivers, server and clients is in the NUT
configuration files already. Could you try if running

 /path/to/upsdrvctl start

As root, permission for /var/run/nut denied. chowned it gene:gene, get this:
[r...@coyote ups]# su gene -c upsdrvctl start
Network UPS Tools - UPS driver controller 2.2.2
Network UPS Tools: 0.29 USB communication driver - core 0.33 (2.2.2)

No matching HID UPS found
Driver failed to start (exit status=1)

No idea if that's an earlier or later message. No mesg in log for either.

 /path/to/upsd
 /path/to/upsmon

improves the situation?

For debugging purposes you shouldn't use the startup scripts from
*any* distribution, because they will invariably direct the startup
messages to /dev/null (it might already tell you what's wrong now).

I took the /dev/null junk out of the /etc/init.d/ups (start) section for the 
next attempts.


This is the STATEPATH directory (which is compiled in) and should be
writeable by the user 'upsd' is running as. It almost certainly isn't.

How does one determine what user its trying to run at?

A service ups start (as root) got me this on screen
[r...@coyote ups]# service ups start
Starting UPS monitor (slave):  [  OK  ]

And a bunch of error popups because it couldn't talk to my...@localhost
And this in the log:
Dec 28 09:48:03 coyote upsmon[25030]: UPS [my...@localhost]: connect failed: 
Connection failure: Connection refused

Repeated till I stop upsmon, same if I address it as my...@fqdn.

So I chmod-ed /var/run/nut to 0777 which should let anybody write the SOB.

[r...@coyote ups]# su gene -c upsdrvctl start
Network UPS Tools - UPS driver controller 2.2.2
Network UPS Tools: 0.29 USB communication driver - core 0.33 (2.2.2)

No matching HID UPS found
Driver failed to start (exit status=1)
[r...@coyote ups]# upsdrvctl start
Network UPS Tools - UPS driver controller 2.2.2
Network UPS Tools: 0.29 USB communication driver - core 0.33 (2.2.2)

Using subdriver: Belkin HID 0.11
Can't initialize data from HID UPS
Driver failed to start (exit status=1)
[r...@coyote ups]#

This headache is approaching the excedrin numbering system.
Best regards, Arjen

Thanks Arjen.  I'll do an strace on it once the morning coffee has kicked in.

-- 
Cheers, Gene
There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order.
-Ed Howdershelt (Author)

New Hampshire law forbids you to tap your feet, nod your head, or in
any way keep time to the music in a tavern, restaurant, or cafe.

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Old thread on belkin

2009-12-28 Thread Gene Heskett
On Monday 28 December 2009, Arjen de Korte wrote:
Citeren Gene Heskett gene.hesk...@gmail.com:
 Just starting it with the fedora service command gets this:
 [r...@coyote rules.d]# service ups start
 /etc/sysconfig/ups: line 4: UPSD_OPTIONS: command not found
 Starting UPS driver controller:[FAILED]
 Starting upsd: [FAILED]
 Starting UPS monitor (master): [FAILED]

 UPSD_OPTIONS is empty in /etc/sysconfig/ups

We've have issues with the Fedora (and RedHat) scripts before. NUT
doesn't use /etc/sysconfig/ups, this is something that your distro
added. Chances are that this was written for an earlier version of NUT
and since never changed. It's not needed either, since all information
needed to startup the drivers, server and clients is in the NUT
configuration files already. Could you try if running

 /path/to/upsdrvctl start
 /path/to/upsd
 /path/to/upsmon

improves the situation?

For debugging purposes you shouldn't use the startup scripts from
*any* distribution, because they will invariably direct the startup
messages to /dev/null (it might already tell you what's wrong now).

 And the log shows:
 Dec 27 18:16:56 coyote upsd[21863]: listening on 127.0.0.1 port 3493
 Dec 27 18:16:56 coyote upsd[21863]: Can't chdir to /var/run/nut:
 Permission denied

This is the STATEPATH directory (which is compiled in) and should be
writeable by the user 'upsd' is running as. It almost certainly isn't.

Best regards, Arjen

Ok, the strace output: wordwrap off

[r...@coyote ups]# strace  upsdrvctl start 
execve(/sbin/upsdrvctl, [upsdrvctl, start], [/* 56 vars */]) = 0
brk(0)  = 0x8073000   
access(/etc/ld.so.preload, R_OK)  = -1 ENOENT (No such file or directory)
open(/etc/ld.so.cache, O_RDONLY)  = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=177483, ...}) = 0
mmap2(NULL, 177483, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb78cf000
close(3)= 0
open(/lib/libc.so.6, O_RDONLY)= 3
read(3, \177elf\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\...@\310#e4\0\0\0..., 
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1809672, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xb78ce000
mmap2(0x45226000, 1521232, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 
0) = 0x45226000
mmap2(0x45394000, 12288, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16e) = 0x45394000
mmap2(0x45397000, 9808, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x45397000
close(3)= 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xb78cd000
set_thread_area({entry_number:-1 - 6, base_addr:0xb78cd6c0, limit:1048575, 
seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, 
useable:1}) 
= 0
mprotect(0x45394000, 8192, PROT_READ)   = 0
mprotect(0x45222000, 4096, PROT_READ)   = 0
munmap(0xb78cf000, 177483)  = 0
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xb78fa000
write(1, Network UPS Tools - UPS driver c..., 48Network UPS Tools - UPS 
driver controller 2.2.2
) = 48
brk(0)  = 0x8073000
brk(0x8094000)  = 0x8094000
open(/etc/ups/ups.conf, O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0640, st_size=3659, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xb78f9000
read(3, # Network UPS Tools: example ups..., 4096) = 3659
read(3, , 4096)   = 0
close(3)= 0
munmap(0xb78f9000, 4096)= 0
stat64(/sbin/usbhid-ups, {st_mode=S_IFREG|0755, st_size=114220, ...}) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, 
child_tidptr=0xb78cd708) = 25669
rt_sigaction(SIGALRM, {0x8049100, [], 0}, NULL, 8) = 0
alarm(45)   = 0
waitpid(25669, Network UPS Tools: 0.29 USB communication driver - core 0.33 
(2.2.2)

Using subdriver: Belkin HID 0.11
Can't initialize data from HID UPS
[{WIFEXITED(s)  WEXITSTATUS(s) == 1}], 0) = 25669
--- SIGCHLD (Child exited) @ 0 (0) ---
rt_sigaction(SIGALRM, {SIG_IGN, [ALRM], SA_RESTART}, {0x8049100, [], 0}, 8) = 0
alarm(0)= 44
write(2, Driver failed to start (exit sta..., 39Driver failed to start (exit 
status=1)
) = 39
exit_group(1)   = ?
[r...@coyote ups]#

Looks like we lose the strace function for the subdriver, Belkin. The data 
is flowing though, or is it, ttyUSB0 and ttyUSB1 are in use here, and the 
hiddev0 and hidraw0 devices have been nuked till the next time I unplug
and replug the cable.

Is this a situation where I'll have to crawl under the desk and do a 
momentary 

[Nut-upsuser] Make UPS switch the load on after power back

2009-12-28 Thread Yury V. Zaytsev
Hi!

I have finally set up NUT more or less the way I want it to work, but
after live testing, it turned out that the UPS (Ablerex VS000361,
serially connected using megatec driver) does not switch on the load
after the shutdown has been initiated  completed and power came back
on.

Is there any magic command that I'm missing that I have to issue to
instruct the unit to switch the load back on when power comes back?

Thanks!
 
-- 
Sincerely yours,
Yury V. Zaytsev


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Old thread on belkin

2009-12-28 Thread Gene Heskett
On Monday 28 December 2009, Gene Heskett wrote:
On Monday 28 December 2009, Arjen de Korte wrote:
Citeren Gene Heskett gene.hesk...@gmail.com:
 Just starting it with the fedora service command gets this:
 [r...@coyote rules.d]# service ups start
 /etc/sysconfig/ups: line 4: UPSD_OPTIONS: command not found
 Starting UPS driver controller:[FAILED]
 Starting upsd: [FAILED]
 Starting UPS monitor (master): [FAILED]

 UPSD_OPTIONS is empty in /etc/sysconfig/ups

We've have issues with the Fedora (and RedHat) scripts before. NUT
doesn't use /etc/sysconfig/ups, this is something that your distro
added. Chances are that this was written for an earlier version of NUT
and since never changed. It's not needed either, since all information
needed to startup the drivers, server and clients is in the NUT
configuration files already. Could you try if running

 /path/to/upsdrvctl start
 /path/to/upsd
 /path/to/upsmon

improves the situation?

For debugging purposes you shouldn't use the startup scripts from
*any* distribution, because they will invariably direct the startup
messages to /dev/null (it might already tell you what's wrong now).

 And the log shows:
 Dec 27 18:16:56 coyote upsd[21863]: listening on 127.0.0.1 port 3493
 Dec 27 18:16:56 coyote upsd[21863]: Can't chdir to /var/run/nut:
 Permission denied

This is the STATEPATH directory (which is compiled in) and should be
writeable by the user 'upsd' is running as. It almost certainly isn't.

Best regards, Arjen

Ok, the strace output: wordwrap off

[r...@coyote ups]# strace  upsdrvctl start
execve(/sbin/upsdrvctl, [upsdrvctl, start], [/* 56 vars */]) = 0
brk(0)  = 0x8073000
access(/etc/ld.so.preload, R_OK)  = -1 ENOENT (No such file or
 directory) open(/etc/ld.so.cache, O_RDONLY)  = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=177483, ...}) = 0
mmap2(NULL, 177483, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb78cf000
close(3)= 0
open(/lib/libc.so.6, O_RDONLY)= 3
read(3, \177elf\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\...@\310#e4\0\0\0...,
 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1809672, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
 0xb78ce000 mmap2(0x45226000, 1521232, PROT_READ|PROT_EXEC,
 MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x45226000 mmap2(0x45394000, 12288,
 PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16e) =
 0x45394000 mmap2(0x45397000, 9808, PROT_READ|PROT_WRITE,
 MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x45397000 close(3) 
   = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
 0xb78cd000 set_thread_area({entry_number:-1 - 6, base_addr:0xb78cd6c0,
 limit:1048575, seg_32bit:1, contents:0, read_exec_only:0,
 limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0x45394000, 8192, PROT_READ)   = 0
mprotect(0x45222000, 4096, PROT_READ)   = 0
munmap(0xb78cf000, 177483)  = 0
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
 0xb78fa000 write(1, Network UPS Tools - UPS driver c..., 48Network UPS
 Tools - UPS driver controller 2.2.2 ) = 48
brk(0)  = 0x8073000
brk(0x8094000)  = 0x8094000
open(/etc/ups/ups.conf, O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0640, st_size=3659, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
 0xb78f9000 read(3, # Network UPS Tools: example ups..., 4096) = 3659
read(3, , 4096)   = 0
close(3)= 0
munmap(0xb78f9000, 4096)= 0
stat64(/sbin/usbhid-ups, {st_mode=S_IFREG|0755, st_size=114220, ...}) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
 child_tidptr=0xb78cd708) = 25669 rt_sigaction(SIGALRM, {0x8049100, [], 0},
 NULL, 8) = 0
alarm(45)   = 0
waitpid(25669, Network UPS Tools: 0.29 USB communication driver - core 0.33
 (2.2.2)

Using subdriver: Belkin HID 0.11
Can't initialize data from HID UPS
[{WIFEXITED(s)  WEXITSTATUS(s) == 1}], 0) = 25669
--- SIGCHLD (Child exited) @ 0 (0) ---
rt_sigaction(SIGALRM, {SIG_IGN, [ALRM], SA_RESTART}, {0x8049100, [], 0}, 8)
 = 0 alarm(0)= 44
write(2, Driver failed to start (exit sta..., 39Driver failed to start
 (exit status=1) ) = 39
exit_group(1)   = ?
[r...@coyote ups]#

Looks like we lose the strace function for the subdriver, Belkin. The data
is flowing though, or is it, ttyUSB0 and ttyUSB1 are in use here, and the
hiddev0 and hidraw0 devices have been nuked till the next time I unplug
and replug the cable.

Is this a situation where I'll have to crawl under the desk and do a
momentary disconnect for every 

Re: [Nut-upsuser] XPCC XVRT-1000 driver

2009-12-28 Thread Kjell Claesson
Hi Jeff,
 Jeffrey B. Green wrote:
  However, they are fairly simple tools and not configurable beyond
  the command line arguments specifying the serial line and polling times.
 
 Sorry, small correction. Not polling times, rather the breakout delay
 time and the UPS shutdown delay time.

This sounds like the powercom program. So I think you need the powercom 
driver.

Problem is that I don't think we have the papers on the protocol.

What you can do is starting the UPSMON program, then cat the port.
Ex:
cat /dev/ttyS0

If it returns something like this it is powercom.
(199.0 199.0 235.0 019 50.0 27.8 37.8 00101000

Then if you can check the speed on the port. The powercom driver is using 
1200 b/s.

/Kjell

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Megatec driver floods logs #2 mail notifications

2009-12-28 Thread Yury V. Zaytsev
Hi!

On Mon, 2009-12-28 at 20:54 +0100, Arjen de Korte wrote:

 I don't understand what you mean with first and second goal. Please  
 make a timeline with events and what you want to happen at each point  
 in time.

OK, I will try to put it the other way around :-) (let's assume that the
UPS battery is fully charged for clarity)

1) If the power goes down but then comes back within 1-3 minutes do
nothing (don't send emails etc.)

2) If the power goes down for longer then 3 minutes send a power down
e-mail.

3) If the power comes back send a power back e-mail and cancel shutdown.

4) If the power does not come back and the battery is drained (in my
tests in can last for ~15 minutes) shutdown the machine and hope for the
best.

So far I was not able to achieve this by simple means. So I settled with
the following setup:

# The timers, here 3 min after the ONBATT (ups on battery) event
AT ONBATT * START-TIMER linedown 180

# Cancel the countdown is power is back
AT ONLINE * CANCEL-TIMER linedown

AT ONLINE * EXECUTE lineup

It sends a power back e-mail no matter what, but probably we can live
with it.

Thanks!
 
-- 
Sincerely yours,
Yury V. Zaytsev


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Megatec driver floods logs #2 mail notifications

2009-12-28 Thread Arjen de Korte

Citeren Yury V. Zaytsev y...@shurup.com:

[...]


It sends a power back e-mail no matter what, but probably we can live
with it.


This is trivial to script. Create an empty file somewhere your  
CMDSCRIPT has write access to when the 'linedown' timer elapses (ie,  
when you send the warning mail). In your 'lineup' event check for the  
presence of this file. If it is there, you need to send a message that  
the power is back and remove the file. You can improve this above, by  
also checking the age of the file (to prevent triggering on stale  
files that are accidentally left behind).


Best regards, Arjen
--
Please keep list traffic on the list


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Megatec driver floods logs #2 mail notifications

2009-12-28 Thread Yury V. Zaytsev
On Mon, 2009-12-28 at 22:02 +0100, Arjen de Korte wrote:

 This is trivial to script. Create an empty file somewhere your  
 CMDSCRIPT has write access to when the 'linedown' timer elapses (ie,  
 when you send the warning mail). In your 'lineup' event check for the  
 presence of this file. If it is there, you need to send a message that  
 the power is back and remove the file. You can improve this above, by  
 also checking the age of the file (to prevent triggering on stale  
 files that are accidentally left behind).

Hi!

Thanks for the ideas! Please find my implementation attached. Hopefully
it will be of use to someone... at least now it's googleable :-)
 
-- 
Sincerely yours,
Yury V. Zaytsev


ups-notifier
Description: application/shellscript
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] XPCC XVRT-1000 driver

2009-12-28 Thread Jeffrey B. Green
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Kjell Claesson wrote:
 Hi Jeff,
 Jeffrey B. Green wrote:
 However, they are fairly simple tools and not configurable beyond
 the command line arguments specifying the serial line and polling times.
 Sorry, small correction. Not polling times, rather the breakout delay
 time and the UPS shutdown delay time.
 
 This sounds like the powercom program. So I think you need the powercom 
 driver.
 
 Problem is that I don't think we have the papers on the protocol.
 
 What you can do is starting the UPSMON program, then cat the port.
 Ex:
 cat /dev/ttyS0
 
 If it returns something like this it is powercom.
 (199.0 199.0 235.0 019 50.0 27.8 37.8 00101000
 
 Then if you can check the speed on the port. The powercom driver is using 
 1200 b/s.

I tried a slight variant of what you suggested above (after starting
upsmon), e.g.

while true
do
cat /dev/ttyS0 | od -xc
sleep 1
done  ttyS0.out 

Letting it run for awhile, I get:

% cat ttyS0.out
000 5130   7353  09f4 7ed3 507e
  0   Q  \0  \0  \0  \0   S   s  \0  \0 364  \t 323   ~   ~   P
020 5130   7353  09f4 7ed3 517e
  0   Q  \0  \0  \0  \0   S   s  \0  \0 364  \t 323   ~   ~   Q
040 5030   7353  09f4 7ed3 507e
  0   P  \0  \0  \0  \0   S   s  \0  \0 364  \t 323   ~   ~   P
060 5030   7353  09f4 7dd3 507d
  0   P  \0  \0  \0  \0   S   s  \0  \0 364  \t 323   }   }   P
100 5030   7353  00f4
  0   P  \0  \0  \0  \0   S   s  \0  \0 364  \0
113
000
000 7353  00f4
  S   s  \0  \0 364  \0
005
000
000 7353  00f4
  S   s  \0  \0 364  \0
[...more of the same...]
005
000
000 7353  00f4
  S   s  \0  \0 364  \0
005
000
000 7353 
  S   s  \0  \0
004
000 00f4
364  \0
001
000
000 7353  00f4
  S   s  \0  \0 364  \0
[...more of the same...]
005
000
000 7353  00f4
  S   s  \0  \0 364  \0
005
000
000 7353 
  S   s  \0  \0
003
000 f400
 \0 364
002
000
000 7353  00f4
  S   s  \0  \0 364  \0
005
000
000 7353  00f4
  S   s  \0  \0 364  \0
005
000
(END)

The powercom driver in nut doesn't seem to work at all even though
upsmon starts up with the message:

Copyright(c) Powercom Co., Ltd., all rights reserved.
UPSMON V0.91a program start!
UPSMON: The UPS serial port use /dev/ttyS0.
UPSMON: Ac Fail count down is seted 300 secs.
UPSMON: UPS shutdown delay time is seted 1 mins and 0 secs.
Check UPS type.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAks5PtwACgkQMfiP4rwHDZzTxgCcCFX/Tb7MnU2m4a0qH1b+F2uQ
fwYAniadpg0HuQmdHOnfglEWI24Vvb2l
=TBoo
-END PGP SIGNATURE-

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] XPCC XVRT-1000 driver

2009-12-28 Thread Jeffrey B. Green
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Kjell Claesson wrote:
 
 Then if you can check the speed on the port. The powercom driver is using 
 1200 b/s.

% stty -F /dev/ttyS0
speed 1200 baud; line = 0;
min = 0; time = 0;
ignbrk -brkint -icrnl -imaxbel
- -opost -onlcr
- -isig -icanon -echo -echoe -echok -echoctl -echoke
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAks5QZ4ACgkQMfiP4rwHDZz+IACfach/8gP644yOzu6vy3kZ03RF
NHUAniqK3s0EkMa8ET8yUgn30mvfRgtC
=uGx2
-END PGP SIGNATURE-

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser