Tuesday, September 14, 2010

Send documents to this blog


Send documents to this blog


Hi AIX learner,

Thanks for visiting my blog... this is my small blog and this may helpful to AIX learners. Most of the posts in this blog are came from my little work experience as AIX administrator. 

For sharing better knowledge i wish to say everyone that please send good Documents or your experience in AIX to this e-mail id

praveenk.aix.4world ( at ) blogger.com


The E-mail send by you will be posted in this blog after review.
You can send text and images up to 10MB in size (No attachments).
please do not send any copy righted documents.

This blog is for you...

Now it's by you... be a part of it...



BEST WISHES...



Praveen K




Feel free to inform me about blog content and suggest how can we improve this blog by sending e-mail to

praveenk.aix.4world ( at ) blogger.com

and this information will not be published.

Thanks...





**************

Saturday, February 20, 2010

Useful tips in AIX

USEFUL TIPS IN AIX

AIX USEFUL TIPS



ls -l /home | sort -rn        This displays files and directoris inside /home as per their size, larger file on top.

ls -l /home/* sort -rn        This displays files and also the subdirectories in the /home/ directories as per their size, larger one on top.

Note:  If /home dir. contains more than one dir. then it first shows all the directiory name and then the files inside the directories as per the directory order. The order is symlink, Directory name, file name.

du /home | sort -rn          This also displays the subdirectories inside /home as per their size but not files.

du -m /home/test/smit.log     This shows the size of the smit.log in MB. 
-g=GB, -k=KB, without flag=shows in Block size.


ls -lrt | grep 'Jan 10' | awk '{print$9}' > namefile          This is used to get only the file names dated Jan 2010 in a namefile

rm `cat namefile`           To delete filenames mentioned in the namefile created by the above command.


To execute a command in a loop, i.e. in a certain intervals, put the small script in the shell

while i=
do
df -g /backup
sleep 3
done

in the above example this will show the size of /backup filesystem in each 3 seconds interval.


stty erase ^?       To use backspace button to clear previous letters.

set -o vi      To see previous executed commands using vi style
i.e. esc+ j=up, h=down, l=go right, g=go left, /string= search the command from history,












**********

Wednesday, January 20, 2010

NIM related Commands in AIX



AIX NIM Commands


lsnim     To list the nim resources

lsnim -l  dcmds     To list the detailed info about the object dcmds


lsnim -O dcmds     To list the operation dcmds object can support


lsnim -c resources dcmds   To list the resources allocated to the machine dcmds


nimclient    The client version of nim command (User can obtain same results of nim in server ) 

nimconfig -a pif_name=en0 -a netname=net1    To initialise the NIM master with network name net1

nimconfig -r    To rebuild /etc/niminfo file which contains the variables for NIM

nim -o define  -t  lpp_source  -a  source=/dev/cd0  -a  server=master  -a  location=/export/lpp_source/lpp_source1   lpp_source1   
  To define  lpp_source1 image in /export/lpp_source/lpp_source directory from source cd0

nim -o define -t mksysb -a server=master  -a location=/resources/mksysb.image mksysb1    To define mksysb resource mksysb1, from source /resources/mksysb.image on master 


nim -o remove inst_resource    To remove the resource inst_resource 

nim -o check lpp_source1   To check the status of  lpp_source lpp_source1


nim -o allocate -a spot=spot1 -a lpp_source=lpp_source1 node1   To allocate the resources spot1 and lpp_source1 to the client node1


nim -o bos_inst node1   To initialise NIM for the BOS installation on node1 with the allocated resources

nim  -o dkls_init dcmds  To initialize the machine dcmds as diskless operation 

nim -o dtls_init dcmds   To initialize the machine dcmds for dataless operation 

nim -o cust dcmds    To initialize the machine dcmds for customize operation 

nim -o diag dcmds    To initialize the machine dcmds for diag operation 

nim -o maint dcmds    To initialize the machine dcmds for maintenance operation 

nim -o define -t standalone -a platform=rspc -a if1="net1 dcmds xxxxx" -a cable_type1=bnc dcmds    To define the machine dcmds as standalone with platform as rspc and network as net1 with cable type bnc and mac address xxxxx 

nim -o unconfig master    To unconfigure nim master 

nim -o allocate -a spot=spot1 dcmds  To allocate the resource spot1 from machine dcmds 

nim -o deallocate -a spot=spot1 dcmds   To de allocate the resource spot1 from machine dcmds

nim -o remove dcmds   To remove machine dcmds after removing all resources associated to it


nim -o reboot dcmds   To reboot ther client dcmds


nim -o define -t lpp_source -a location=/software/lpp1 -a server=master -a source=/dev/cd0 lpp1    To define lppsource lpp1 on master at /software/lpp1 directory from source device /dev/cd0





********************







Monday, December 21, 2009

Useful HACMP Commands

Advanced HACMP Commands
 


clstart -m -s -b -i -l           To start cluster daemons (m-clstrmgr, s-clsmuxpd, b-broadcast message, -i-clinfo, -l cllockd)

clstop -f -N           To force shutdown cluster immediately without releasing resources


clstop -g -N            To do graceful shutdown immediately with no takeover


clstop -gr -N            To do graceful shutdown immediately with takeover 


cldare  -t                To sync the cluster toplogy 

cldare -t -f            To do the mock sync of topology

cldare -r                To sync the cluster resources


cldare -r -f            To do the mock sync of resources
 

clverify                cluster verification utility

cllscf                To list clustur topology information

cllsclstr                To list the name and security level of the cluster


cllsnode                To list the info about the cluster nodes


cllsnode -i node1            To list info about node1


cllsdisk -g shrg            To list the PVID of the shared hard disk for resource group shrg


cllsnw                To list all cluster networks
 

cllsnw -n ether1            To list the details of network ether1

cllsif                To list the details by network adapter


cllsif -n node1_service        To list the details of network adapter node1_service


cllsvg                To list the shared vgs which can be accessed by all nodes


cllsvg -g sh1            To list the shared vgs in resource group sh1


cllslv                 To list the shared lvs


cllslv -g sh1            To list the shared lvs in the resource group sh1


cllsdisk -g sh1            To list the PVID of disks in  the resource group sh1


cllsfs                To list the shared  file systems


cllsfs -g sh1            To list the shared file systems in the resource group sh1


cllsnim                Show info about all network modules


cllsnim -n ether            Show info about ether network module


cllsparam -n node1        To list the runtime parameters for the node node1


cllsserv                To list all the application servers


claddclstr -i 3 -n dcm         To add a cluster definition with name dcm and id 3


claddnode             To add an adapter


claddnim            To add network interface module


claddgrp -g sh1 -r cascading -n n1 n2       To create resource group sh1 with nodes n1,n2 in cascade


claddserv -s ser1 -b /usr/start -e /usr/stop       Creates an application server ser1 with startscript as /usr/start and stop script as /usr/stop



clchclstr -i 2 -n dcmds          To change cluster definitions name to dcmds and id to 2


clchclstr -s enhanced        To change the clustur security to enhanced



clchnode            To change the adapter parameters

clchgrp                To change the resource group name or node relationship


clchparam            To change the run time parameters (like verbose logging)


clchserv                To change the name of app. server or change the start/end scripts


clrmclstr                To remove the cluster definition

clrmgrp -g sh1            To delete the resource group sh1 and related resources


clrmnim    ether            To remove the network interface module ether


clrmnode -n node1        To remove the node node1


clrmnode -a node1_svc        To remove the adapter named node1_svc


clrmres -g sh1            To remove all resources from resource group sh1


clrmserv  app1            To remove the application server app1


clrmserv ALL            To remove all applicaion servers


clgetactivenodes -n node1        To list the nodes with active cluster manager processes from cluster manager on node node1


clgetaddr node1            returns a pingable address from node node1


clgetgrp -g sh1            To list the info about resource group sh1


clgetgrp -g sh1 -f nodes        To list the participating nodes in the resource group sh1


clgetif                To list interface name/interface device name/netmask associated with a specified ip label / ip address of a specific node


clgetip sh1            To get the ip label associated to the resource group

clgetnet 193.9.200.2  255.255.255.0     To list the network for ip 193.9.200.2, netmask 255.255.255.0

clgetvg -l nodelv            To list the VG of LV nodelv


cllistlogs            To list the logs


clnodename -a node5           To add node5 to the cluster


clnodename -o node5 -n node3       To change the cluster node name node5 to node3


clshowres            Lists resources defined for all resource group


clfindres                To find the resource group within a cluster


xclconfig             X utility for cluster configuration


xhacmpm            X utility for hacmp management


xclstat                X utility for cluster status



HACMP LOGS

=========

/tmp/hacmp.out        Detailed event script output logged in 7 day rolling history


/var/adm/cluster.log      High level view of cluster events (No clean up on this file)


/usr/sbin/cluster/history/cluster.mmdd    Day by day view of cluster events. (one file / day of month)


/tmp/cm.log        Clstrmgr messages


/tmp/cspoc.log           Output from C-SPOC commands (similar to smit.log)


/tmp/emuhacmp.out    Output from event emulation


rdist  -b -f  /etc/disfile1       To distribute the files in disfile1 to all nodes in disfile1 in binary mode

Sample entry for disfile1
 
            HOSTS = ( root@node1 root@node3 )
            FILES = ( /etc/passwd /etc/security/passwd)
            ${FILES} -> ${HOSTS}
 

/usr/es/sbin/cluster/utility/*   (All commands)



***************

Friday, December 4, 2009

Useful TIVOLI Commands



USEFUL TIVOLI COMMANDS

q sess   To see currently working sessions

can sess  ( sess no)  To cancel a session

q eve domainname schedulename    To see schedule time,nodename, scgedule name and progress of the scheeduled backup. ( q eve * * to see all scheduled backups)

q proc    To see currently running background processes


cancel process (process no)    To cancel a process

q node   To view assigned nodes in a Tivoli server 


q filespace   To check backup space utilized for each file system of a server, filesystem type...


q actlog  To view activity log


q act begind=mm/dd/yyyy begint=hh:mm:ss  endd=mm/dd/yyyy endt=hh:mm:ss     To view activity log for a specified period by begining date and end date


q act begind=today-1 begint=00:00   To view activity log from yesterday 12:00 am


q act search=transferred begint=00:00   To see all completed backup size of servers from 12:00 am


q act search=nodename     To view activity log for a node

q drive f=d   To get detailed report of drive, it's status ... 

q library f=d    To get detailed information about tape library 

q libvol    To see volumes in the tape library and it's status


q vol   To see volumes and it's storage pool name, capacity, status 

q req     To see requests 

reply (request no)  To continue request 

q sched     To show schedule name domain, action , start date & time 

q sched f=d   To show detailed report about schedules including schedule backup path

UPDATE LIBVOLUME TS3200 L41117L4  STATUS=SCRATCH    To change a library volume ( L41117L4 ) status to scratch from private 

update node nodename "admin" domain=domainname forcepwreset=Yes    To change a tivoli login password of a node

define vol storagepoolname L41116L4    Add new tape L41116L4 to a storagepool


delete volume L41116L4 discarddata=yes    To delete data inside a tape media L41116L4


To create a new schedule backup (incremental ) for a node
======================================== 

UPDATE SCHEDULE domainname nodename desc="daily incremental backup for a server" action=Incremental options=-subdir=yes objects=""/fs1/*" "/fs2/*" "/home/user1/*"" priority=5 startdate=mm/dd/yyyy starttime=hh:mm duration=1 duru=Hou period=1 perunits=Day dayofweek=Any expiration=never

To start tivoli services in an AIX client
========================

#cd /usr/tivoli/tsm/client/ba/bin

nohup dsmc sched &     To start scheduled backup service


nohup dsmcad &   To start BA client ( webmode backup i.e. http://ip.address.of.server>:1581)



#cd /usr/tivoli/tsm/StorageAgent/bin

nohup ./dsmsta &        To start storage agent ( LANFREE BACKUP= backup directly from SAN to Tape library ) 

#ps -ef | grep dsm     To view currently running Tivoli services in server


To update drive status of a server to online
==============================
update path sourceservername TAPE0 srct=server destt=drive libr=ts3200 online=yes
 


To set serial number of a drive in tape library
==============================

UPDATE DRIVE TS3200 TAPE0 ELEMENT=autodetect ONLINE=Yes WWN="2002000E11107B6C" SERIAL=autodetect


To detect label of a tape in tape library
==========================

label libvol t3200 checkin=scratch labelsource=barcode search=bulk waittime=0
 


To remove tape media from tape library
===========================

checkout libvol ts3200 VOLLIST=A00015L3,A00019L3 CHECKLABEL=YES REMOVE=YES


To add and label new tapes into library
===========================


LABEL libvol TS3200 search=yes labelsource=barcode overwrite=NO checkin=SCRATCH WAITTIME=0
 


To take full backup of Tivoli database manually to a file in local disk

=============================================

backup db dev=FILECLASS type=full


to assign a tape drive to a server
=======================

UPDATE PATH servername TAPE0 SRCTYPE=SERVER DESTTYPE=DRIVE LIBRARY=TS3200 DEVICE=\\.\Tape0 ONLINE=YES AUTODETECT=no




Important
=======


If you are not able to take backup through any of Tivoli backup methods ( BA client, dsmc , schedule ) then check any NFS mounted filesystems are there in the server and that server is available or not. If that server is not powered on, either unmount the NFS filesyatem or make that server available...



****************




There was an error in this gadget