Monday, December 31, 2012

HP UX 11.31i Interview questions

Some more questions which we used to face in interview.

1. How we can reset the password of MP in RX machines (rx 2660, rx 8640, etc. )?
ans. press the MP button for less than 5 sec and after that password will reset to Admin.
2. How we can reset the default MP configuration of RX machines?
ans. For this we have to press the MP button on extreem right side of machine for more than 10 second.
3. What is the command to check software installed on the HP UX server?
ans. swlist |grep -i "name of the software"
other related commands :-

swlist -l product "name of the software"
swlist -l fileset "name of the software"

4. What is the command to check and set the kernel parametre in HP UX?

ans. kctune |more  :-- it will show or list the kernel parameter which are set already.
       kctune "name of the parameter equal to desired value of the same "

5. What is the command to check enabled services?

cat /etc/services |grep -i "name of the service"

here we can also set the services (like services i.e on which port which service will run) by editing this file but be careful, take back of this file before editing it with vi or any editor.

6. What is the command to set network address, HOSTNAME on HP UX 11.31i

ans.  set_parms

set_parms will show below parameters which can be edited with this set_parms command

a. ip_address
b. hostname
c. locale
d. timezone
e. one or two more will be there in this list.

#set_parms ip_address

by using this command a window for setting ip address of the server will come and it will also ask for Gateway setting and netmask. please be ready with the details in advance.

and as you complete this process the IP ADDRESS will reset.

similarly with

#set_parms hostname

hostname will be asked to reset and as you reset the hostname will ask for reboot of the system. so inform the application teams first before changing the hostname of the server. you can cancel the request of set_parms also if you are not prepared and reached to that point.

7. What are the utilities available on the HP UX system?

some i remember, trying to putting it down for now. will keep writing further on this. these can directly be executed from # prompt that is root prompt or with sudo or as per given privilege.

a. sautil
b. glance :- can be run as a local user
c. smh or sam
d. sar :- a local user can execute
e. fcmsutil
f. scsimgr  which can be run like
#scsimgr lun_map
g. saconfig
h lanadmin
i lanscan

there are many others, which can be used with needful purpose.

8. above mentioned are powerful tools used for monitoring as well as configuration purpose.
where one like saconfig can be used for RAID configuration and glance gives a good monitoring of CPU, Memory processes and disk.

9. Some commands listed related to Logical volumes or Volume groups and PV physical volume.

a. pvdisplay /dev/rdisk/...
b. pvcreate -f
c. vgcreate
d. vgdisplay
e. vgexport
f. vgimport
g. vgmodify
h. vgextend
i. vgreduce.
j. vgcreate
k.  vgremove
l. ioscan -fn
m. ioscan -fnkC / device like fc  or lan
n. ioscan -m dsf
o. /usr/contrib/bin/vgdsf :- this can be used to change legacy path to persistant.
p. ioscan -m lun
q. lvextend -L
r. fsadm -b
s. and so many

 10. Most common things HP ask after logging a case with them. be prepared with these atleast so that processing of things with new case becomes easy.

a. for hardware failure, they used to ask for getsysinfo script output.
b. nickel o/p is also demanded.
MP logs

Saturday, December 29, 2012

Visit in this world

My questions to me......

1. I donot know, what i have born for?
2. If we are born by our Parents, then they only have the right to kill us not anyone else. Is there any punishment of law lie this?
3. What I want to be, Which profession should i choose. as sometimes i want to be the king  of the world or sometimes i think, if we are getting 3 meals and work to do in a day then thats it. we are complete then.
4. What are the things i have not seen or done in this world/ or why should i do?
5. What change i will or can bring, whose side should i choose? should i choose the path of nature or my own wishes to destroy by only consuming nature's resources?
6. Where i am now, What all life is, Where life will be after 5 years. It is not like that i donot have any plan, i do have, but does plan have any isurance?
7. Yes I love my parents, my brothers and sisters, my love, my kids and love my self.

Thursday, December 27, 2012

Node Switching parameter disabled (Service Gaurd)



      Primary      up           enabled      node1 (current)

      Alternate    up           disabled     node2
to change this, please look at the logs of cluster first of all. /etc/cmcluster/SID/*.log file and also look at the /var/adm/syslog/syslog.log file.
the correct o/p u can get by running cmviewcl -v from the # prompt i.e. through sudo or root access. please be assure you know the exact setting of your system/server.
#cmmodpkg is teh command, first we need to read the man page for the same.
# cmmodepkg -n nodename -e pkgname
#cmmodpkg -n -e nodename pkgname
then the o/p will appear as enabled on both the node switching parameter in cmviewcl -v o/p.


Primary up             enabled       node1 (current)

Alternate up           enabled     node2

Saturday, December 22, 2012

How to change value of maxproc parameter?

How to change the value of maxproc parameter in Linux?

1. for changing  the value of maxproc to unlimited if it is 1024 now, as required for java and oracle processes. we can do the following.

the oracle user may or might be in sapsys group as it is in my case. we can chech the same with cat /etc/group, after confriming the same. we need to edit the file /etc/security/limits.conf. we have to write an entry lie below.

in last line u can add below lines.

@sapsys          -       nproc            unlimited
#@kinder          -       nproc            unlimited :- an example of group create named as kinder, user #created in it is as yanky/chen,
@kinder          soft    nproc          unlimited
# End of file
[root@linux1 ~]# cat /etc/security/limits.conf

after editing the file just save and logout and login again.
try to login with user falling in sapsys group, in my case yanky/chen for kinder group or sidadm user falling in sapsys group and run command


it will show the o/p as unlimited as below for yanky/chen

[root@linux1 ~]# su - chen
[chen@linux1 ~]$
[chen@linux1 ~]$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 7868
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) unlimited
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
[chen@linux1 ~]$
please add or put your comments for adding or making my point cler if mistake done. will be very thank full to u.

Amit Chopra

Friday, December 21, 2012

How to Extend LV (RHEL 5,8)

Hi All,

How to Extend LV where online extension is not allowed. this was a case

1. first we have to check what message comes when online extension or reduction is not allowed.
2. If this message comes, we have to inform Application Team or User that they have to stop using that server for some duration.
3. Only on availability of Downtime, we can go ahead with Extension or reduction.
4. below are the commands.
5. Here just wanted to raise the value of LV /home_new to 51 GB from 49 GB.
6. first, we need to calculate the value of free PE or available PE with us with help of vgdisplay command we can do.
7. We have to calculator "bc -l" and add the 49*1024+2*1024
8. it will give the result.
9 lvextend -L (49*1024+2*1024)mb /dev/mapper/vg00-home_new
10. after this we have to use e2fsck or resize2fs command to make that size available. as lvextend command will run successfully.
11. in this case online extension with resize2fs was not happening or allowed. so had to use below pattern.

[root /]#
[root /]#
[root /]# date
Thu Dec 20 17:43:20 IST 2012
[root /]#
[root /]# umount /home_new
[root /]#
[root /]# resize2fs /dev/mapper/vg00-home_new
resize2fs 1.39 (29-May-2006)
Please run 'e2fsck -f /dev/mapper/vg00-home_new' first.
[root /]# e2fsck -f /dev/mapper/vg00-home_new
e2fsck 1.39 (29-May-2006)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/mapper/vg00-home_new: 4851/6553600 files (0.1% non-contiguous), 3403493/13107200 locks
[root /]#
[root /]#
[root /]# resize2fs /dev/mapper/vg00-home_new
resize2fs 1.39 (29-May-2006)
Resizing the filesystem on /dev/mapper/vg00-home_new to 13500416 (4k) blocks.
The filesystem on /dev/mapper/vg00-home_new is now 13500416 blocks long.
[root /]#
[root /]#
[root /]# mount /dev/mapper/vg00-home_new /home_new/
[root /]#
[root /]# df -hT
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda2     ext3     39G   23G   15G  61% /
/dev/sda1     ext3     99M   12M   83M  13% /boot
tmpfs        tmpfs    8.0G     0  8.0G   0% /dev/shm
              ext2     51G   13G   36G  26% /home_new
[root /]#
[root /]#
[root /]#
[root /]#

I may have given in wrong wa or right, please comment or suggest on this and improve my skill. your comments are appreciated.


Wednesday, December 19, 2012

Interview questions for HP UX 11.31i

Sharin some of the questions which are being asked frequently for HP UX 11.31i Interview.

the question level may differ for different user of HP UX admin.

1. What is command for measuring CPU and DISK utilisation?

Answer :- SAR is a utillty which is used.

$sar -Mu 2 5 will give the o/p for CPU utilization. it also shows how many CPU are there in your server.
$sar -d 2 5 will give the o/p pattern for disk utilized.

2 5 :- these can be changed for how long and with what duration you want the o/p of sar command.

2. What are the steps to troubleshoot a Hard disk failure?

Ans :- sautil is the utility which can be used to detect hard disk faliure.

/var/adm/syslog/syslog.log can also show the disk failure.

with ioscan -fnC disk (failed disk can be seen) bit this will not show any result if disk is completly failed. small corruptions or sector failure cannot be seen with it.

3. What is the booting sequence of HP UX 11.31i for rx2660 server, RX8640 nd HP 9000 server?
4. How to set the limit and kernel values in HP UX 11.31i
5. What is the command to verify the Patch implemented and verify it i correclty implemented.?
6. What is the command for adding/modifying/group moification/ownership changes in a directory?
7. What are the ways to boot from Ignite backup?
8. What is the command for ignite backup (make_net_recovery AvI  -s -x inc_entire=vg00
 and if on tape then make_tape_recovery -AvI -a /dev/rmt/0mn -x inc_entire=vg00
9. How we can change the password policy?
it is through /etc.default/security file only. after that you need to rerun the /sbin/init.d/secsh services. and shd services.
10. What is the command to check running services?
ps -ef |grep -i
11. what is the command to check on which port the service is running?
then we can check through netstat -an |grep -i or

will try to keep post on the same topic....

please add more and all positive and negatives comments invited.

Best Regards
Amit Chopra