Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (11) AWS (5) numerology (5)

Thursday, August 28, 2014

Reason: password lifetime has passed + HPUX

Error:

#password

Password cannot be changed. Reason: password lifetime has passed.



Solution:


1. check the lockout condition for that user by command #/usr/lbin/getprpw

lockout=1001000

The position, left to right represents:

1 past password lifetime

2 past last login time (inactive account)

3 past absolute account lifetime

4 exceeded unsuccessful login attempts

5 password required and a null password

6 admin lock

7 password is a *


2. To reset the password age to zero

# /usr/lbin/modprpw -v {username}


3. Then unlock the user account

# /usr/lbin/modprpw -k {username}

or #/usr/lbin/modprpw -m alock=no -k username


4. If the problem persist then check the /tcb/files... for a particular user. May be it has been corrupted.

so manually edit the password there.


Thanks...
Kiran Jadhaw

**Let's Share our knowledge and keep visiting here**

Wednesday, August 27, 2014

Run 'scsimgr replace_wwid' command + HPUX

Run 'scsimgr replace_wwid' command + HPUX

Error:

class : lunpath, instance 269
Evpd inquiry page 83h/80h failed or the current page 83h/80h data do not match the previous known page 83h/80h data on LUN id 0x0 probed beneath the target path (class = tgtpath, instance = 12) The lun path is (class = lunpath, instance 269).Run 'scsimgr replace_wwid' command to validate the change

Solution:

If we see above error in #dmesg then

1. #scsimgr -f replace_wwid -C lunpath -I 269

Binding of LUN path with new LUN validated successfully

2. Scan the disk again so new id which was assigned to the disk, will get reflacted.

    #ioscan –fnNC disk    

     -N displays output using the agile view instead of legacy view

3. #insf -e -C disk

4. #dmesg


Thanks...
Kiran Jaddhav

Wednesday, August 20, 2014

root file system is 100% + HPUX

My root file system is 100%

1. First thing to do is look for core files:

  # find / -name core

2. Then check for mistakes in the /dev directory (usually caused by someone       mistyping a device name:

  /dev/rmt/Omn instead of /dev/rmt/0mn, for example)


3.1) # find / -xdev -size +10000 -exec ll {} \; > /tmp/hugefiles

    It will give you a list of all big files ( >10000) under root.

3.2) 10 largest directories in the root filesystem:

    $ du -kx / | sort -rn -k1 | head -n 10

3.3) 10 largest files in the root filesystem:

     $ find / -type f -xdev -print | xargs -e ll | sort -rn -k5 | head -n 10

3.4)  Recently modified files in the root filesystem:

     $ find / -type f -xdev -mtime -1 -print | xargs ll | sort -rn -k5

4.  If we run any LVM commands then it will change the VG configuration files     under /etc/lvmconf

5.  check your crontab if any script running and writing somewhere under /

7.  Run cleanup -F

8. There is nothing special about this file. It’s a sequential text file.
    /root/dead.letter if it is there we can trim it.




Thanks...
Kiran Jadhav


**Let's Share our knowledge and keep visiting here**

vxfs fsadm error + HPUX

If you get this error while extending FS

Error:   vxfs fsadm: attempt to resize /dev/vg01/opt_oracle failed with errno 28



Ans: Here issue is that the mount point is 100% full. 

fsadm does not work well if there is no space left on the device. We have to figure out some way to free up some space temporarily, by moving some files to another mount point or removing some files.



Thanks...
Kiran Jadhav

**Let's Share our knowledge and keep visiting here**


Thursday, August 14, 2014

Vi commands + HPUX

Vi commands:

To use vi - vi filename
To exit vi and save changes: ZZ   or  :wq
To exit vi without saving changes -  :q!
To enter vi command mode: [esc]
saves the current file without quitting - :w
        : /kiran --> will search kiran in vi file


Cursor Movement

h       move left (backspace)

j       move down

k       move up

l       move right (spacebar)

[return]   move to the beginning of the next line

$       last column on the current line

0       move cursor to the first column on the
current line

^       move cursor to first nonblank column on the
current line

w       move to the beginning of the next word or
punctuation mark

W       move past the next space

b       move to the beginning of the previous word
or punctuation mark

B       move to the beginning of the previous word,
ignores punctuation

        e       end of next word or punctuation mark

        E       end of next word, ignoring punctuation

        H       move cursor to the top of the screen

        M       move cursor to the middle of the screen

        L       move cursor to the bottom of the screen




Screen Movement

       G        move to the last line in the file

       xG       move to line x

       z+       move current line to top of screen

       z        move current line to the middle of screen

       z-       move current line to the bottom of screen

       ^F       move forward one screen

       ^B       move backward one line

       ^D       move forward one half screen

       ^U       move backward one half screen

        A     end of the line


Inserting

       r        replace character under cursor with next
character typed

       R        keep replacing character until [esc] is hit

       i        insert before cursor

       a        append after cursor

       A        append at end of line

       O        open line above cursor and enter append mode


Deleting

x       delete character under cursor

dd      delete line under cursor

        dw      delete word under cursor

        db      delete word before cursor




Copying Code

        yy      (yank)'copies' line which may then be put by
the p(put) command. Precede with a count for
multiple lines.




Put Command
        brings back previous deletion or yank of lines,
words, or characters

        P       bring back before cursor

        p       bring back after cursor



 Find Commands

?       finds a word going backwards

/       finds a word going forwards

        f       finds a character on the line under the
cursor going forward

        F       finds a character on the line under the
cursor going backwards

        t       find a character on the current line going
forward and stop one character before it

T       find a character on the current line going
backward and stop one character before it

; repeat last f, F, t, T




Miscellaneous Commands

. repeat last command

u undoes last command issued

U undoes all commands on one line

xp deletes first character and inserts after
second (swap)

J join current line with the next line

^G display current line number

% if at one parenthesis, will jump to its mate

mx mark current line with character x

'x find line marked with character x

NOTE: Marks are internal and not written to the file.


Line Editor Mode
Any commands form the line editor ex can be issued
upon entering line mode.

To enter: type ':'

To exit: press[return] or [esc]




New FS creation + HPUX

New FS creation + HPUX

Here we are creating a new FS  of name /oracle/BMW/sapdata01 of 32 GB in existing VG vg02

1. Create a logical volume

#lvcreate -L  -n [LV Name] [VG Name]

#lvcreate -L 32768 /dev/vg02



2. Create new FS metadata structure


#newfs -F vxfs 
-o largefiles [raw LV Name]

#newfs -F vxfs -o largefiles /dev/vg02/rlvol1


3. Edit the /etc/fstab file


#vi /etc/fstab


/dev/vg02/lvol01 /oracle/BMW/sapdata01 vxfs log,nodatainlog,largefiles,rw,suid 0 2


4. #mount -a




Thanks...
Kiran Jadhav


**Let's Share our knowledge and keep visiting here**



Wednesday, August 13, 2014

Account is disabled - see Account Administrator + hpux

Account is disabled - see Account Administrator + hpux

Check the lockout condition:
/usr/lbin/getprpw kjadhav

lockout=0000001
The position, left to right represents:

1 past password lifetime
2 past last login time (inactive account)
3 past absolute account lifetime
4 exceeded unsuccessful login attempts
5 password required and a null password
6 admin lock
7 password is a *

To enable account
/usr/lbin/modprpw –k kjadhav
To change lockout condition
#######################################
To put admin lock:
condition: lockout=0000010

/usr/lbin/modprpw -l -m alock=YES kjadhav
-m :modify
-l:local user

It will put admin lock and user will be in deactivated state.


Thanks...
Kiran Babu Jadhav

**Let's Share our knowledge**

Wednesday, August 6, 2014

Easy Commands + AIX

Easy Commands + AIX:

1) Commands to get WWN number of HBA:

test1 #lsdev |grep fcs
fcs0         Available 05-08         FC Adapter
fcs1         Available 06-08         FC Adapter
fcs2         Available 09-08         FC Adapter

test1#lscfg -vl fcs0 |grep Network
        Network Address.............10000000C95C5AA9

test1#lscfg -vl fcs2 |grep Network
        Network Address.............10000000C9584830

test1#lscfg -vl fcs1 |grep Network
        Network Address.............10000000C95C79C4     

2)  Command to use previous root password:

test#chuser histexpire=0 histsize=0 root

histexpire Specifies the number of weeks that a user cannot reuse a password. (between 0 and 260 weeks). 

histsize Specifies the number of previous passwords that the user cannot reuse. (between 0 and 50). 

3) Creates a new user account:

useradd [ -c comment ] [ -d dir ] [ -e expire ] [ -g group ] [ -G group1,group2 ... ] [ -m [ -k skel_dir ] ] [ -u uid ] [ -s shell ] [ -r role1,role2 ... ] login


4) 10 largest files under /var directory:

find /var -type f -xdev -print | xargs -e ll | sort -rn -k5 | head -n 10

5) command to find os version

#oslevel

6) command to get server serial number:

# lsconf | grep -e "Machine Serial"

7) Acitivate/deactivate VG

#varyoffvg newvg                    to deactviate VG newvg
#varyonvg newvg                    to activate VG newvg


Thanks...
Kiran Jadhav


**Let's Share our knowledge and keep visiting here**

Tuesday, August 5, 2014

fsadm: You don't have a license to run this program + HPUX

Error:
fsadm: You don't have a license to run this program

1. We encountered this error while extending the FS. If we dont have onlineJFS product installed on the server then we will not be able to extend/reduce FS online.

2. Check  if an Online JFS product is installed:
# swlist -l product | grep -i online

3. If online JFS is installed then:

3.1. /usr/sbin> /usr/sbin/vxlicense –p     


vrts:vxlicense: INFO: Feature name: HP_OnlineJFS [50]
vrts:vxlicense: INFO: Number of licenses: 1 (non-floating)
vrts:vxlicense: INFO: Expiration date: Sun Jun 24 10:00:00 2007 (455.8 days ago)
vrts:vxlicense: INFO: Release Level: 22
vrts:vxlicense: INFO: Machine Class: All
vrts:vxlicense: INFO: Site ID: 0

3.2.  #/usr/sbin/vxlicrep -e; /sbin/fs/vxfs/vxenablef -a

   The first command will query the fsadm license & the second cmd wil activate the license.

3.3.  If the license is expired, as soon as you reboot this system the JFSOnline function will be disabled.


3.4.  Need to request a new codeword and re-install onlinejfs.  Send an email to HP on  'hplicense.na@hp.com'.  They will give you a codeword for OnlineJFS (if you are entitled to it).



Thanks...
Kirraan Jadhav

**Let's Share our knowledge and keep visiting here**

Easy commands + HPUX

Easy commands:

1) Commands to restart sendmail service:

/sbin/init.d/sendmail stop;sleep 10;/sbin/init.d/sendmail start

2) Command to stop sshd:

#ps –ef |grep –i ssh

# kiil –HUP

HUP - Hang UP - it tells daemon to go and reread its configuration file as certain changes have been made which we have to incorporate now. The process doesn't actually stop, it just likes stated, rereads its config file. This is true only for daemon processes. For normal application it hangs-up the terminal.

3) Creates a new user account:

useradd [ -c comment ] [ -d dir ] [ -e expire ] [ -g group ] [ -G group1,group2 ... ] [ -m [ -k skel_dir ] ] [ -u uid ] [ -s shell ] [ -r role1,role2 ... ] login

4) 10 largest files under /var directory:

$ find /var -type f -xdev -print | xargs -e ls -lrt | sort -rn -k5 | head -n 10

5) Top 10 Ten processes consuming high Memory:

echo " SZ PID RUSER COMMAND";UNIX95= ps -ef -o 'sz pid ruser args' |sort -nr|head -10

6) To check the top 10 Ten process consuming high CPU

echo " %CPU PID RUSER COMMAND" ;UNIX95= ps -ef -o 'pcpu pid ruser args'|sort -nr|head -10

7) Restart swagent daemon by, 

# swagentd –r

8) Command to get netbackup information:

# /usr/openv/netbackup/bin/admincmd/bpgetconfig -g -L


Thanks...
Kiran Jadhav

**Let's Share our knowledge and keep visiting here**

Monday, August 4, 2014

How to Identify Luns on EMC- Clariion Storage + HPUX

How to Identify Luns on EMC- Clariion Storage (DGC     :CX4-240WDR5) in HP11iV3

1.       Device name/Lun id’s are : 404/402/400 and 114
Convert it into Hexadecimal:  194/192/190 and 72

2.       Try to grep the hex number :

testserver:/dev/disk# /usr/local/bin/inq.HPUXIA64 -clariion -no_dots |egrep '194|192|190|72'

/dev/rdisk/disk115    :DGC     :CX4-240WDR5     :HP03  :Ch2 CONT   :    41943040:  16: 2a0:ASSIGNED
/dev/rdisk/disk172    :DGC     :CX4-240WDR5     :HP03  :Ch2 CONT   :    37748736:  1a:  33:ASSIGNED
/dev/rdisk/disk234    :DGC     :CX4-240WDR5     :HP03  :Ch2 CONT   :    37748736:  27:  72:ASSIGNED
/dev/rdisk/disk246    :DGC     :CX4-240WDR5     :HP03  :Ch2 CONT   :    37748736:  28: 190:ASSIGNED
/dev/rdisk/disk247    :DGC     :CX4-240WDR5     :HP03  :Ch2 CONT   :    37748736:  29: 192:ASSIGNED
/dev/rdisk/disk249    :DGC     :CX4-240WDR5     :HP03  :Ch2 CONT   :    37748736:  2a: 194:ASSIGNED

3.       We can verify the same in /dev/disk directory:

testserver:/dev/disk# ls -lt |more
total 0
brw-r-----   1 bin        sys          1 0x000034 May  2 14:34 disk249
brw-r-----   1 bin        sys          1 0x000033 May  2 14:34 disk247
brw-r-----   1 bin        sys          1 0x000032 May  2 14:34 disk246
brw-r-----   1 bin        sys          1 0x000031 May  2 14:34 disk234

4.       Also the disks in scsimgr output; the ‘SCSI services internal state should be UNOPEN’


#scsimgr -v get_info all_lun |more

or 

#scsimgr get_info -D /dev/rdisk/disk249 |grep -i "SCSI services internal state"



Thanks...
Kiran Jadhav

**Let's Share our knowledge and keep visiting here**