Re: [Server-devel] Database error troubleshooting

2012-05-10 Thread James Cameron
I remain ignorant of how to solve this problem, however I have a
random suggestion based on your observation:

On Fri, May 11, 2012 at 11:38:07AM +1100, David Leeming wrote:
> service postgresql status  - gives "postmaster is stopped"

Then try

service postgresql start

then check again with

service postgresql status

and if you no longer see "postmaster is stopped", check if the problem
on an XO persists, and if so, check postgresql status again and then

service httpd restart

--

But this is blind prodding without understanding the real cause of the
problem, sorry.  I have never used XS.

-- 
James Cameron
http://quozl.linux.org.au/
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Database error troubleshooting

2012-05-10 Thread David Leeming
More on this from my remote XO Champion in PNG 

Reminder: 
The error is : "Error: Database connection failed" as viewed in a connected
XO when they try to access the Moodle home page (local schoolserver link in
Browse)

Rebooting does not help. We already established disk space is OK. It's a
default 0.6 installation.

service postgresql status  - gives "postmaster is stopped"

service httpd restart - stops and starts up OK 

it pings the FQDN and the shortcut schoolserver OK on the XS and an XO using
Terminal.

Any help with this appreciated. It is difficult to have to reinstall it, as
no-one there has the skills.

David Leeming
Solomon Islands Rural Link 
www.rurallink.com.sb

-Original Message-
From: qu...@us.netrek.org [mailto:qu...@us.netrek.org] On Behalf Of James
Cameron
Sent: Wednesday, 9 May 2012 6:13 p.m.
To: David Leeming
Cc: 'Jerry Vonau'; 'XS Devel'
Subject: Re: [Server-devel] Database error troubleshooting

Have you tried rebooting the server?

The reason that I ask, is that I imagine if the Unix domain socket was
missing due to an accident, rebooting would start the database server
component again and create the Unix domain socket.

But I'm really not sure what other conditions might lead to the same
symptom.

-- 
James Cameron
http://quozl.linux.org.au/



___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] smooth shutdown for 12V-DC powered XS

2012-05-10 Thread Kévin Raymond
>
> Yes, nice aren't they?  I would not use Arduino where power was
> critical.  I had assumed that since a server was involved, one more
> device wouldn't stretch the power budget that far, especially given
> the benefit that voltage monitoring brings.

Oh yes, we will have a fitPC2 and a dreamplug (not sure, this one
could be merged on the XS if it has a WIFI AP).
It is just to design something best.

>> I still think that building our own board could be better as it will
>> be smaller and more robust (no unuseful I/O, no wasted components???)
>
> If you wish to lower cost and size, and do not need a log of voltages,
> then consider avoiding a microcontroller altogether; use a comparator,
> a reference voltage, generating a "voltage is low" output, that can
> then be fed into a serial port modem control pin, or drive a relay
> that briefly presses the power button on the server.

Yep that was my original plan, but already designed the backup plan.
I'll see if we have an analog input available.
Oh Xavier, I see that the XS has only one mini-DVI output display… Do
we have an adapter? (only for debug, of course).

>> >
>> > I suggest a 100k potentiometer with a 1uF capacitor.
>>
>> I would prefer to choose only resistances, not potentiometer, as
>> people won't try to change settings! (And the threshold would be
>> updated on the host software).
>
> In that case, I recommend a three-fold divider, so that 15V is
> translated to 5V.  50k resistor to ground, 100k resistor to input
> voltage, common to analog input.
>
> I would use a potentiometer, then glue it down, or cover it up.

Ah ah, yes.


>> I need to catch the right tty port, and be sure to handle
>> connection/reconnection???
>
> My point about using /dev/serial/by-path is that you don't need to
> worry too much ... just label the port as dedicated to that purpose.

Sure


-- 
Kévin Raymond
(shaiton)
GPG-Key: A5BCB3A2
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] smooth shutdown for 12V-DC powered XS

2012-05-10 Thread James Cameron
On Thu, May 10, 2012 at 10:20:57AM +0200, K??vin Raymond wrote:
> >
> > It might not be necessary to calibrate, if the raw value is sent to
> > the computer, the computer software can be calibrated instead.
> >
> > It is still be necessary to ensure the values are within the range of
> > the analog to digital converter. ??If you only see 1023, the voltage is
> > out of range.
> 
> It's exactly what I meant, I haven't checked yet but the input should
> be on the range 0-5V, and we need to define the average threshold in
> order to get an accurate measure.
> I'll see with Xavier about the power expected values.

If you only need to detect undervoltage, you can set the maximum much
lower, and wait for the sample to fall below 1023.

If you also want to provide a log of voltages, then you must set the
maximum based on the expected voltage under full charge current.

A log of voltages is very useful for analysis and history.

Using the first method, each bit of the sample has a smaller voltage
value.

> 
> >
> >> I don't really know Arduino, neither how to put the board asleep, it
> >> could consume less???
> >
> > avr/sleep.h
> >
> > See also
> > http://www.arduino.cc/playground/Learning/ArduinoSleepCode
> > http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?action=print;num=1289769139
> > http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1256298397
> > http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286856144
> >
> > However, you face an important problem, which is how to wake from
> > sleep. ??You might configure it to wake on serial input, and have the
> > computer software wake the arduino to take a reading. ??I did that a
> > few weeks ago with a fridge power monitor.
> >
> > You might still have power to the USB chip, U4.
> 
> What, there is no internal timer, to awake it?

The timers are in use by the Arduino library, if I recall correctly.
Please do read up about it.  There is very likely a way to wake with
timer interrupt, but with extra programming.

> Ok, I'll dig around this.
> PICs only consume few uAmps when sleeping???

Yes, nice aren't they?  I would not use Arduino where power was
critical.  I had assumed that since a server was involved, one more
device wouldn't stretch the power budget that far, especially given
the benefit that voltage monitoring brings.

> I still think that building our own board could be better as it will
> be smaller and more robust (no unuseful I/O, no wasted components???)

If you wish to lower cost and size, and do not need a log of voltages,
then consider avoiding a microcontroller altogether; use a comparator,
a reference voltage, generating a "voltage is low" output, that can
then be fed into a serial port modem control pin, or drive a relay
that briefly presses the power button on the server.

> >
> >> At the analog input I just have a voltage divider (passive is best,
> >> but more current is drawn???).
> >
> > The current drawn by a voltage divider is related by ohms law to the
> > total resistance of the divider, from top to bottom.
> >
> > Increasing the resistance has a bad side effect of increasing the
> > noise on the reading.
> >
> > Adding a capacitor from the centre of the divider to ground will
> > decrease the noise. ??But too large a capacitor will slow the response
> > to rapid changes.
> 
> Yep I know, thanks
> 
> >
> > I suggest a 100k potentiometer with a 1uF capacitor.
> 
> I would prefer to choose only resistances, not potentiometer, as
> people won't try to change settings! (And the threshold would be
> updated on the host software).

In that case, I recommend a three-fold divider, so that 15V is
translated to 5V.  50k resistor to ground, 100k resistor to input
voltage, common to analog input.

I would use a potentiometer, then glue it down, or cover it up.

> >
> > C? ??I guess that has the lowest power cost. ??I have used Python, or
> > Bash. ??Fast to develop.
> >
> 
> Sure, I've already done something similar in bash and perl, but this
> time I wanted to do it properly with system libs :).
> This to have only one code and not hand made udev script calling the
> monitoring one.
> What is really ugly with Arduino is the USB management through the
> ftdsio chip, we can't choose the VID/PID???

I agree.  An Arduino Uno is a bit better, as it uses a USB Atmel
processor instead.  It should be possible to change the VID/PID.

Otherwise, use a USB PIC.

> I need to catch the right tty port, and be sure to handle
> connection/reconnection???

My point about using /dev/serial/by-path is that you don't need to
worry too much ... just label the port as dedicated to that purpose.

> Oh, I know how to do it with bash and udev, but a single binary would fit 
> best.
> 
> 
> Cheers,
> 
> 
> -- 
> K??vin Raymond
> (shaiton)
> GPG-Key: A5BCB3A2

-- 
James Cameron
http://quozl.linux.org.au/
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel