Koozali.org: home of the SME Server

SME 9.2.0 64 bits - Wake-On-Lan et Veille..

Offline STRyk

  • ****
  • 190
  • +0/-0
SME 9.2.0 64 bits - Wake-On-Lan et Veille..
« on: May 17, 2020, 07:02:36 PM »
Bonjour,
J'ai cherché depuis quelques temps sans vraiement voir si quelqu'un l'utilise vraiment sur SME.
Est il possible de mettrre en veille SME et éventuellement le démarrer à heure précise ?
Merci par avance.

Offline STRyk

  • ****
  • 190
  • +0/-0
Re: SME 9.2.0 64 bits - Wake-On-Lan et Veille..
« Reply #1 on: May 19, 2020, 08:46:08 PM »
Personne ne l'utilise sur SME ?

Offline ReetP

  • *
  • 3,713
  • +5/-0
Re: SME 9.2.0 64 bits - Wake-On-Lan et Veille..
« Reply #2 on: May 20, 2020, 01:32:58 PM »
Not sure you have really thought this one through. It isn't really a SME issue.

Most servers runs 24/7 - we worry about uptime.....

WoL is a function of your network card and BIOS, not SME.

So if your network card & BIOS support it then you can get it to boot. You just need something running somewhere to trigger the WoL.

For SME you just have to think about shutdown and how you are going to handle that. You could set it as a cron job so it shuts down at a specific time, or write some code to shutdown on low activity or something.

If you want to do this to save power then look at getting a low power server that CAN run 24/7. Eg Intel Atom Boards etc (Supermicro make some nice little 1U boxes) etc etc.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline mab974

  • *
  • 84
  • +1/-0
Re: SME 9.2.0 64 bits - Wake-On-Lan et Veille..
« Reply #3 on: May 27, 2020, 08:17:46 AM »
Salut,

ReetP a raison de dire que généralement un serveur SME tourne 24/7.

J'avais commencé cependant à préparer un serveur de sauvegarde pour qu'il se mette en route et en attente toutes les nuits et s'arrête une fois les sauvegardes effectuées.

Cela me semblait jouable mais j'avais du reporter ce projet (comme d'autres !) pour cause de vieille carte mère instable.

L'idée d'un serveur de sauvegarde déporté.... ( dans la maison  :) ) me plaisait assez !!

Offline STRyk

  • ****
  • 190
  • +0/-0
Re: SME 9.2.0 64 bits - Wake-On-Lan et Veille..
« Reply #4 on: May 27, 2020, 02:11:20 PM »
Bah oui c'était dans cette idée là...
Je suis étonné que lorsque l'on sort de l'utilisation première que tout soit si difficile.
J'imagine que je ne suis pas le seul à avoir eu ce besoin.
J'ai déjà lu que certains parlait d'economie d'energie etc... La mode actuellee (depuis plus de 20 ans lol), qui aurait du se généralisé. Mais dans les faits, non.  :D

Offline ReetP

  • *
  • 3,713
  • +5/-0
Re: SME 9.2.0 64 bits - Wake-On-Lan et Veille..
« Reply #5 on: May 27, 2020, 03:25:24 PM »
There is a big difference between servers and desktops.

For *most* people they want their server 24/7. Just the way it is. My server here runs my network. No server, no DHCP, DNS, mail, and a lot of other things besides. It is busy most of the day and night - it runs sync and backups & other stuff over night.

If you look in servers settings there are plenty or energy reducing options like throttling CPUs, more efficient CPUs, better thermal efficiency etc etc, and then you have bigger denser drives, and now Solid State drives etc etc. They can slow themselves down and reduce energy a lot without needing to be shutdown.

Computer hardware is not at its best being constantly turned on and off. Much better to be running at a nice stable temperature. The constant temperature changes will affect the hardware and reduce the lifetime, or increase the risk of failure.

It is much faster to wake it up from 'resting' rather than 'sleeping' or 'dead'.

Yes, perhaps you have a backup server that has one function once a day. But that is a specialised machine. It is a simple file store and has none of the normal server functionality (think of it as a complicated network attached drive).

A normal server is multi function. It is a complicated beast running many different tasks. Not the same thing at all.

Notwithstanding this, the point you have missed which I have said previously is that WAKING a machine is NOT the job of the OS. That is a function of the BIOS and/or network card. The OS only takes over once the machine has started, and not before. So that has nothing to do with the OS and it is something that has several easy solutions.

Shutting down is another matter entirely. You can easily script that to do so at a fixed time. The complication is if you want to shut it down when it is idle. What is really 'idle'?

Desktops work that out by keyboard and mouse activity. How do you do that on a server that has no keyboard and mouse connected (mine do not.....)?

How do you also tell it to wake again? It can't detect a keyboard and mouse that are not attached. WoL doesn't really work that way - please have a read about it. As I said above, it is a function of the motherboard and network card, not the OS. Yes, you can set WoL on a network card with Windows, but in reality you are setting a hardware option in the card and Windows will know nothing about a WoL packet waking up the card. If you had the right piece of software you can set it without Windows at all.

https://www.lifewire.com/wake-on-lan-4149800

Quote
It doesn't matter what operating system the computer eventually boots into (Windows, Mac, Ubuntu, or another Linux distribution), Wake-on-LAN can turn on any computer that receives the magic packet. The computer hardware must support Wake-on-LAN with a compatible BIOS and network interface card.

So the point is you are looking for a simple solution to what is actually a complex problem, and most of which has nothing to do with SME..... :-) And that is why you cannot find an answer to your question!

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline mab974

  • *
  • 84
  • +1/-0
Re: SME 9.2.0 64 bits - Wake-On-Lan et Veille..
« Reply #6 on: June 06, 2021, 07:13:45 PM »
@STRyk

Je me souviens juste de ce vieux fil.
Finalement, je l'ai fait et voici le script que j'utilise chaque semaine à destination d'un serveur sme9 de sauvegarde avec wol installé dessus.
 
Code: [Select]
# first backup sme serveronly
#/usr/bin/wol -v -i 192.168.10.255 54:04:a6:57:df:fd

HADDR='54:04:a6:57:df:fd'
IP='192.168.10.209'
CAST="${IP%.*}.255"
#wait
TIME=30
#====-=-==-=-=-=-=-=-=-=-=-=-=

if (ping -c 1 $IP > /dev/null 2>&1)
then
    echo "$IP is already UP, abort !!!"
    exit 1
fi

echo "Trying to wake up $IP (mac $HADDR) by broadcasting $CAST "

/usr/bin/wol -v -i "$CAST" "$HADDR"

echo -n "waiting ($TIME sec max)..."

for second in $(seq 1 $TIME)
do
  sleep 1
  echo -n '.'
    if (ping -c 1 $IP > /dev/null 2>&1); then
        break;
    fi
done
echo ''

if [ "$second" = "$TIME" ]; then
  echo "WARNING: Give up, $IP NOT UP, test it before continuing"
  exit 5
fi

echo "$IP UP now ($second), you can use it"
exit 0

Offline ReetP

  • *
  • 3,713
  • +5/-0
Re: SME 9.2.0 64 bits - Wake-On-Lan et Veille..
« Reply #7 on: June 06, 2021, 07:16:21 PM »
Contrib ;-)
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline mab974

  • *
  • 84
  • +1/-0
Re: SME 9.2.0 64 bits - Wake-On-Lan et Veille..
« Reply #8 on: June 06, 2021, 07:28:53 PM »
trop lèger pour une contrib pour l'instant. Mais qui sait, si le besoin se précise et s'étoffe.....

Offline ReetP

  • *
  • 3,713
  • +5/-0
Re: SME 9.2.0 64 bits - Wake-On-Lan et Veille..
« Reply #9 on: June 06, 2021, 07:43:46 PM »
Dedicated affa backup server.....
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline gieres

  • *
  • 213
  • +0/-0
Re: SME 9.2.0 64 bits - Wake-On-Lan et Veille..
« Reply #10 on: June 06, 2021, 10:03:25 PM »
Bonsoir,

Comme le dit ReetP à la fin, je l'ai fait avec l'aide d'Arnaud pour un serveur SME qui effectuait les sauvegardes Affa du serveur SME de production. On peut faire la même chose pour n'importe quel programme de sauvegarde...

1. Le serveur démarrait avec la fonction de démarrage horaire de la carte mère (ce qui nécessite de modifier l'heure 2 fois par an si on veut économiser une heure d'électricité) ; si elle n'en a pas, il suffit de brancher le serveur sur une prise de courant sur horloge, non ?

2. le serveur s'arrête sur un drapeau externe qui vérifie que plus personne ne se connecte à ce serveur pendant x minutes.

Si ça t'intéresse, je mettrai cette ligne de commande un peu compliquée (pour moi) sur ce fil : il faut que je la retrouve.

Mais je suis complètement d'accord que ce sont les mises sous tension des éléments électroniques qui vont un jour provoquer la perte du serveur, notamment de l'alim. Il faut donc choisir...

Bonne soirée

Offline Jean-Philippe Pialasse

  • *
  • 2,721
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: SME 9.2.0 64 bits - Wake-On-Lan et Veille..
« Reply #11 on: June 07, 2021, 03:41:49 AM »
Les cycles on/off sur les disques dur augmentent de 2 points de pourcentage le risque d'incident de disque après 3 ans.
http://static.googleusercontent.com/media/research.google.com/en/us/archive/disk_failures.pdf

Si tu es inquiet pour la survie du disque de backup, alors laisse le allumé.

si tu es inquiet  pour le bruit et la consommation électrique, opte pour un serveur sur une carte mini-itx. Pas de ventilateur, moins de 20W de consommation.



Offline marsa_matruh

  • ****
  • 249
  • +0/-0
Re: SME 9.2.0 64 bits - Wake-On-Lan et Veille..
« Reply #12 on: June 07, 2021, 11:10:22 AM »
D'ailleurs, des cartes mini-itx à recommander?

À une période, je regardais les cartes Odroid-H2 (et H2+ maintenant). Malheureusement, elles sont actuellement gravement en rupture de stock.

Offline Jean-Philippe Pialasse

  • *
  • 2,721
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: SME 9.2.0 64 bits - Wake-On-Lan et Veille..
« Reply #13 on: June 07, 2021, 07:58:12 PM »
J'ai longtemp acheté des jetway avec un bon rapport qualité prix. Presentement j'ai une gigabyte.

Ma priorité est toujours fanless, 2 adaptateur réseau et 4 ou plus SATA. Je m'arrange pour mettre au moins un SATA en eSATA pour les backup.  avec l'USB3 le eSATA est moins indispensable (et donc 2 sata peuvent suffire, ou peuvent etre suppléé avec une carte pcie), a moins que tu veuille faire du raid sur ton backup sur un dock esata externe.

J'aime le comparateur chez mini-itx.com, cela aide a choisir, et ils ont une bonne offre et bon service.

Offline STRyk

  • ****
  • 190
  • +0/-0
Re: SME 9.2.0 64 bits - Wake-On-Lan et Veille..
« Reply #14 on: June 09, 2021, 09:36:18 PM »
Merci Mab974 pour ton script, je vais l'étudier et faire des essais.

Pour ma part j'ai deux type de serveur SME :
-Un qui sers de passerelle (si j'ai un problème avec mon modem routeur) ou derrière mon modem routeur pour envoyer ou recevoir des données pour mon "travail".
-Un qui sers d'archive avec deux volumes en RAID1. Celui ci est démarré que pour archiver les données ou pour en récuperer. Il est arreté dès qu'il n'est plus nécessaire. J'utilise un sript avec le bouton ON/OFF de la machine ou via le SSH.

L'idéal, serait une machine avec SSD pour le 24/7 consommant le moins possible et avec la possibilité de démarrer une ou deux grappe RAID suivant les besoins. Mais c'est un rêve...
 :grin: