I've got the power !!
Par Fred le lundi 28 mars 2011, 17:01 - Système et réseau - Lien permanent
For an english translation, look there
Non, je suis pas devenu Fred, Tout puissant et heureusement, ce serait un beau bordel :D
Dans le cadre d'activités associatives (cf. ce billet), j'ai reçu en même temps que le serveur, un superbe onduleur qu'il a bien fallu finir par configurer.
Au début, soyons francs, cela ne m'intéressait pas trop de configurer la bête sur l'OS du Bien surtout après avoir vu que les différents outils pour administrer la chose semblaient être en Java[1].
Après avoir configuré le dit serveur pour y accéder de la maison[2] et branché l'onduleur via le câble USB fourni, je me suis mis en quête de le faire fonctionner.
Une petite recherche sur Internet et je trouve qu'il existe un petit moniteur de charge sous FreeBSD qui se nomme Nut qui se trouve être hébergé par Eaton... Ce qui est de bon augure quand on cherche à faire fonctionner un onduleur Eaton Ellipse ASR750
Un rapide tour sur la liste des matériels compatibles est une formalité et confirme que cela va bien se passer.
J'installe donc Nut via les classiques :
root@rcjserveur : ~> cd /usr/ports/sysutils/nut/ && make install clean
Le bébé se présente bien.
La configuration ne pose pas trop de problème même si j'ai du adapter ça :
Pour ups.conf, on reste simple :
[eaton] driver = usbhid-ups port = auto desc = "EATON UPS"
hosts.conf
# MONITOR eaton@localhost "UPS Eaton Ellipse" # MONITOR su2200@10.64.1.1 "Finance department" # MONITOR matrix@shs-server.example.edu "Sierra High School data room #1"
Pour upsd.users
Vous repasserez pour celui-là, ça donne les mots de passe de connexion !! Y a pas écrit pidgeon !!
Dans upsmon.conf
... MONITOR eaton@localhost 1 mon_user mon_mot_de_passe master ... SHUTDOWNCMD "/sbin/shutdown -p +0"
Tout semblait rouler comme sur des roulettes mais...
Le principal problème est venu des droits sur l'USB comme prévu. En effet, à la connexion ou au démarrage du système, les droits sont pour le moins génériques
.
Heureusement, FreeBSD est là pour me sauver et propose une solution sympa en la personne de ''devd'' et de sa configuration nommée de façon étonnante ''devd.conf''. Je trouvais cette solution plus générique qu'avec devfs.
attach 100 { match "vendor" "0x0463"; match "product" "0xffff"; action "/usr/sbin/chown -R -L uucp:uucp /dev/$device-name"; };
Les valeurs n'ont bien sûr pas été choisies au hasard, un petit coup de ''usbconfig''
root@rcjserveur : ~> usbconfig -u 4 -a 2 dump_device_desc ugen4.2: <ELLIPSE EATON> at usbus4, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0110 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0008 idVendor = 0x0463 idProduct = 0xffff bcdDevice = 0x0001 iManufacturer = 0x0001 <EATON> iProduct = 0x0002 <ELLIPSE> iSerialNumber = 0x0004 <BDCK520CF> bNumConfigurations = 0x0001
Les tests ont été très simples. J'ai juste vérifié que je pouvais voir la charge de la machine en me disant que pour le script d'auto-extinction, je verrai ça plus tard.
Cela s'est très bien vérifié puisque le disjoncteur est tombé un vendredi soir et n'a été remis que le lundi suivant. En recherchant dans les journaux, j'ai pu trouver mon Saint-Graal :
Mar 11 17:28:35 RCJServeur upsmon[32074]: UPS eaton@localhost on battery ... Mar 11 17:42:16 RCJServeur upsmon[32074]: UPS eaton@localhost battery is low Mar 11 17:42:16 RCJServeur upsmon[32074]: Executing automatic power-fail shutdown Mar 11 17:42:16 RCJServeur upsmon[32074]: Auto logout and shutdown proceeding Mar 11 17:42:21 RCJServeur shutdown: power-down by fred: Mar 11 17:42:23 RCJServeur upsd[32047]: mainloop: Interrupted system call
Et zou, le serveur s'est bien éteint correctement quand l'onduleur a commencé à être court en jus. Well done Fred, you've got the power !!!
A ma grande surprise, le serveur semble par contre s'être rallumé directement au retour du courant alors que je n'ai rien configuré pour... Bon bah, tant mieux, je peux dormir sur mes deux oreilles :D
Commentaires
It's awesome designed for me to have a website, which is beneficial in support of
my knowledge. thanks admin
C'est généralement ce que je cherchais, merci beaucoup.
Jetez un coup d'oeil ici: Une partie de cartes
Hey There. I found your blog using msn. This is a really well written article.
I will be sure to bookmark it and return to read more
of your useful information. Thanks for the post. I
will certainly return.
I love your blog.. very nice colors & theme. Did you design this website
yourself or did you hire someone to do it for you? Plz reply as I'm looking to create my own blog and would like to know where u got this from.
cheers
What's up every one, here every person is
sharing such experience,thus it's good to read this website, and
I used to pay a quick visit this web site everyday.
You're so interesting! I don't suppose I have read something like that before.
So nice to find somebody with some unique thoughts on this subject.
Seriously.. thank you for starting this up.
This web site is something that is required on the internet,
someone with a little originality!
Have you ever considered creating an e-book or guest authoring on other
websites? I have a blog based upon on the same topics you
discuss and would love to have you share some stories/information. I
know my viewers would enjoy your work. If you are
even remotely interested, feel free to shoot me an e-mail.
Heya i am for the first time here. I came across this board and I find It really useful & it
helped me out much. I hope to give something back and aid others like you helped me.
You are so interesting! I do not believe I've read through anything like
that before. So wonderful to find somebody with some unique
thoughts on this topic. Really.. thank you for starting this
up. This website is one thing that's needed on the internet, someone with some
originality!
Good answer back in return of this question with genuine arguments
and describing the whole thing concerning that.
Howdy great blog! Does running a blog like this require
a large amount of work? I've virtually no knowledge of coding
but I was hoping to start my own blog soon. Anyways, if you have any recommendations or
tips for new blog owners please share. I know
this is off subject however I simply had to ask.
Kudos!
What's up, after reading this awesome article i am as well glad to share my familiarity here with friends.
I was suggested this website by my cousin. I am not sure
whether this post is written by him as no one else know such detailed
about my problem. You are amazing! Thanks!
Can I just say what a comfort to discover someone that actually understands what they are discussing on the internet.
You definitely understand how to bring a problem to light
and make it important. A lot more people have to read this and
understand this side of the story. I can't believe you are
not more popular because you definitely possess
the gift.
Excellent pieces. Keep writing such kind of information on your page.
Im really impressed by it.
Hello there, You've performed a great job.
I'll certainly digg it and individually recommend to my friends.
I am sure they'll be benefited from this site.
Excellent article. I'm experiencing a few of
these issues as well..
Wonderful beat ! I would like to apprentice whilst you amend your web site, how could i subscribe for
a blog site? The account helped me a acceptable deal.
I were a little bit familiar of this your broadcast provided
bright clear idea
This article provides clear idea in favor of the new people of blogging, that actually how to do running a blog.
I'm impressed, I have to admit. Rarely do I come across a blog that's both
equally educative and engaging, and let me tell you,
you've hit the nail on the head. The problem is something which not enough men and women are speaking
intelligently about. I am very happy I stumbled across this
in my search for something relating to this.
I am actually pleased to read this webpage posts which consists of
plenty of valuable data, thanks for providing these kinds of statistics.
If you are going for best contents like me, just pay a visit this web page all the time since it offers quality
contents, thanks
After exploring a few of the blog posts on your website, I
truly like your technique of writing a blog. I saved it to my
bookmark website list and will be checking back in the
near future. Take a look at my website as well and let me know how
you feel.
I do not know if it's just me or if perhaps everybody else experiencing problems with your blog.
It looks like some of the text in your posts are running off the screen. Can somebody else please provide feedback and let me know if this is happening to them too?
This might be a problem with my internet browser because I've had this happen previously.
Kudos
Right now it sounds like Movable Type is the top blogging platform available right now.
(from what I've read) Is that what you are using on your blog?
What's up, I want to subscribe for this weblog to take newest updates, therefore where can i do it
please help out.
Great post! We will be linking to this great post on our site.
Keep up the good writing.
This site definitely has all the info I wanted concerning
this subject and didn't know who to ask.
I'm really loving the theme/design of your blog.
Do you ever run into any web browser compatibility problems?
A number of my blog audience have complained about my blog not operating correctly in Explorer but looks
great in Safari. Do you have any solutions to help
fix this problem?
I was very pleased to find this website. I want to to thank you for ones
time for this particularly fantastic read!! I definitely liked every bit of it
and I have you book marked to check out new things on your blog.
Why users still make use of to read news papers when in this technological globe the
whole thing is available on web?
For latest information you have to pay a quick visit the web
and on internet I found this web page as
a best website for most recent updates.
I got this site from my pal who told me regarding this site and now this
time I am browsing this web page and reading very informative articles at this time.
You're so interesting! I don't suppose I've truly read anything like that
before. So good to find someone with some unique thoughts on this subject.
Really.. many thanks for starting this up. This website is something that is required on the
internet, someone with a little originality!
Hello Dear, are you in fact visiting this web site daily, if so after that
you will definitely get fastidious knowledge.
Great goods from you, man. I have understand your stuff previous to
and you're just extremely fantastic. I actually like what
you've acquired here, certainly like what you're
saying and the way in which you say it. You make it enjoyable and you still take
care of to keep it wise. I can not wait to read much more from you.
This is actually a terrific web site.
Asking questions are genuinely nice thing if you are not understanding
anything completely, except this paragraph offers good understanding even.
You can certainly see your skills within the work you write.
The arena hopes for more passionate writers such as
you who aren't afraid to say how they believe. Always go after your heart.
At this time I am ready to do my breakfast, once having my breakfast coming again to read additional news.
I enjoy, cause I discovered exactly what I was taking a look for.
You have ended my 4 day lengthy hunt! God Bless you man. Have
a great day. Bye
Tremendous things here. I am very satisfied to look your post.
Thank you a lot and I'm taking a look ahead to contact you.
Will you please drop me a mail?
Hi there, this weekend is nice for me, for the reason that this point in time i am reading this impressive
informative post here at my home.
When someone writes an post he/she maintains the thought of
a user in his/her mind that how a user can know it. So that's
why this post is outstdanding. Thanks!
Hello, its pleasant post concerning media
print, we all be familiar with media is a impressive source of data.
whoah this blog is magnificent i really like reading your articles.
Stay up the good work! You recognize, lots of persons are looking around for this information,
you can help them greatly.
I am regular visitor, how are you everybody? This piece of writing posted at
this web site is truly good.
Really no matter if someone doesn't know after that its up to
other people that they will help, so here it happens.
Hmm it appears like your website ate my first comment (it was extremely long) so I
guess I'll just sum it up what I wrote and say, I'm thoroughly enjoying
your blog. I as well am an aspiring blog blogger but I'm still new to
the whole thing. Do you have any tips and hints for rookie blog writers?
I'd certainly appreciate it.
Hey there, You have done a great job. I'll certainly digg it and personally
recommend to my friends. I'm sure they will be benefited from this site.
It's an remarkable post designed for all the
online visitors; they will obtain benefit from it I am sure.
I'm very happy to discover this web site. I want to to thank you for your time for this wonderful read!!
I definitely savored every part of it and i also have you saved to fav to look at
new information in your web site.
It's an remarkable piece of writing in support of all the online people; they will
obtain advantage from it I am sure.
Thanks , I've recently been looking for info approximately this subject for a while and
yours is the greatest I have discovered so far.
However, what in regards to the conclusion? Are you positive about the supply?
You should be a part of a contest for one of the best sites online.
I'm going to recommend this website!
continuously i used to read smaller articles that also clear their motive, and that is also happening with
this post which I am reading at this time.
I do believe all of the concepts you've introduced in your post.
They're very convincing and can certainly work.
Still, the posts are too brief for starters. May just you
please extend them a little from next time? Thank you
for the post.
First off I would like to say superb blog! I had a quick question in which I'd
like to ask if you do not mind. I was interested to find out how you center yourself and
clear your head prior to writing. I've had trouble
clearing my mind in getting my thoughts out. I do take pleasure in writing however it just seems like the first 10 to 15 minutes are wasted simply just trying to
figure out how to begin. Any suggestions or tips?
Appreciate it!
Currently it seems like Wordpress is the preferred blogging platform available right now.
(from what I've read) Is that what you are using on your blog?
Pretty! This has been an extremely wonderful post.
Thanks for providing these details.
Tremendous issues here. I am very satisfied to peer your post.
Thanks a lot and I am taking a look ahead to contact you.
Will you please drop me a e-mail?
Awesome things here. I'm very glad to peer your post.
Thank you a lot and I'm taking a look forward to touch you.
Will you kindly drop me a mail?
It's going to be end of mine day, except before finish
I am reading this enormous paragraph to increase my experience.
Attractive component of content. I just stumbled upon your
site and in accession capital to claim that I get in fact loved account
your blog posts. Any way I'll be subscribing for your feeds or even I achievement you get admission to consistently rapidly.
Excellent way of telling, and nice paragraph to get information concerning my
presentation topic, which i am going to present in institution of
higher education.
My brother suggested I would possibly like
this website. He was totally right. This put up truly made my day.
You cann't believe simply how much time I had spent for this information!
Thank you!
This site definitely has all of the information and facts I wanted about this subject and didn't know
who to ask.
Quality posts is the key to attract the people to visit the web
page, that's what this site is providing.
Thanks for sharing your info. I really appreciate your efforts and I will be waiting
for your next post thanks once again.
Valuable information. Lucky me I found your site unintentionally, and I am stunned why this twist
of fate didn't happened earlier! I bookmarked it.
It's genuinely very complicated in this active life to listen news on Television, therefore I just use web for
that purpose, and take the hottest news.
I go to see each day a few blogs and information sites to read content, except this blog offers quality
based writing.
Superb, what a weblog it is! This website provides useful facts to us, keep it up.
This blog was... how do I say it? Relevant!!
Finally I've found something that helped me. Thanks!
First of all I want to say awesome blog! I had a quick question that I'd like to ask if you don't mind.
I was curious to find out how you center yourself and clear your head before writing.
I've had trouble clearing my mind in getting my thoughts out there.
I truly do enjoy writing however it just seems like the first 10 to 15
minutes are usually lost just trying to figure out how to begin. Any suggestions or hints?
Many thanks!
Hi there friends, fastidious article and good urging commented at this place,
I am really enjoying by these.
Good blog post. I absolutely appreciate this site. Stick with
it!
whoah this blog is wonderful i really like reading your articles.
Keep up the good work! You realize, a lot of persons are searching around for this info, you can help
them greatly.
First off I want to say superb blog! I had a quick
question which I'd like to ask if you do not mind.
I was interested to know how you center yourself and clear your head prior to writing.
I have had trouble clearing my thoughts in getting my thoughts out there.
I truly do take pleasure in writing however it just seems
like the first 10 to 15 minutes are generally wasted just trying
to figure out how to begin. Any suggestions or hints?
Kudos!
My brother recommended I may like this website.
He was totally right. This submit truly made my day. You can not imagine just
how a lot time I had spent for this information! Thank you!
I like the valuable info you provide for your articles.
I'll bookmark your blog and test once more
here regularly. I'm moderately certain I will learn many new stuff right right here!
Best of luck for the next!
I have read so many articles regarding the blogger lovers however
this post is genuinely a fastidious post, keep it up.
What's up Dear, are you genuinely visiting this website on a
regular basis, if so then you will without doubt obtain nice knowledge.
If some one desires to be updated with most up-to-date technologies after that he must be pay a quick visit this web page
and be up to date everyday.
My spouse and I stumbled over here different page and thought I might check things
out. I like what I see so i am just following you.
Look forward to looking into your web page repeatedly.
There's certainly a lot to know about this issue. I like all of the points you've made.
WOW just what I was searching for. Came here
by searching for Blog
It's an awesome paragraph for all the online users; they will take advantage from it I
am sure.
Hi, its pleasant piece of writing regarding media print, we all be aware of media is
a wonderful source of information.
I got this site from my friend who informed me on the topic of this
website and now this time I am browsing this web site and reading very informative
articles or reviews at this time.
If you want to get a good deal from this piece of writing
then you have to apply these strategies to your won weblog.
Great post.
After looking into a number of the blog posts on your
website, I truly like your technique of writing a blog. I bookmarked
it to my bookmark webpage list and will be checking back soon. Take
a look at my website too and tell me what you think.
For latest news you have to visit web and on web I found this
web page as a best web page for hottest updates.
My relatives every time say that I am killing my time here at net, except I know I am getting experience daily by reading
such good posts.
Great web site you have got here.. It's difficult to find quality writing
like yours these days. I truly appreciate individuals like you!
Take care!!