Tru64 Command CheatSheet

TRU64 Command CheatSheet

1. System Version

sizer -v

 

2. Unix Name and hostname

uname -n; uname -a

 

3. Number of CPU(s)

sizer -p

 

4. Memory state

vmstat -P

 

5. Swap state

swapon -s

 

6. Filesystems

df -k
df -k -t advfs

 

7. CPU numbers, speed

# * Number of CPUs with psrinfo
psrinfo -n

# * Number of CPUs with sizer
sizer -p

# * Number of CPUs with dbx (debugger)
echo "p ncpus" | dbx -k /vmunix /dev/mem 2>/dev/null | tail -1
echo "p rpb->rpb_numprocs" | dbx -k /vmunix /dev/mem 2>/dev/null | tail -1

# * CPUs type with psrinfo (speed, model, cache)
psrinfo -v

# * CPUs type with hwmgr (only for version 5)
hwmgr get attr -cat cpu -a sub_category
hwmgr get attr -cat cpu -a sub_category -a speed

# * CPUs speed (MHz) with dbx (see also "rpb" and "rpb -r" with kdbx)
SPD=$(echo "pd rpb->rpb_counter/1000000;quit" | dbx -k /vmunix /dev/mem 2>/dev/null | tail -1)
echo "CPU SPEED = ${SPD}"

 

8. System Type

# * System Type (only for version 5)
SYS_TYPE=$(hwmgr get attr -cat platform -a name | grep -v : |sed 's/  name = //')
echo "${SYS_TYPE}"

# * System Type with kdbx (kernel debugger)
KERN=$(sizer -b)
SYS_TYPE=$(echo sum | kdbx -k /${KERN} /dev/mem | grep cpu
SYS_TYPE=$(echo "${SYS_TYPE}" | cut -f2 -d: | cut -f1 | cut -b2-)
echo "${SYS_TYPE}"

# * System type with dbx
KERN=$(sizer -b)
STR="pd (char *)rpb + rpb->rpb_dsr_off + ((struct rpb_dsr *)\
     ((char *)rpb + rpb->rpb_dsr_off))->rpb_sysname_off + sizeof(long)"
SYS_TYPE=$(echo "${STR}" | dbx -k /${KERN} /dev/mem 2>/dev/null | tail -1 | cut -f2 -d'"')
echo "${SYS_TYPE}"

# * System Type with snmp_request (SNMP query)
COM=$(grep ^community /etc/snmpd.conf | tail -1 | awk '{print $2}')
snmp_request 127.0.0.1 ${COM:-public} get 1.3.6.1.2.1.1.1.0

 

9. Patches and installed software: “setld” e “dupatch”

# * Patch Kit summary
dupatch -track -type kit -nolog#

# * Manual Patches
dupatch -track -type patch -nolog | grep "Patch C"

# * Delete a list of patches  (divided by product: UNIX and Cluster)
dupatch -delete -product Tru64_UNIX_V5.1B -patch "C 00362.02" "C 00926.00" "C 00927.00" \
"C 00469.00" "C 00564.02" "C 00453.00" "C 00407.00" "C 00409.01" \
-product TruCluster_V5.1B -patch "C 00127.00" -name "HP" -note "delete manual patches PK3 from the cluster"

# * Patches/Package dependences
cd /usr/.smdb.; /usr/lbin/depord -I package_name

# * Truly "active" Patches
grep -v none /usr/.smdb./OSFPAT*.inv | awk '{print $1}' | sort -u | cut -f1 -d:

# * Software/patches installed
ls /usr/cluster/members/{memb}/.smdb.

# or (like manpages says)
ls /usr/.smdb./*.lk

 

10. Verify that permissions owners of “files” installed on the system are:

#   correct and with a valid checksum (see also: manpage fverify)
ls -l ls /usr/.smdb./*.lk | sed 's/lk/inv/' | while read F; do /usr/lbin/fverify -np <$F; done 2>&1

 

11. Last PatckKit (PK) Installed

#   (dupath -track -type kit -nolog -> is the same, but slower)
PATCH=$(grep AS0 /var/adm/patch/log/event.log | cut -f2 -d'>' | cut -b2- | tail -1)
expr ${PATCH##*AS%%-*}

# * Baseline (in version 4.0g there isn't)
grep AS0 /var/adm/patch/log/event.log | cut -f2 -d'>' | cut -b2- | tail -1 |\
awk -F"AS" '{print $1}' | rev | cut -b -3 | rev

# * Manual Patch (by hand)
grep ^KITNAME /var/adm/patch/log/event.log | grep -v AS | cut -f2 -d'>' |\
cut -b2- | sort -u

# * Manual Patch only for the last PatchKit
BN=$(grep AS0 /var/adm/patch/log/event.log | cut -f2 -d'>' | cut -b2- | tail -1 |\
     awk -F"AS" '{print $1}' | rev | cut -b -3 | rev)
grep ^KITNAME /var/adm/patch/log/event.log | grep -v AS | cut -f2 -d'>' | cut -b2- |\
sort -u | grep $BN | tr '\n' ',' | sed s/,$//

 

12. Users

# NOTES: see the manpage of: "usermod"
#        some commands are only valid for system with C2
#        (Security ENHANCHE - "rcmgr get SECURITY")
#
# Unlock a User
usermod -x administrative_lock_applied=0 username

# Lock a User
usermod -x administrative_lock_applied=1 username

# * Enable a user when he is in DISABLE state
#   In "10" days the user must login
usermod -x grace_limit=10 username

# * Enforce user password change
usermod -x passwd_must_change=1 username

# * Get/Query user status
passwd -q username
passwd -qa # -> all users (LK=Lock, PS=OK, NP=no password)

# * Change HASH field to "*" like shadow password
sed 's/:[^:]*:/:*:/' /etc/passwd

 

13. C2 (Security ENHANCHED)

# * Is the system in C2 (Security ENHANCHED)
rcmgr get SECURITY

# * Delete all users from SIA db (C2 db) that are not present in "/etc/passwd"
/tcb/bin/authck -p
convuser -d

# * Some Checks
grpck
pwck
siacfg
ckfsec

# * Editing of the default values of SIA DB
#   (edauth may be located at: "/tcb/bin/edauth")
VISUAL=/usr/bin/vi edauth -dd default
VISUAL=/usr/bin/vi edauth username

# * Get/Show user "C2" attributes
edauth -g username
edauth -g # show all users

# * Get/Show default values
edauth -g -dd default

# NOTES: see prppasswd, default manpages

 

14. Filesystem/Files

# * Show files in "size" order
cd /; find . -mount -type f -exec du -k {} \; | tee /tmp/df1
sort -rn /tmp/df1 | tee /tmp/df2; mv /tmp/df2 /tmp/df1
more /tmp/df1

 

15. Advance Filesystem (AdvFS)

# Under the path: "/sbin/advfs/"; there are AdvFS utility
#
# * Repopulate "/etc/fdmns".
#   May be useful when you do a storage migration.
#   Ex. - All disks of storage 'A' will be migrated to a storage 'B'.
#   (see manpage of advscan)
/sbin/advfs/advscan -ga
/sbin/advfs/advscan -g
/sbin/advfs/advscan dsk101
/sbin/advfs/advscan -g dsk101

# For the real fix be carefull (pay ATTENTION!)
/sbin/advfs/advscan -r
/sbin/advfs/advscan -f domain_name

# * Files in ".tags" directory (.tags files)
#
#   tag 1 is th fragment file.
#   (the biggers is, worst in performance)
cd /mount_point/.tags
ls -li 1                                # Check the size of frag file
showfile -x 1 | grep -i extentcnt       # Check number of extent

# * Disable frag file
#   [ With this operation files will be create with a size that is a
#    multiply of 8192 (8KB). A file of 100 byte will reserve 8KB
#    The file "/mount_point/.tags/1";
#    handle all "pieces" of small files, this to use at best the
#    Filesystem space ]
chfsets -o nofrag fset_name            # Disable frag file

# * BMT file (Bitfile Metadata Table -> Metadata)
#   The BMT is M-10
#   AdvFS volumes begin from M-6 and increment by a factor of six
#   (M-6, M-12, M-18, ...)
cd /mount_point/.tags
showfdmn domin_name                       # How many disks
ls -ls      M-6 M-12 M-18 M-24 M-30 M-36  # Check the size (ex. 6 dsks)
showfile -x M-6 M-12 M-18 M-24 M-30 M-36  | grep -i extentcnt # Check extent
showfile -x M-10 # Check extent of BMT

# If BMT (M-10) is too much "fragmented" you may create a new FS with
# different values.
# -p (the initial size of BMT)
# -x (size of extent for BMT)

# * AdvFS statistics and Buffer cache
advfsstat -b           # Buffer cache
advfsstat -l   0       # Lock stats     basic
               1       #                detailed
               2       #                very detailed

advfsstat -v   2       #
advfsstat -v   3       #

 

16. How to create a particular AdvFS Filesystem

mkfdmn -p 256000 -x 4096 dsk69c particular_domain

# It will take a lot, because it will create 256000 pages of 8192 (or 8184) bytes
# 2 GByte of preallocate bitfile metadata table.
#
# * How to Increment AdvFS performance
vfast -o defragment=enable,balance=enable,topIObalance=enable my_domain
vfast status my_domain

 

17. Defragment of AdvFS

# Show defragment status of domain/Filesystem
defragment -nv my_domain

# *  Defragment for 30 minutes
#    with -T "exactly" of 30 minutes (it is not true at all ...)
defragment -t 30 -v my_domain

# *  Defragment of ALL domains (in parallel) for 30 minutes
defragcron -T 30 -p

 

18. Kernel parameters (sysconfig)

# * List of dynamic subsytems loaded during boot
/sbin/init.d/autosysconfig list

# * List of subsytems (dynamic and static) loaded and configured
sysconfig -s

# * List of subsytem sorted by: dynamic and static
sysconfig -m

# * Load a dynamic kernel module onto the system (ex envmon)
sysconfig -c subsys

# * Unconfigur a dynamic kernel module
sysconfig -u sybsys

# * Set automatic load of a dynamic kernel module at boot
#   ATTENTION (use sysconfig -c subsys)
#   See: SUBSYSTEM_LIST in "/sbin/init.d/autosysconfig"
/sbin/init.d/autosysconfig add subsys

# * Delete automatic load of a kernel module at boot
/sbin/init.d/autosysconfig delete subsys

# * Get/Query kernel parameters
sysconfig -q subsys [parameter1] [parameter2] ...

# * Get/Query configurable values of a kernel parameter/s
sysconfig -Q subsys [parameter1] [parameter2] ...

# Meaning:
#             type=?    typp: INT, UINT, LONG, ULONG e STRING 
#             op=?      Opertions:
#                       C = Configurable (if there isn't R -> needs reboot)
#                       R = Configurable at Runtime;
#                       Q = Query
#             min_val=? min value
#             max_val=? max value
#
# * Get/Query a kernel parameters stored in: "/etc/sysconfigtab"
sysconfig -d subsys [parameter1] [parameter2] ...

# * Get/Query a kernel parameters stored in: "/etc/sysconfigtab"
sysconfigdb -l [subsys]

# * Set/Modify a Runtime kernel parameter
sysconfig -r sybsys parameter=value

# * Manpage of a specific subsystem (for kernel parameters)
man sys_attr_subsys

# * Notes:
#   - When you load subsys lag (man lag) you can't do the unconfigure
#   - To make static a dynamic module you need to rebuild de kernel
#     Modify by hand configuration file (section options) see: doconfig
#   - To make permanent the value of a parameter after a reboot, you must
#     edit the file: "/etc/sysconfigtab" (pay Attention!)
#     Manpages suggests to use: "sysconfigdb"
#   - On a cluster keep parameters in sync (...with some exceptions)

 

19. SNMP Simple Network Management Protocol

# * Information of the system: "SYSTEM" with COMMUNITY "public"
#   Change "public" if you have a variant (see: "/etc/snmpd.conf")
snmp_request SYSTEM public get 1.3.6.1.2.1.1.1.0

 

20. Show Firmware firmware version

snmp_request SYSTEM public get 1.3.6.1.4.1.36.2.18.22.1.2.10.1.3.1

 

21. Event Management (evm)

evmget | evmsort | evmshow -T "%Y/%m/%d %T " -t "[@priority]  @@" | more

 

22. System Temperature

# Load kernel module if not present (see sysconfig tips)
# (sysconfig -c envmon; sysconfig -q envmon; sysconfig -u envmon)
sysconfig -q envmon

 

23. Cluster and cluster alias

# * Cluster status
clu_get_info -raw

# (version 4)
cnxshow

# * Cluster alias information
cluamgr -s all # -> Configuration
cluamgr -a alias=alias_name,leave,rpri=0 # -> Disable an alias
clua_active alias_name # -> 0 if active, 1 otherwise
cluamgr -r start # -> Restart of alias routing
cluamgr -r info # -> Show some more information (Not documented!!!)

# * Cluster Alias Bilanced connections
cluamgr -a selp=10,rpri=10,alias=DEFAULTALIAS  

# this on node two
cluamgr -a selp=5,rpri=5,alias=DEFAULTALIAS

# (cluamgr -a selw=3,selp=10,rpri=5,join,alias=DEFAULTALIAS)
# Service in "/etc/clua_services" must be in_multi

# * Configuration of a single member
#   See: directory /.local.. -> cluster/members/{memb}

 

24. Memory channel (MC)

# * Show members of a cluster orderd by ID (versione 4.x)
cnxshow
cnxshow -v
cnxshow | tail +10 | cut -f1 -d' '

# * Kernel parameters for the Memory Channel
sysconfig -q rm
(see: rm_errors, rm_shutdowns - and manpage: sys_attrs_rm)

- Filesystem relocation on a cluster (cfsmgr)
cfsmgr -a SERVER=${HOSTNAME} -d ${D}
# where: HOSTNAME=is_the_host_name and D=domain_name
cfsmgr -h host2 -r -a SERVER=host1 /my_fs
# move: "/my_fs" from host2 to host1

# * Show FileSystems status (raw output)
cfsmgr -F raw

 

25. Network (net)

# * With "trailers" option you will increment performance (see manpage: ifconfig)
#   but not all routers support this option. (PAY ATTENTION!)
ifconfig ee0 10.41.8.221 netmask 255.255.255.0 filter trailers

# * Switch of a interaece in NetRain (trunking) config
ifconfig ee1 switch # if Netrain is made by: ee0, ee1 (ee0 UP); switch ee0 to ee1

# * IP down (to create a netrain, interfaces must be without IP)
ifconfig ee0 down delete abort

# * Get/Show IP aliases
#   Tru64 v5 "ifconfig" will show
#   Tru64 v4 use instead "netstat -in"
ifconfig ee0
netstat -in | grep ee0 | awk '{print $4}' | tail +3

# * Get/Show all network interfaces
ifconfig -a

# * Get/Show routing table
netstat -nr

# * Set media speed of a network interfaces
lan_config -i ee0 -s 100 -x 1

 

26. Remote Procedure Call (RPC)

# * Get/Show all port associated with rpc
rpcinfo -p

# See: man portmap (port 111); man inetd (on 5.1B)
# * Get/Show connected users "rpc.rusersd"
rusers -al

# * Get/Show systems state: uptime, load; "rpc.statd"
#   (will do a broadcast on the net)
rup
ruptime

# * Send a message to all the network (like: wall) "rpc.rwalld"
rwall
rwall hostname
shutdown -b # (broadcast to say: i will reboot soon)

# * Test rpc "rpc.sprayd"
spray # (see: man spray)

 

27. LSM change fault disk

# (is the same also for version 5)
voldisk list
voldg -g dg-1 -k rmdisk rzh69
voldisk rm rzh69
disklabel -z rzh69
disklabel -rw rzh69 auto
voldisksetup -i rzh69 privlen=1024 nconfig=1 # privlen may change (5 use 4096)
voldg -g dg-1 -k adddisk rzh69=rzh69
volrecover -sb rzh69
iostat rz43 1
volprint -Aht | grep wo

- disklabel export (disklabel cloning)
disklabel -r dsk35 > /tmp/dsk35
disklabel -Rr dsk39 /tmp/dsk35

 

28. Raid Controller

swxcrmgr
# (before export display: export DISPLAY=1.1.1.1:0.0)
/usr/lbin/hsxterm -b BUS -t TARGET -l LUN

 

29. Hardware Error (binary errorlog)

# * General query
ca u -R |more
wsea x analyze | more
wsea u ana | more
wsea u -o sum | more
uerf -R | more
dia -R

# * wsea
wsea n sum since=dd-mmm-yyyy,hh:mms  
wsea n sum since=today
wsea n sum since=yesterday
wsea n sum begin=dd-mmm-yyyy,hh:mms
wsea n sum end=dd-mmm-yyyy,hh:mms

# it is the same with "ana" option (analize)
wsea n ana since=dd-mmm-yyyy,hh:mms

# * dia
# Provides a detailed report all I/O-related error events in reverse order.
dia -o terse -i ios -R

# Provides a short summary of all disk-related events as they occur.
dia -o brief -i disk -c

# start time / end time
dia -t s:dd-mmm-yyy,HH:MM:SS e:dd-mmm-yyy,HH:MM:SS
dia -t s:27-May-2006,18:21:00  s:27-May-2006,18:22:00 -o full

# Get/Show all type of events
dia ls evt | more

dia ana -i ios -i disk

# * uerf
#   Use uerf if you don't have: wsea, dia, ca
#   (use the last example)

# Provides a full report of all error events.
uerf -c err -o full

# Provides a detailed report of all error events in reverse order.
uerf -c err -o terse -R

# Provides a short summary of all error events as they occur.
uerf -c err -o brief -n

# In revers order
uerf -R -o full -f /cluster/members/{memb}/var/adm/binary.errlog | more

 

30. kdbx debugging crash

# * Some dbx commands to show system information
kdbx -k vmunix /dev/mem
(kdbx) p (page_size*physmem) / (1024*1024) -> memory in MBytes
(kdbx) swap -> show swap
(kdbx) p utsname -> show hotname

# * Debugging on Tru64 5.X (crash analysis)
cd /var/adm/crash
dbx -k vmunix.0 vmzcore.0
p panicstr
t

# * Debugging with kdbx
kdbx -k vmunix.0 vmzcore.0
sum
t
p utsname
kps
p $pid
p *pmsgbuf
# * Debugging with crashdc
crashdc vmunix.0 vmzcore.0

 

31. Make a floppy disk with ufs Filesystem

disklabel -z floppy0c
disklabel -rw floppy0c
newfs /dev/rdisk/floppy0c
mount -t ufs /dev/disk/floppy0c /mnt/floppy

 

32. Backup Restore

# * Backup on tape (ntape = not rewind tape)
mt rew
vdump -0 -f /dev/ntape/tape0_d1 /mnt

# * Restore from tape
mt rew
vrestore -f /dev/ntape/tape0_d1 -x -D /mnt

# * Remote Backup (ssh or rsh)
tar cf - file | (ssh remote_host "cd remote_dir;tar xf -")
vdump -0f -  | ssh remote_host "/sbin/vrestore -D  -f - "
vdump -0f -  | ssh remote_host "dd if=- of="

# * Remote vdump and local vrestore on a specific directory
ssh remote_host "vdump -0f - " | vrestore -D  -f -"

- device tape creation (you need to create tape devices if you boot from CDROM)
dn_setup -install_tape

- device standard creation
/dev/MAKEDEV std

 

33. LSM removal from boot disks (standalone system)

1) Modify link of /etc/fdmns/root_domain, usr_domain, var_domain
2) Edit: "/etc/sysconfigtab" and remove LSM (see also swap)
3) Remove all, execpt "types" from: "/etc/vol/"
4) Remove all from: "/dev/vol" and "/dev/rvol"
5) Edit: "/etc/inittab and remove 3 rows of LSM (vol*)

- Persistent Reservation (PR) SCSI disk (clear reservation disk)
#
# * Script to clear Persistant Reservation (PR)
#   Works only for HP storages (may be useful)
/usr/sbin/cleanPR

# * How to remove PR from a disk
#   (shutdown every node of a cluster execpt one)
scu
scu> sbtl bus target lun
scu> show keys
scu> preserve clear key 0x8...

- The scu command
# * Get/Show disk information
#   sbtl -> set bus target lun
#   show nexus -> show bus target lun
#   tur -> test unit ready (disk in fail or good)
#   show inquiry -> show disk information
#   show capacity -> show disk size
scu
scu> sbtl 1 0 0
scu> show nexus ; tur ; show inquiry ; show capacity
scu> show edt capabilities

# * Make some disk diagnostic
#   Read from disk bus 3 target 1 lun 0
scu
scu> sbtl 3 1 0
scu> set statistics on
scu> set watch off
scu> read media ending 100000 compare off bs 512 -> slow
scu> read media ending 100000 compare off bs 914k -> top of the top usage

# * Change disk attributes
#   Change wce (write cache enable -> danger)
scu
scu> sbtl bus target lun
scu> show layout cache
scu> show pages cache
scu> set default savable off
scu> set pages cache wce on
scu> show pages cache

# * Get/Show all scsi paths and capabilitis
scu
scu> show path all capa
#
# * Clear Persistent Reservation (PR) of a SCSI disk
#   (same as done before)
scu
scu> sbtl bus target lun
scu> show keys
scu> preserve clear key 0x8...

 

34. Commands: hwmgr, dsfmgr

#   Information from : "man hwmgr_ops"
#   See: scsimgr for systems in verision 4.x

# * Get/Show all disks and path_state plus transfer bytes
hwmgr -get attr current -cat disk | grep -E "dev_base_name|path_state|path_xfer"

# * Get/Show components in state: "no good" (only for v5.1B)
#   with "hwmgr -v" they are mapped with an 'X'
hwmgr status component -ngood

# * Remove state "no good" from a component (you need to hnow hwid first)
hwmgr unindict -id 2

# * Remove all componets that are no more configured (removed componets)
hwmgr refresh component

# * Remove all path stale from scsi disks (speedup boot)
hwmgr refresh scsi -all

# * Get/Show all disks and paths
hwmgr show scsi -type disk

# * Scan bus scsi
#   Change "#N" with bus number (ex. 8) if you want to scan a specific BUS
#   (usefull to perform a scan without impact to other location - tape in primis)
hwmgr -scan scsi [-bus #N]

# * Get/see fiber adapter topology
hwmgr -sho fibre
hwmgr -sho fibre -adapter -topology

# * Remove a component (ex. disco)
#   change "#N" with hwid (ex. 121)
hwmgr -delete component -id #N

# Not documented: remove hwid (valid for devices: tape, disk and scp)
dsfmgr -Z rm_hwid #N 0
dsfmgr -R hwid #N

# * Make a disk blink for 60 seconds (usefull to locate a disk)
#   66 is the'hwid of a disk (hwmgr show scsi -type disk)
#   (use: "dd if=/dev/rdisk/dskXc of=/dev/null" -> to see a disk blinking)
hwmgr locate component -id 66 -time 60

# * Get/Show all category
hwmgr get category

# * Get/Show network interfaces: name , speed, link status, negotiation type
hwmgr get attr -cat network -a name -a media_speed -a full_duplex -a link
#  attr -> attribute
#  cat -> category

# * Get/Show network interfaces: name and media type (fiber or UTP)
hwmgr get attr -cat network -a name -a media_type

# * Get/Show platform type/name
hwmgr get attr -cat platform -a name

# * Get/Show cpu type and speed
hwmgr get attr -cat cpu -a sub_category -a speed

# * Resets the device instances for all devices to the lowest possible (not all version)
#   Edit file: "/etc/dfsc.dat" (first rows)
dsfmgr -v -I

 

35. Tunning and performance issues

# * Get/Show CPU lock info and statistics
#   (see manpages)
lockinfo -percpu sleep 60 | more
sched_stat sleep 60 | more

# * Get/Show network statistics
echo p tcbhashstats | dbx -k /vmunix /dev/mem
netstat -s
netstat -p tcp
netstat -p udp
netstat -p ip
netstat -i -d 1
netstat -m
sysconfig -q socket # drop_packets ?

# * Cpu information
#   (if file: wtmp is big it is slow ...)
pset_info

# * RAD Information statistics
sched_stat
vmstat -R

# * process RAD e NUMA information
ps -ef -o pid,c,cputime,pcpu,user,longtname,nswap,RAD,state,command
ps -ef -o pid,c,cputime,pcpu,user,longtname,nswap,state,command
ps -ef -o NUMA

# * Marvel (GS1280) NUMA cpu
sysconfig -c marvel_pfm
export DISPLAY=host:0.
xmesh
sysconfig -u marvel_pfm

# * I/O on disks
hwmgr -v d -type disk
dd if=/dev/rdisk/dsk60c of=/dev/null bs=64k &
hwmgr -get attr -id 357 | grep xfer

# * Performance and statistics of disks
#   (for AdvFS si relative section)

# * Get/Show read/write in bytes to disk
drdmgr dsk0
drdmgr -F raw dsk0

# * csfmgr
cfsmgr -a statistics

# * Particular mount options (too speedup)
mount -o delayed -o noatimes /dev/disk/dsk3c /tmp_files
# (see: "man mount")
# delayed  -> Delays synchronously flushing metadata updates to disk
# noatimes -> Marks file access time changes made for reads of regular files
#             in memory, but does not flush them to disk until other file
#             modification occur.

# * Device timedev (Tru64)
#   Execute the following command in all cluster members
#   will speedup gettimeofday() call - so Oracle

mknod /dev/timedev c 15 0
chmod ugo+r /dev/timedev

# * gettimeofday() with microtime resolution
#   You must rebuild your kernel
options         MICRO_TIME

 

36. Quota filesystem

quotacheck -guv cluster_usr#usr

# Unaligned Access Message Control
uac

 

37. Striping

# Binary Stripping (to reduce text sixe)
# * Object Strip
/usr/ucb/ostrip

# Max strip (-z compres, but binary "slowe")
/usr/ucb/ostrip -gmcsxz /bin/ls # (on 4.0 does not work - use strip)
# (-g not useful)

# * Exe Strip
strip

# * Manipulates object file comment sections
mcs -pv /bin/ls
mcs -d -t TAGDESC /bin/ls

- Show hour:minuteseconds of a file (ls can't do this)
perl -e 'foreach(@ARGV){$t =localtime ( ( ( stat ( $_ ) ) [9] ) ); printf("%-20s%s\n",$_,$t);}' *

 

38. RMC: console environment; boot variables

# * Get/Show serial number
consvar -g sys_serial_num

SYS=$(echo "pd rpb->rpb_ssn;quit" | dbx -k /vmunix /dev/mem 2>/dev/null | tail -1)
echo "Serial Number = $SYS"

# * Booted kernel
sizer -b

# * Boot disk
consvar -g bootdef_dev
consvar -g bootded_dev

# * Firmware level
consvar -g version | cut -f2 -d'=' | awk '{print $1}'
#   With "-v" it is more verbose
consvar -v -g version

# * "All" variables
consvar -v -l

# * Network adapters mode
#   Adapters [tu DE500]: ewa0 -> tu0 ewb0 -> tu1
#   DE500 must be configured in FastFD (also at switch level - port)
consvar -g ewa0_mode

#   Adapters DE600 etc. must be configured at auto (autonegotiatio)
consvar -g eia0_mode
consvar -g ega0_mode

# * Boot parametrs
sysconfig -q bparm

# * Set RMC boot variable (it will be in memory: volatile)
consvar -s variable value

# * Save all values in eprom (non-volatile)
consvar -a

 

39. Memory test: for Alpha 8400 – 4100

Quote:
>>> test ms7cc*

# * Memeory test
Quote:
>>> set mode adv
>>> set SIMM_CALLOUT on
>>> init

# * ESCAPE
Quote:
>>> [ESC][ESC]rmc -> GS40
>>> [ESC][ESC]scm -> GS320
>>> [ESC][ESC]MBM -> GS1280 (Marvel)


# * wwidmgr (Get/Set fiber channel disks)
Quote:
>>> set mode diag
>>> init


#   * Get/Show connected disks
Quote:
>>> wwidmgr -sho dev -full


#   * Get/Show fiber channel adapters (ex. emx)
Quote:
>>> wwidmgr -sho ada -full

#
#   * Set a disk to be a boot disk
#     UDID taken form: "-sho dev"
Quote:
>>> wwidmgr -quickset -udid #N


#   * Reset Nvram (you need this when you change a fiber adapter)
Quote:
>>> wwidmgr -set ada -item 9999

 

40. Trace

# * Trace of a process
PID="1234"
trace_v51.exe -P -f -T -b 16384 -s 16384 -p ${PID} 2>&1 | tee /tmp/trace_${PID}.logReply Edit Delete Attach ToDo Report  By rh77408 (Before you ask, the answer is "no") Date 2016-06-28 15:35Tru64 license details: (or licence if you are US based)

/usr/sbin/lmf list full
           Product Name: ADVFS-UTILITIES
               Producer: DEC
                 Issuer: DEC

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments