Deprecated: Creation of dynamic property Timber\Site::$pingback is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Site.php on line 180

Deprecated: Creation of dynamic property Timber\User::$name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/User.php on line 118

Deprecated: Creation of dynamic property Timber\Post::$has_disclaimer is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$os_meta is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_lock is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_last is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_thumbnail_id is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$in_evidenza_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_in_evidenza_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$inviato_in_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_inviato_in_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_category is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_blz_affiliation_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_content_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_speciali is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskw is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_metadesc is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_linkdex is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_content_score is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskeywords is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_keywordsynonyms is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_estimated-reading-time-minutes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_indexnow_last_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_oembed_7a111b5c558688a2e1267465f5880a18 is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_oembed_time_7a111b5c558688a2e1267465f5880a18 is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_oembed_5e54cbd79efc21a1042c2f3604252da9 is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_oembed_time_5e54cbd79efc21a1042c2f3604252da9 is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$newsletter_subject is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_newsletter_subject is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$newsletter_summary is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_newsletter_summary is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_date_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$ping_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_password is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$to_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$pinged is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_content_filtered is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$guid is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$menu_order is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_mime_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_count is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$filter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71
Come far riaccendere automaticamente PC e Server dopo un blackout elettrico | IlSoftware.it

Come far riaccendere automaticamente PC e Server dopo un blackout elettrico

I blackout elettrici possono interrompere lavoro e servizi critici. Per garantire la continuità operativa, i PC e server moderni offrono opzioni come “Restore on AC Power Loss” nel BIOS/UEFI e Wake-on-LAN. Per dispositivi più datati, il software open source WakeMyPotato su Linux consente riavvii automatici e spegnimenti sicuri dei sistemi RAID.

I blackout elettrici possono causare interruzioni improvvise del lavoro, perdite di dati o disservizi nei server aziendali. In molti contesti, far riaccendere automaticamente un PC desktop, un server o un notebook risulta fondamentale per garantire continuità operativa, evitare interruzioni di servizi critici, ridurre i tempi di inattività e proteggere dati e applicazioni che devono restare sempre attivi.

I sistemi NAS dei principali produttori, mettono a disposizione un’impostazione specifica per riaccendere il dispositivo dopo una mancanza di corrente e il ripristino della stessa. Ma nel caso degli altri sistemi, come si fa?

La funzione WOL (Wake-on-LAN) permette di accendere un dispositivo a distanza inviando un apposito pacchetto dati che prescrive “il risveglio”. Tuttavia, capita che dopo un’interruzione elettrica WOL non funzioni: la tecnologia richiede che la scheda di rete e l’alimentazione del PC rimangano parzialmente attive, cosa che non accade quando viene a mancare completamente la corrente.

Funzione “Restore on AC Power Loss” nel BIOS/UEFI

Per configurare un’accensione automatica del PC o del server dopo un blackout elettrico, basta entrare nel BIOS/UEFI premendo il tasto corretto (o la combinazione di tasti) al boot della macchina. In alternativa, è possibile entrare nel BIOS da Windows 11 digitando shutdown /r /fw /f /t 0 nella casella di ricerca del sistema operativo quindi scegliendo Esegui come amministratore.

Nella sezione Power o Power management del BIOS, si deve andare alla ricerca della funzione Restore on AC Power Loss (nota anche come AC Back Function, AC Recovery o Power On after Power Loss): permette al PC o al server di definire il comportamento al ritorno della corrente.

Se impostata su Off, il computer resta spento; su On la macchina si accende automaticamente appena ritorna la corrente; con Last State il sistema ripristina lo stato precedente al blackout (acceso o spento).

Sui server enterprise, la funzione può essere gestita anche tramite interfacce di controllo remoto come IPMI, iLO (HP) o DRAC (Dell).

WakeMyPotato: per accendere i PC desktop e i notebook più vecchi dopo un blackout elettrico

Molti PC e laptop datati non dispongono di funzionalità moderne come WOL o timer automatici a livello di BIOS. Può diventare un problema significativo se si desidera trasformare un vecchio dispositivo in un server domestico. In questi casi, anche un breve blackout può interrompere il servizio, rendendo necessario un intervento manuale per riavviare il sistema.

Per risolvere questa specifica esigenza abbiamo scovato un software libero (licenza GNU GPLv3) chiamato WakeMyPotato (WMP). Congegnato per i sistemi Linux, WMP configura automaticamente un servizio basato su systemd per garantire il riavvio automatico dei vecchi PC e notebook in caso di mancanza di corrente, con particolare attenzione alla sicurezza dei supporti di memorizzazione.

WakeMyPotato si occupa di due compiti principali:

  • Programmare riavvii automatici tramite rtcwake, consentendo al sistema di tentare il boot dopo un blackout. Ciò è utile soprattutto su dispositivi senza supporto BIOS per il riavvio automatico.
  • Spegnere in sicurezza i dispositivi RAID in caso di mancanza di alimentazione, riducendo il rischio di danni meccanici ai dischi. Su laptop con batteria, il servizio può eseguire uno spegnimento controllato anche in assenza di corrente AC.

Il servizio monitora costantemente la disponibilità di alimentazione e, una volta ripristinata la corrente, tenta di riavviare automaticamente il sistema dopo un intervallo configurabile (default: 600 secondi, ovvero 10 minuti). Se la batteria CMOS del BIOS è troppo vecchia o scarica, il riavvio automatico potrebbe non funzionare.

Installazione

L’installazione di WMP è semplice e rapida. Come primo passo, è necessario clonare il repository:

git clone https://github.com/pablogila/WakeMyPotato.git
cd WakeMyPotato

Il passo successivo consiste nell’avvio dello script di installazione:

sudo bash install.sh

La routine d’installazione chiede di configurare il tempo di attesa prima del riavvio automatico dopo un blackout. Il valore predefinito di 600 secondi è adatto per la maggior parte dei casi.

Per aggiornare la versione del servizio, è sufficiente disinstallare la versione attuale con il comando sudo wmp uninstall e reinstallare quella nuova.

Utilizzo e comandi principali

WakeMyPotato include un’utilità da riga di comando per gestire il servizio e verificare lo stato del sistema. Ecco i principali comandi:

sudo wmp help Mostra tutti i comandi disponibili
sudo wmp version Visualizza la versione del software
sudo wmp status Controlla lo stato del servizio
sudo wmp log Mostra i log degli avvisi recenti
sudo wmp set <secondi> Modifica il tempo di attesa prima del riavvio
sudo wmp run <secondi> Esegue un controllo manuale immediato
sudo wmp stop Ferma il servizio
sudo wmp start Avvia il servizio
sudo wmp uninstall Disinstalla il servizio

Note finali

Un UPS (Uninterruptible Power Supply) fornisce alimentazione temporanea in caso di blackout e può offrire ulteriori vantaggi. Protegge hardware e dati durante interruzioni improvvise e permette spegnimenti controllati tramite software collegato al PC/server. Alcuni modelli offrono la possibilità di configurare la riaccensione automatica del PC non appena ritorna la corrente.

Ovvio quindi che un gruppo di continuità è la scelta migliore per spingere sulla continuità operativa. Nei casi in cui non fosse possibile utilizzare questi dispositivi, comunque, le indicazioni riportate nell’articolo offrono una valida alternativa.

Ti consigliamo anche

Link copiato negli appunti