Access to SRM >>> through Tru64 with consvar command

This is how you can access to the system firmware console (SRM) of Alpha servers from Tru64 Operating System.
Voici comment accéder à la console firmware système (SRM) des serveurs Alpha depuis le système d’exploitation Tru64.

You can get and set variables with -g and -s options.
Les variables peuvent être mises à jour et affichées avec les options –s et –g.

To list all the supported variables:
Pour lister les variables supportées :

[root@myhost1]/# consvar -v -l
Firmware Rev: 7.1-1
system fam:34  cpu:8  smm:1940
auto_action = HALT
boot_dev = dsk0
bootdef_dev = dsk0
booted_dev = dsk0
boot_file =
booted_file =
boot_osflags = A
booted_osflags = A
boot_reset = ON
Failed to get dump_dev
enable_audit = ON
license = MU
char_set =
language = 0x3c
tty_dev = 0
Failed to get scsiid
Failed to get scsifast
com1_baud =
com1_modem =
com1_flow = 9600
Failed to get com1_misc
com2_baud = OFF
com2_modem = SOFTWARE
com2_flow = 9600
Failed to get com2_misc
Failed to get password
secure = off
logfail = 0
srm2dev_id =

Managing license with lmf on Tru64

Recently I had to retrieve all the Tru64 licenses (OSF-BASE, OSF_SRV, OSF-USR…) on my old bunch of Apha Servers, in order to save them (in case of need).

Récemment j’ai du récupérer toutes les licences Tru64 (OSF-BASE, OSF_SRV, OSF-USR…) sur mes vieux serveurs Alpha, pour les sauvegarder (en cas de besoin).

This is how you manage Tru64 licenses:

Voici comment administrer les licences Tru64 :

# lmf list
Product                   Status                     Users: Total      Active
OSF-SVR                   active                            unlimited
OSF-BASE                  active                            unlimited
OSF-USR                   active                            4          0

“lmf list full” to get the full information, for instance :

“lmf list full” pour avoir la liste complète des informations sur les licences, par ex :

Product Name: OSF-BASE
Producer: DEC
Issuer: DEC
Authorization Number: XXX-XX-2004MAY18-XXX
Number of units: XX
Version:
Product Release Date:
Key Termination Date:
Availability Table Code: A
Activity Table Code:
Key Options: MOD_UNITS, ALPHA
Product Token:
Hardware-Id:
License status: active
Cancellation Date:
Revision Number: 0
Comment:
Cache Total Units: XX
Activity Charge: 0

To save your licenses on files you need “Product Name”, “Producer” and “Authorization Number” fields.
Then you have to run :

Pour sauvegarder vos licences dans des fichiers il faut les champs “Product Name”, “Producer” and “Authorization Number” et lancer :

lmf issue /tmp/license_file <Product Name> <Producer> <Authorization number>

The license is now in the file. If you run “lmf list” one license will be missing.
So you have to register again the license with the command:

La licence est maintenant contenue dans le fichier. Si vous lancez « lmf list », une des licences est manquante.

Il faut donc enregistrer à nouveau la licence avec la commande :

lmfregister - < /tmp/license_file

and enable the license :

et activer la licence :

lmf reset

This is a quick shell script I wrote in order to save some time.

Voici un shell script que j’ai rapidement écrit pour gagner du temps.

The 3 needed fields for all licenses are extracted in a variable. I use only the first 3 fields of the variable corresponding to a license. With those 3 fields I extract the license in a file (/tmp directory).

I’m doing the extraction until there are no more licenses on the server, then I use the files to register again the licenses and enable them.

J’extrais les 3 champs nécessaires de chaque licence dans une seule variable et je traite les 3 premiers champs qui correspondent à une licence.  Grace aux 3 champs j’extrais la licence dans un fichier dans le répertoire /tmp.

Cette opération est effectuée jusqu’à ce qu’il n’y ait plus de licences sur le serveur. Ensuite j’utilise les fichiers pour remettre les licences et les réactiver.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/ksh
#Initiate the loop
A="-"
while [ "$A" != "" ]
do
# get license list in one line
A=$(lmf list full |grep -E "Product Name|Producer|Authorization Number" |awk -F":" '{print $2}')
# if no license is found it's the end
[[ "$A" = "" ]] &amp;&amp; break
PRODUCT=$(echo $A |awk '{print $1}')
PRODUCER=$(echo $A |awk '{print $2}')
AUTH=$(echo $A |awk '{print $3}')
HST=$(hostname)
echo "License file is /tmp/${HST}_${PRODUCT}_${AUTH}"
#transfert the lisence to the file
lmf issue /tmp/${HST}_${PRODUCT}_${AUTH} ${PRODUCT} ${PRODUCER} ${AUTH}
done
#now the licenses are on files
#then you have to push again the licenses to the system
cd /tmp/
ls -1 `hostname`*|while read LINE
do
echo "-> register of license $LINE"
lmf register - < $LINE
done
#enable the licenses
lmf reset
#end

Tru64 How to get CPU information

Sizer :

CPU running – CPU en fonctionnement

# sizer –pr
3

Available CPU – CPU disponibles

# sizer -p
3

For CPU type – type de CPU

# sizer -c
cpu             "DEC6600"

Psrinfo :

Display processor information with psrinfo (-v for more info)

Affichage des infos cpu avec psrinfo (-v pour plus d’infos)

# psrinfo
0       on-line   since 02/19/2011 15:28:11
1       on-line   since 02/19/2011 15:28:11
2       on-line   since 02/19/2011 15:28:11

Hwmgr :

For more information there’s still hwmgr :

Pour plus d’information il reste hwmgr :

# hwmgr -get attribute -category cpu
2:
 name = CPU0
 category = cpu
 sub_category = EV6.7 (21264A)
 power_mgmt_capable = 0
 speed = 618
 cpu_ticks = (40 bytes binary data)
 cpu_number = 0
 start_stop_time = Fri Jul 16 16:11:40 2010
 hal_handle = 18446739676467577856
 phys_location = (null)
 registration_time = Fri Jul 16 16:11:25 2010
 user_name = (null) (settable)
 location = (null) (settable)
 software_module = (null)
 state = available
 state_previous = unknown
 state_change_time = none
 event_count = 0
 last_event_time = none
 access_state = online
 access_state_change_time = none
 capabilities = 0
 indicted = 0
 indicted_probability = (null)
 indicted_urgency = (null)
 disabled = 0
 COD_state = (null)

Tru64 ps -o args column length

Here is an issue I recently met. One of my colleagues wrote some years ago a script to manage oracle instances. The same script is used on AIX , Tru64 and HP-UX.

The problem is with the following function when on Tru64:

1
2
3
4
function f_psg {
typeset -x UNIX95=xpg4
ps -ef -o args=" " -o pid="" -o ppid="" | egrep "${1:-^}"
}

The first line of the function (line 2) is used to declare and export to the environment variable UNIX95 to xpg4, in order to get the same compatibilities on every system.

On AIX and HP-UX the function is efficient in every case, but with Tru64 if you want to use “args” and some other commands (pid and ppid), the output will be truncated to 16 characters:

# ps -ef -o args|grep ora_pmon

ora_pmon_BDDPRD05

ora_pmon_BDDPRD04

# ps -ef -o args -o pid|grep ora_pmon

ora_pmon_BDDPRD0       6713

ora_pmon_BDDPRD0       6753

As you can see, there is no way to know if the 1st line is BDDPRD05 or BDDPRD04 on the 2nd command. The script was working, but only if your oracle instance name is less than 8 characters.

I found 2 workarounds that are compatible with my other UNIX (so the same script can be used on every system).

The first one is to increase the column default length by labeling the column (I chose 20 characters) :

ps -ef -o args=”XXXXXXXXXXXXXXXXXXXX” -o pid=”” -o ppid=””

# ps -ef -o args="XXXXXXXXXXXXXXXXXXXX" -o pid="" -o ppid=""|grep ora_pmon
ora_pmon_BDDPRD05          6713          1
ora_pmon_BDDPRD04          6753          1

The second is the use arfgs at the end, so no limitation of 16 characters, the with awk I put the columns in the right order:

ps -ef  -o pid=”” -o ppid=”” -o args|awk ‘{print $3″\t”$1″\t”$2}’

# ps -ef  -o pid="" -o ppid="" -o args|awk '{print $3"\t"$1"\t"$2}' |grep ora_pmon
ora_pmon_BDDPRD05       6713    1
ora_pmon_BDDPRD04       6753    1

If you happen to know a easier way please post a comment.

Tru64 : format and mount floppy disk

I found this some years ago on a forum.
J’ai trouvé cette procédure il y a quelques années sur un forum.

Format the diskette in floppy drive floppy0:

Formatez la disquette dans le lecteur floppy0 :

# fddisk -fmt /dev/rdisk/floppy0c

Write a new disk label to a standard 3.5-inch diskette:

Il faut ensuite écrire le label du disque sur la disquette 3,5” :

# disklabel -wr floppy0 rx23

Create a new file system on the entire diskette, (c partition):

Créez un nouveau file system sur toute la disquette (partition c) :

# newfs /dev/rdisk/floppy0c

Mount the diskette drive on the /mnt mount point:

Montez la disquette sur le point de montage /mnt :

# mount /dev/disk/floppy0c /mnt