This how you create a now host plateform with tina_shell:
Voici comment créer une plateforme système avec tina_shell :
# set the host name assign HostName serveur1 # set the host type assign HostType 64 # create the plateform using a handler create Host HDL_SERVEUR1
The HostType number can be found by typing “help HostType” on tina_shell :
Les numéros type système peuvent être trouvés avec la commande “help HostType” sur tina_shell :
tina_shell > help HostType 1 : Type CONVEX C3400 (N'est plus supporté) 2 : Type CONVEX C3800 (N'est plus supporté) 3 : Type HP 300 (N'est plus supporté) 4 : Type HP 400 (N'est plus supporté) 5 : Type HP-UX 6 : Type HP 800 (N'est plus supporté) 7 : Type MIPS (N'est plus supporté) 8 : Type AIX … 45 : Type EMC Celerra 46 : Type Windows 2000 … 54 : Type Cluster Windows 2000 55 : Type Sun StorEdge NAS 56 : Type Windows XP 57 : Type Mac OS X … 64 : Type Windows Server 2003 65 : Type Cluster Windows Server 2003 67 : Type VMware ESX 68 : Type IBM I5 OS 69 : Type Windows Vista 70 : Type Windows Server 2008 71 : Type Cluster Windows Server 2008
Then create a file containing the host list to create and their HostType number <host_name>;<host_type> :
Ensuite créer un fichier contenant la liste des systèmes et leur HostType :
server1:38 server2:32 server3:67
Run the following script to create the tina_shell script:
Lancer le script suivant pour constituer le script tina_shell :
cat /tmp/newhost.txt |while read LINE
do
A=$(echo $LINE|awk -F";" '{print $1}')
B=$(echo $LINE|awk -F";" '{print $2}')
echo "assign HostName $A" >> /tmp/newhost.tsh
echo "assign HostType $B" >> /tmp/newhost.tsh
echo "create Host HDL_${A}" >> /tmp/newhost.tsh
done
exemple of result file (/tmp/newhost.tsh) :
example de fichier résultat :
assign HostName server1 assign HostType 38 create Host HDL_ server1 assign HostName server2 assign HostType 32 create Host HDL_server2 assign HostName server3 assign HostType 67 create Host HDL_server3
Finally run the .tsh file with tina_shell in order to create the plateforms :
Finalement lancer le fichier .tsh avec tina_shell pour créer les objets :
tina_shell -catalog tina1 -file /tmp/newhost.tsh
More information on “Atempo Time Navigator Shell scripting” documentation (shel41be.pdf).