Thursday, July 18, 2013

AIX Print Commands


AIX Print commands

qchk -q               To display the default q
qchk -P lp0         To display the status of the printer lp0
qchk -# 123        To display the status of job number 123
qchk -A              To display the status of all queues
qcan -x 123         To cancel the print job 123
qcan -X -P lp0     To cancel all jobs submitted to lp0
qpri -#570 -a 25  To change the priority of the job to 25
qhld # 569           To hold the job 569
qhld -r -#569        To remove holding from 569
qmov -m lpa -#11  To move the job 11 to queue lpa
enable psq             To enable queue psq
disable psq           To disable queue psq
cancel -#111         To cancel job 111
lpstat                   To display the status all queues
lpstat -p lp0         To display the status of print queue lp0
lpstat -u root         To display the jobs submitted by user root
lpq -P lp0              To display the status of queue lp0
last                     To list all the records in the /var/adm/wtmp file
last |grep shutdown     To show the shutdown sessions
uptime (w -u )         To show how long the system has been up

Sunday, June 2, 2013

Stopping HACMP cluster services without stopping applications

You can stop cluster services without stopping services and applications.
To stop cluster services without stopping your applications:
  1. Enter the fastpath smit cl_admin or smitty hacmp.
  2. Select System Management (C-SPOC) and press Enter.
  3. Select Manage HACMP Services > Stop Cluster Services and press Enter.
  4. Choose Unmanage resource groups.
No matter what type of resource group you have, if you stop cluster services on the node on which this group is active and do not stop the application that belongs to the resource group, HACMP puts the group into an UNMANAGED state and keeps the application running according to your request.
The resource group that contains the application remains in the UNMANAGED state (until you tell HACMP to start managing it again) and the application continues to run. While in this condition, HACMP and the RSCT services continue to run, providing services to ECM VGs that the application servers may be using.
You can tell HACMP to start managing it again either by restarting Cluster Services on the node, or by using SMIT to move the resource group to a node that is actively managing its resource groups. See Starting HACMP cluster services with manually managed resource groups for more information.
If you have instances of replicated resource groups using the Extended Distance capabilities of the HACMP/XD product, the UNMANAGED SECONDARY state is used for resource groups that were previously in the ONLINE SECONDARY state.
You can view the new states of the resource groups using the cluster utilities clstat and clRGinfo .
You cannot dynamically reconfigure (DARE) the cluster configuration while some cluster nodes have resource groups in the unmanaged state.
Warning about placing resource groups in an unmanaged state
When you stop cluster services on a node and place resource groups in an UNMANAGED state, HACMP stops managing the resources on that node. HACMP will not react to the individual resource failures, application failures, or even if the node crashes.
Because the resources of a system are not highly available when you place resource groups in an unmanaged state, HACMP prints a message periodically that the node has suspended managing the resources.
The ability to stop a node and place resource groups in an UNMANAGED state is intended for use during brief intervals for applying updates or for maintenance of the cluster hardware or software.
When you may want to stop HACMP cluster services without stopping applications
When you may want to stop HACMP cluster services without stopping applications
In general, HACMP cluster services are rarely the cause of problems in your configuration. However, you may still want to stop HACMP cluster services on one or more nodes, for example, while troubleshooting a problem or performing maintenance work on a node.
Also, you may want to stop HACMP cluster services from running without disrupting your application if you expect that your activities will interrupt or stop applications or services. During this period of time, you do not want HACMP to react to any planned application "failures" and cause a resource group to move to another node. Therefore, you may want to remove HACMP temporarily from the picture.

Friday, August 20, 2010

Command to delete file by inode number

To find the inode number:

$ ls -il

Output:
781956 drwx------  3 viv viv 4096 2006-01-27 15:05 gconfd-viv
781964 drwx------ 2 viv viv 4096 2006-01-27 15:05 keyring-pKracm
782049 srwxr-xr-x 1 viv viv 0 2006-01-27 15:05 mapping-viv
781939 drwx------ 2 viv viv 4096 2006-01-27 15:31 orbit-viv
781922 drwx------ 2 viv viv 4096 2006-01-27 15:05 ssh-cnaOtj4013
Command to delete file by inode number:

$ find . -inum 781922 -exec rm -i {} \;

Sunday, August 15, 2010

Solaris Run Level

Default Solaris Run Level

  • init S : Single user state (useful for recovery)
  • init 0 : Access Sun Firmware ( ok> prompt)
  • init 1 : System administrator mode
  • init 2 : Multi-user w/o NFS
  • init 3 : Multi-user with NFS
  • init 4 : Unused
  • init 5 : Completely shutdown the host (like performing a power-off @ OBP) [ thanks to Marco ]
  • init 6 : Reboot but depend upon initdefault entry in /etc/inittab

To find out current runlevel use who command:

$ who -r

Wednesday, August 4, 2010

To add a new disk and migrate the new disk and remove old

There are many ways to do. I have preferred this way.
  • cfgmgr
  • extendvg vgname newdisk
  • mirrorvg vgname newdisk
  • unmirrorvg vgname olddisk
  • reducevg vgname olddisk
  • rmdev –Rdl olddisk
Other way
  • cfgmgr
  • extendvg vgname newdisk
  • migratepv olddisk newdisk
  • rmdev –Rdl olddisk

Monday, August 2, 2010

JFS2 MAJOR MINOR DEVICE NUMBER

errpt command show the error message complaining about filesystem is full (df command shows some 10 filesystems is being 100% used). . The detailed report gives the major/minor device number: 000A 000F.

The characters: 000A 000F on the message are hexadecimal numbers. convert them to decimal numbers( 10 and 15) respectively. So, go to directory /dev and issue the command:

For instance,

#cd /dev
#ls -al | grep 10, 15

crw-rw---- 1 root system 10, 15 Apr 22 08:27 rtemplv
brw-rw---- 1 root system 10, 15 Apr 22 08:27 templv


Look on the 5th and 6th columns for an entry such as: 10, 15 and that will be the device with the issue

From this we can come to know which filesystem is full.


Questions and suggestions are welcome. Thanks


Monday, July 26, 2010

Procedure to grow the veritas filesystem in solaris Environment

1. Once the LUN is added, we need to configure the new LUN

devfsadm –c disk (will configure the new LUN)
then label the disk by executing the command format, it will prompt to label the disk (enter yes)

2. Once the disk is configured we have to initialize the disk in veritas

vxdisksetup –i diskname
for eg. vxdisksetup –i c0t1234567888d94

3. Now add the disk to the diskgroup in veritas

vxdg –g dgname adddisk mediaaccessname=diskname
for eg. vxdg –g oradg adddisk ora001=c0t1234567888d94

4. To grow the filesystem

vxresize –g dgname volumename size mediaaccessname.
for eg. vxresize –g oradg oravol +100M ora001

Questions and suggestions are welcome. Thanks