Under Construction

Operation "reboot": Reboot eines NIM-Clients

Ein NIM-Client kann mit Hilfe der Operation „reboot“ vom zugehörigen NIM-Master aus rebootet werden. Die Operation ist aber nicht für einen normalen Reboot gedacht, sondern eher für den Fall einer anschließenden Neu-Installation. Der Reboot wird mit „reboot -q“ auf dem NIM-Client durchgeführt. Dabei werden keine laufenden Prozesse wie bei „shutdown -r“ gestoppt. Die Operation kann aber im Falle von Problemen nützlich sein, für den Fall das ein Einloggen auf dem NIIM-Client nicht mehr möglich ist. Es gibt einige optionale Attribute die angegeben werden können:

aixnim # lsnim -q reboot aix05

the following attributes are optional:
        -a inst_warning=<value>
        -a show_progress=<value>
        -a open_console=<value>
        -a display=<value>


aixnim #

Wir starten die reboot Operation zunächst ohne Attribute:

aixnim # nim -o reboot aix05
aixnim #

Der Reboot wird ca 3 Minuten nach Starten des Kommandos ausgelöst. Auf dem NIM-Client werden über NIMSH die folgenden Kommandos ausgeführt:

aix05 # grep exec /var/adm/ras/nimsh.log

Tue Jun 10 07:21:00 2025        command to exec  __  /usr/bin/echo >/dev/null
Tue Jun 10 07:21:15 2025        command to exec  __  /usr/bin/test -f /etc/nimstop && print 0 || print 1
Tue Jun 10 07:21:30 2025        command to exec  __  /usr/sbin/sync
Tue Jun 10 07:21:46 2025        command to exec  __  /usr/sbin/sync
Tue Jun 10 07:22:01 2025        command to exec  __  /usr/sbin/bootinfo -T 2>/dev/null
Tue Jun 10 07:22:16 2025        command to exec  __  /usr/bin/uname -m 2>/dev/null
Tue Jun 10 07:22:31 2025        command to exec  __  /usr/bin/echo "/usr/sbin/nimclient -S shutdown" > /tmp/__NIM_shutdown
Tue Jun 10 07:22:46 2025        command to exec  __  /usr/bin/echo "/usr/sbin/reboot -q &" >> /tmp/__NIM_shutdown
Tue Jun 10 07:23:02 2025        command to exec  __  /usr/bin/chmod 755 /tmp/__NIM_shutdown
Tue Jun 10 07:23:17 2025        command to exec  __  /usr/bin/at now + 1 minute < /tmp/__NIM_shutdown
aix05 #

Verwendet man das Attribut show_progress mit dem Wert “yes”, dann werden einige (wenige) Hinweise über den Fortschritt der Operation angezeigt:

aixnim # nim -o reboot -a show_progress=yes aix05
+-----------------------------------------------------------------------------+
                      Initiating "reboot" Operation
+-----------------------------------------------------------------------------+
Initiating the reboot operation on machine 1 of 1: aix05 ...

+-----------------------------------------------------------------------------+
                      "bos_inst" Operation Summary
+-----------------------------------------------------------------------------+
Target                  Result
------                  ------
aix05             INITIATED

Note: Use the lsnim command to monitor progress of "INITIATED"
targets by viewing their NIM database definition.

aixnim #

Ist auf dem NIM-Master DSM installiert und konfiguriert, lässt sich über das Attribut open_console=yes eine Konsole für den NIM-Client bei der reboot Operation öffnen. Ist die notwendige DISPLAY-Variable nicht gesetzt, kann das Display über das Attribut display angegeben werden:

aixnim # nim -o reboot -a open_console=yes -a display=:10.0 aix05
Starting console daemon

aixnim #

Hinweis: Dem NIM-Client muss das zugehörige Management-Objekt zugeordnet sein, Attribut mgmt_profile1.

Ist das angegebene DISPLAY korrekt und auch zugreifbar (xhost und/oder xauth), wird ein Terminal-Fenster mit der Konsole des NIM-Clients geöffnet:

Opening a console using dconsole by the NIM reboot operation