Monday, August 9, 2010

Adding timestamp for each line in nohup.out

http://blogs.sun.com/LetTheSunShineIn/entry/adding_timestamp_for_each_line

Saturday, August 7, 2010

To configure the newly added LUNS on RHEL:

To configure the newly added LUNS on RHEL:


# ls /sys/class/fc_host

host0 host1 host2 host3

fdisk -l 2>/dev/null | egrep '^Disk' | egrep -v 'dm-' | wc -l

echo "1" > /sys/class/fc_host/host0/issue_lip

echo "- - -" > /sys/class/scsi_host/host0/scan

echo "1" > /sys/class/fc_host/host1/issue_lip

echo "- - -" > /sys/class/scsi_host/host1/scan

echo "1" > /sys/class/fc_host/host2/issue_lip

echo "- - -" > /sys/class/scsi_host/host2/scan

echo "1" > /sys/class/fc_host/host3/issue_lip

echo "- - -" > /sys/class/scsi_host/host3/scan

cat /proc/scsi/scsi | egrep -i 'Host:' | wc -l

fdisk -l 2>/dev/null | egrep '^Disk' | egrep -v 'dm-' | wc -l


Alternatively, we can
run the re-scan-scsi script.

To scan new LUNs on Linux operating system which is using QLogic driver

You need to find out driver proc file /proc/scsi/qlaXXX.

For example on my system it is /proc/scsi/qla2300/0

Once file is identified you need to type following command (login as the root):



# echo "scsi-qlascan" > /proc/scsi/qla2300/0
# cat /proc/scsi/qla2300/0


Now use the script rescan-scsi-bus.sh new LUN as a device. Run script as follows:



# ./rescan-scsi-bus.sh -l -w


The output of ls -l /sys/block/*/device should give you an idea about how each device is connected to the system.


Thanks & Reference: http://lazysystemadmin.blogspot.com/2010/06/scan-and-configure-new-luns-on-redhat.html

Thursday, June 3, 2010

HP-UX : Processors and Core

Number of Processors:
#top
#ioscan -Cprocessor

To find out the core:
#echo "selclass qualifier cpu;info;wait;il" | cstm

Wednesday, May 26, 2010

HP-UX: Booting from an alternate kernel

HP-UX: Booting from an alternate kernel

Press a key, while PDC is waiting for the 10 seconds manual overide.

Autosearch for boot path enabled

To override, press any key with 10 seconds.


Boot from primary boot path (Y or N)?> N
Boot from alternate boot path (Y or N)?> N
Enter boot path, comman, or ?>

console>boot
Interact with IPL (Y or N)?>Y

Booting...
Boot IO Dependent Code (IODC) revision 4

Hard Booted

ISL Revision A.00.38 Oct 26, 1994

ISL>hpux boot disk()/stand/vmunix.prev

Thursday, May 6, 2010

ISSUE: Veritas file system mount issue

ISSUE: file system mount issue

STATUS:
- found disks failed in "vxdisk list"

- - rootdg03 rootdg failed was:c4t0d3s2
- - oracled09 oracledg failed was:c3t1d0s2
- - oracled10 oracledg failed was:c4t0d1s2
- - oracled11 oracledg failed was:c4t0d2s2
- - oracled12 oracledg failed was:c4t0d4s2

- found disks not available in "format" too

12. c4t0d0
/pci@6,4000/fibre-channel@4/sd@0,0
13. c4t0d1
/pci@6,4000/fibre-channel@4/sd@0,1
/pci@6,4000/fibre-channel@3/sd@0,1
18. c5t1d0
/pci@6,4000/fibre-channel@3/sd@1,0
19. c5t1d1
/pci@6,4000/fibre-channel@3/sd@1,1

- found volumes in recover states, recovered the volumes using below commands.

vxmend -g dg -o force off plex
vxmend -g dg on plex
vxmend -g dg fix clean plex
vxvol -g dg start vol

- fsck and mounted the volumes, its working fine
- to fix issue with stale entries for dmp and disks, went for device tree cleanup with reconfiguration reboot

Wednesday, April 28, 2010

Account is disabled – see Account Administrator

This time is a tip to enable a user account if your system uses password aging or the user was locked out due to the unsuccessful login attempts.

login: user
Password:
Account is disabled – see Account Administrator

To enable a locked or disabled HP-UX account, run the command:

/usr/lbin/modprpw -l -k

Monday, April 19, 2010

20 Linux System Monitoring Tools Every SysAdmin Should Know

http://www.cyberciti.biz/tips/top-linux-monitoring-tools.html