You are on page 1of 14

1) Describe the boot sequence of a Linux system , or hp-ux system.?

Boot Sequence:
1. Poweron. 
2. PDC Activates and checks for cpu and memory and other peripheral connected to it.
3. Checks if AUTOBOOT Flag is on. If yes , its try to locate the Primary boot path, and loads Initial
system loader , from Primary boot path. 
4. ISL Loads the secondery loader called hp-ux. 
5. hpux loads the kernel /stand/vmunix 
6. kernel starts first process swapper , and then init 
7. Shell /sbin/pre_init_rc executes 
8. init locates /etc/inittab 
9. /etc/inittab starts the system the default run level , mentioned with "initdefault" parameter. 
10. Then executes /sbin/bcheckrc and activates LVM , 

It does following: 

1. activates LVM (if appplicable). 


2. runs eisa_config in automatic mode 
3. checks the file systems before mounting
4. checking reside in /sbin/fs/<fstype>/bcheckrc) 
5. mounting any file systems. 
6. It checks for the file /sbin/lvmrc and , /etc/lvmrc activates the LVM , if AUTO_VG_ACTIVATE=1
mentioned. 
7. Then it spawns getty process , cons:123456:respawn:/usr/sbin/getty console console 

And it gives login : prompt.

2) How a system gets the default runlevel.?


from /etc/inittab

is:3:initdefault:

3) What is the difference between init s , and init S. ?


s – system is accisible by physical system console only.
S – system is accisible by remote console session too.

4) How do you calculate the free space available , to increase/extend a filesystem.?


vgdisplay –v
Available PE * PE size = sizes available.

5) What is the procedure to mirror the root disk?


insf –e
Pvcreate –B /dev/rdk/cot5do
Vgextend vg00 /dev/dsk/cot5do
Mkboot /dev/rdsk/c0t5d0
Mkboot –a “hpux” /dev/rdsk/cot5do
Lvextend –m 1 /dev/vg00/lvol1 /dev/dsk/cot5do
Lvlnboot –R /dev/vg00
Lvlnboot –v
Setboot –a <hrdwr addy>
Vi /stand/bootconf
Add l /dev/dsk/c0t5d0

6) How to set kernel parameter from command line.?


7) What to do , if the newly build kernel doesnot boot.?
Interact with ISL and run old kernel
Hpux /stand/vmunix.prev

8) How to make sure if the patch going to install will take a system reboot.?
swinstall –p
PH_xxyyyy
XX if its kernel patch .. its gonna need reboot
Or before download read the info

9) How to extend a filesystem online ?


lvextend –L new_size /dev/vg11/lvol01
Fsextend –f vxfs /dev/vg11/lvol01

10) Can you reduce filesystem size? If yes , how? Any risk ?
only with online JFS
Fsadm –b newsize mountpt
Lvreduce –L newsise /dev/vg02/lvol2

11) How to measure performance of a system , if the connected users are saying server performance is very
slow ?
top

12) How many entry can be added in resolv.conf?

13) what is the command to see the default gateway?

14) How to sort as per the uid , from /etc/passwd file.?

sort -t : +2 -3n /etc/passwd

15) A server is rebooted and came up, but you dont know if its planned or unplanned , how to check about
it ?

16) How to find 10 largest file in the filesystem /user/sap/trans ?


du /user/sap/trans | sort –nr|head -10

17) How to check the error logs in the system.?


more /var/adm/messages

18) How to add a printer in the system?

19) How to write a function within a shell script?


Functionname ()
{
}

20) How to disable the ftp service in the system?


Vi /etc/services
Hash out ftp
Inetd stop | start

21) How to multiply two numeric value , from the command prompt and to get the result. ( ex: 12 * 15 Result
to be display = 180 ). ?

Echo “12*15” |bc


1) What is make_tape_recovery for?
Ignite backup – system backup

2) What is your approach to backups and disaster recovery.


3 DR sites

3) What steps would you go through to set up a new system.

*I* would ask them to tell me the pros and cons of HP-UX compared to Linux, AIX, and Windows. (The latter
only to see their attitude towards M$ and Windows/Unix integration).

Which RAID Levels supported by LVM? 


Commands to configure RAID 1 in LVM? 
How do you use tar command for network backup? 
Tar –cvf hostname:/test/ok file1 file2 file3

How would you roll back the patch? 

What is /var/adm/inet.sec ? What does it do? 


Extra security features

How to set default password policies? 


Vi /etc/default/passwd

Steps in kernel re-config, boot into single user mode etc 


What is a patch database (IPD etc.)? 
How to check machine LAN is half duplex or full duplex? 
What are the steps to create new VG’s? 
How to break the mirror and change root disk? 
How to check root disk failed? 
How to add default route? 
How to take OS backup? 
Ignite backup

How to restore whole OS backup and selected single file? 


Insert ignite tape
Reboot
Interact to boot prompt
Seach ipl
Path pri tape addy
Boot pri
Let the setup finish

What are the fields of the password file? 


Username:encrypted passwd:uid:gid:omment:home dir:command/login shell

How to tar and untar files? 


Tar –cvf file1.tar file1 file2 file3
Tar –xvf file1.tar

Which log files are useful in testing and debugging an MC/ServiceGuard? 


How to halt the cluster? 
How to add a new disk, volume group, and logical volume to the MC/ServiceGuard?
22) How to check how many cpu installed in the system ?
Ioscan –C cpu

23) What is the command to find out Total memory installed. ?


Print_manifest – ignite command

24) What is the command to find out the bootdisk from which the system booted currently?
lvlnboot –v

25) How to pull the glance report in text format?

26) What is a Lock disk?

27) How to find out the MC/SG lock disk?

28) What is the command to halt and TOC a vpar?

29) which command is used to load all the virtual partitions? 

29.a) How to backup a vpar ?

30) How to see total amount of memory in a complex which contains 4 vpar , and without rebooting the
complex?

31) How to find out if the two physical volumes are belongs to same VG , when they are not listed in
lvmtab. ?
Vgdisplay –v /dev/vgXX

32) What is the command to find out the VGID of a PV?

33) Which command will show the CPU Speed?

34) How do you find out the cause of the 'flashing LED' on the server, that found during the floor check
activity?

35) How to find out all the files that are created today ?

Find / -mtime (24*60)

36) How do you setup a local NTP server?

37) What does this error message means SCSI: Target detected parity error - lbolt" from syslog.log ?

38) How will you check hp-ux system table usage.?

39) What does this error message indicates : "file table full" in syslog.log ?

40) How will you configure MC/SG 2 node cluster?

41) How will you create hard npar?

42) What is the procedure for replacing a failed lan card on a cluster environment?

43) What is a genesis partition? And how to create it and to install the OS ?

44) How wil you convert the content of a file , containing all lowercase to all uppercase ?

tr “a-z” “A-Z” <filesmall >filecaps


tr “[:lower:]” “[:upper:]” <filesmall >filecaps

45) What is metadata ?

46) What is BIB in Superdome servers?

47) Which command will show the tcp/ip supported parameters ?

48) How to check if ip_forwarding has enabled or not ? if not how to set/enable it?

49) How to find out all the 'pid's of all process with telnetd and to kill in a single command ?
ps –ef|grep –I telnet|awk ‘{print $2}’ exec kill -9 {}; \

50) How to get decimal output upto 3 digit from bc command from a command line? ( i.e ex: 2/3 = 0.666 

What is the diff betn character device file and block device
All read write operations are in on stream on char and in block in block device. Hence on block u can move
back n forth across all data hence FS can be cerated on block device nt char device.

Why do we need both files for disks?

Use of the hard links and soft link:


Hard link allows user to reference single file with diff file names. Hence sharing the same permission, owner
and time stamp.

Sync command :

Whenever FS is mounted its superblock is laoded into RAM and them file system flag set to dirty. All the
updates made into core copy. When sync is issued disk copy is updated. When FS is unmounted all in-core
structures are flushed to disk and system sets flag to clean.

User, Group Management

How to run a script on every 2nd Saturday of the month?

00 00

Cron.allow and cron.deny files.

SWAP

1. How would you add a user?? For experienced admin, I would ask alternate ways to do it.
useradd username –h home_dir –s shell –G pri_gp_id –g sec_gp_id

2. How many groups a user can belong to???


one user can be member of 1 pri and 16 sec grps. By default. Parameter set in param.h .. chk
usermod manpage and –G section

Disk/SAN/NAS management.
1. What are the steps involved in creating a volume?? About mirroring the root disk. How SAN is different
from NAS. About stripped LVs.
Attach raw disk , power on…
ioscan –funC disk
pvcreate –f /dev/rdsk/c0t0d0
mkdir /dev/vg01
mknod /dev/vg01 c 64 0x010000
vgcreate /dev/vg01 /dev/dsk/c0t0d0
lvcreate –name myfs1 –L 100 vg01

2. What is JFS, what advantages it offers over HFS?? About VxVM.

Secuity Access and Control.


1. What precautions/methos will you follow to secure the system??
For experienced admin, I would access him a little further. User level security, at file level, user of third party
products, use of ssh/tcp wrappers etc.

Kernel tuning, Performance monitoring and tuning. 

1. Is a queue of four is Ok on a system with 6 cpus and questions like that???


How shmmax can be set for oracle. about dynamic buffer cache. 
2. How would you check disk bottleneck?? How would you acertain the swap space use, dynamic buffer
cache etc.
3. Steps in kernel re-config, boot into single user mode etc.

Print, Application, Patch Management


1. What is a patch database (IPD etc.)??
Installed patch database
Stored in /var/adm/sw/products

2. How would you roll back the patch??

Backups and Recovery


1. What products??
2. About Ignite??
3. Systems tools and their usage.

Network Administration
1. About having two ips on same subnet?
2. Calculation of subnet.
3. About ipfilter, adding routes, deleting it. USer of net stat. About ndd.
1. tombstone vs core file generation.
2. using ioscan to attached device driver to the hardware path.
3. How do you know the patch level of the system 
4. How to recover system using ignite. 
5. steps replacing a failed drive on your system, using veritas or LVM. 

Can you name five 5 letter hp-ux command ? 

"what is ____, and what is it used for?" with:


tar
Tape archiving – used for backup
tar –cvf x t z filename.tar / .tar.gz files1 file2

cpio
copy in copy out – used for backup
cpio -i <input file, -o >output file

whois
Internet username directory service – h is host holding indentification info.
whois –h hostname searchname

finger
List currently logged in used info.

bind
bind a name to socket

mount
shows currently mouneted FS

fsck
FS check
Check FS for errors. This can be set under /etc/lvmtab for boot.

ping

ifconfig
inetd
smbd

Where sticky bit is set normally?


/tmp

Echo $$

Ls output seprated by ;

Ls |tr “\n” “;”

Search the string inside file in given directory structure and list all those files ####

Find . exec grep –I “ string” {};\

What is the link count of newly created directory .. its 2 !! . and ..

AWK – NF is total number of columns i.e. print last column


NR – total number of rows

If a user logs in to UNIX, it displays the desktop and then immediately logs you
back out, what could be wrong?
A daemon is a process that detaches itself from the terminal and runs, disconnected, in the
background, waiting for requests and responding to them.

User, Group Management

1. How would you add a user?? For experienced admin, I would ask alternate ways to do it.
2. How many groups a user can belong to???

Disk/SAN/NAS management.
1. What are the steps involved in creating a volume?? About mirroring the root disk. How SAN is different
from NAS. About stripped LVs.
2. What is JFS, what advantages it offers over HFS?? About VxVM.
Secuity Access and Control.
1. What precautions/methos will you follow to secure the system??
For experienced admin, I would access him a little further. User level security, at file level, user of third party
products, use of ssh/tcp wrappers etc.

Kernel tuning, Performance monitoring and tuning. 

1. Is a queue of four is Ok on a system with 6 cpus and questions like that???


How shmmax can be set for oracle. about dynamic buffer cache. 
2. How would you check disk bottleneck?? How would you acertain the swap space use, dynamic buffer
cache etc.
3. Steps in kernel re-config, boot into single user mode etc.

Print, Application, Patch Management


1. What is a patch database (IPD etc.)??
2. How would you roll back the patch??

Backups and Recovery


1. What products??
2. About Ignite??
3. Systems tools and their usage.

Network Administration
1. About having two ips on same subnet?
2. Calculation of subnet.
3. About ipfilter, adding routes, deleting it. USer of net stat. About ndd.

In order to access the psyche of the candidate.

Which is more powerful? The pen, the sword, or the prompt?

I depend more on how candidate re-acts. I prefer tolet him do the talking. Sometimes it happens that hey
may not know correct optins, syntaxes, but it is important to know that he knos how to do this and that.

--------------------------------------------------------------------------------
I completely forgot about adding few things.

About NIS, NIS+, DNS and NFS.


1. What advantages nfs 3 offers?? How??
2. The different records in DNS.

--------------------------------------------------------------------------------
I also like to have them talk about themselves...what they are good at - things they have trouble with, how
they work under pressure - and can they provide an example.

IE - is someone puts on their Resume they are an expert with EMC - yet can't tell you anything about SRDF
- well...they might be strecthing their skills :)

--------------------------------------------------------------------------------
I almost always start out with something like "How do I replace all instances of 'turnips' with 'collards' in a file
using vi. If they know this, at the very least, I know that they can spell vi -- an absolutely essential
requirement for any UNIX guy. I then expand the question to include batch processes and their weapon(s) of
choice - sed, awk, shell, Perl, C, etc.

I also have them tell me about the various man sections. For example, what's the difference between
section 2 and section 3?
I'm never too concerned about answers to specific questions but rather about their approach to getting those
answers.
I always ask increasingly difficult technical questions until I hear "I don't know" (the desired answer) or until I
hear BS. An employee (or interviewee) should never
be afraid to answer "I don't know". 

--------------------------------------------------------------------------------
Few questions can be like below: 

1. tombstone vs core file generation.


2. using ioscan to attached device driver to the hardware path.
3. How do you know the patch level of the system 
Showrev in solaris
Swlist –l in hpux

4. How to recover system using ignite. 


5. steps replacing a failed drive on your system, using veritas or LVM. 

Basic goal all employers will be to test your experience and offcourse your approach at various problems..

--------------------------------------------------------------------------------
What would be your approach if the system crashes badly (disk(s) all inaccessable), and there are
apparently no backups made (ever).

This will probably show a great deal of how someone will take an inventory of what is/was/should be
(re)installed on the system, including users, databases, software packages, patches, documentation,
services, security and networking issues, interoperability with other systems, etc. etc.

A more serious question could be how to set up a complete new system from scratch, where he has to
address most of these areas anyway, but he'd then be missing the pressure of phoning people asking
"where is the database", and "when will I be able to see my files again".

--------------------------------------------------------------------------------
Here's a few from a different perspective:

- do you prefer to work as part of a group or individually? And what percentage of your time would you feel
comfortable working in the not prefered mode?

- what do you consider more important: risk management, or getting the job done?

- in general, would you describe yourself as being more long-term or more short-term focused?

- what was the most difficult work-related thing you've ever done, and what did you learn from it?

Keep in mind that some of these questions are deliberatly open-ended so you can see what a candidate is,
and is not, willing to voluntarily talk about or disclose.

--------------------------------------------------------------------------------
Hi,

There are always good technical questions to ask, and many of them depend on the environment you work
in. For example, we never ask about NIS here, because we don't use it. You can probably cruise the forum
here and come up with some great technical questions.

I agree with Mark in the last post. I like to ask some open ended questions for which there isn't a yes or no
answer. Also, don't be afraid of silence. If you ask them a question and they are thinking or seem unsure,
don't prompt them or say anything. You can actually get a bit of a feeling about how they think and act under
a little stress, which is good to find out in the interview and not after you have hired them. 

Here are a few of the open questions I like to ask:

1. What would your current/former boss say your strengths are, and why?

2. What would your current/former boss say your weaknesses are, and why?

3. Tell me about a time you were faced with a difficult technical problem and how you came up with a
creative solution to the problem.

4. Have you ever been faced with a problem where you had to do something or come up with a solution that
was outside company policy? (For example, looking for stories like, "I changed a production server without
telling anybody" - which could be good or bad, depending on the situation).

5. Tell me about a time when you had to work with a fellow employee or supervisor who was difficult to get
along with, and how you worked around that.

Most technical people with experience are smart. I'm more concerned with people that can learn things fast
than with finding people that already know it all. Not that I have anything against the wizards, but the places I
have worked generally couldn't afford them. :)

--------------------------------------------------------------------------------
I would ask them what their security outlook and tools of choice were.

For HP-UX./Linux do they use Bastille?

What is /var/adm/inet.sec ? What does it do?

IDS/9000?

Secure Shell?

How to set default password policies?

In the post 9-11 world its no longer enough to administer the box, you have to make it safe.

For Senior Unix Admins:

----------------------------------------------------------------------------------

Oracle DBA's have discovered a potential performance problem related to the number of file descriptors.

Which command to check and Which kernel parameters do you modify?

ulimit -a maxfiles and maxfiles_lim 

----------------------------------------------------------------------------------

There are essentially 3 types of system crashes on HP. Name them - and what causes them:

High Priority Machine Check (HPMC) - normally the result of a piece of hardware causing a group 1 interrupt

Transfer Of Control (TOC) - Initiated from console using the TC command form the command menu (GSP)
or by Servicguard cmcld daemon in the event of a cluster reformation

PANIC - occurs when the kernel detects a situation that makes no logical sense (like kernel data structures
becoming corrupted)

----------------------------------------------------------------------------------
Do all nodes in a cluster have to have the same I/O tree for shared devices?

No - as long as the devices are referenced correctly in the cluster config

----------------------------------------------------------------------------------

The disk/volume groups that are going to be shared between nodes in a cluster neccessitate a different
series of standard config files that normally deal with and manage disk/volumes/filesystems. Which standard
config files are affected and why?

A. /etc/lvmrc - this startup script needs to be modified to NOT activate all volume groups at startup time

B. /etc/fstab - filesystems that will be shared between nodes must NOT be listed in the fstab file.

----------------------------------------------------------------------------------

The Primary lan card fails on one of the nodes in the cluster. HP replaces the card, and it has maintained its
instance number and associated device files. The ip address remains the same. Will the node be able to
rejoin the cluster with a simple cmrunnode command?

If not - Why? and what commands must you run or changes do you need to make before it can join the
cluster?

A. Servicguard maintains the MAC address of all configured LAN cards in the cluster binary file.

B. You must re-run a cmapplyconf using the existing cluster ascii file.

----------------------------------------------------------------------------------
How do I print Yesterday?
# echo 'Yesterday'
Yesterday
# perl -le 'print scalar localtime time - 86400'

----------------------------------------------------------------------------------

AIX Questions

How you find disk size let say hdisk7?


( bootinfo -s hdisk7)

How you list hardware configuration?


( lscfg -pv )

How you find to which vg filestserm belongs?


( df; take lv, lslv will list vg name)

How you perform system backups?


( mksysb command)

How to mirror rootvg?


The following steps will guide you trough the mirroring of an AIX rootvg.
This info is valid for AIX 4.3.3, AIX 5.1, AIX 5.2 and AIX 5.3.
Make sure you have an empty disk, in this example its hdisk1 
Add the disk to the vg via "extendvg rootvg hdisk1 
Mirror the vg via: "mirrorvg rootvg" 
Adapt the bootlist to add the current disk, the system will then fail to hdisk1 is hdisk0 fails during startup 
do bootlist -o -m normal 
this will list currently 1 disk, in this exmaple hdisk0 
do bootlist -m normal hdisk0 hdisk1 
Run a bosboot on both new disks, this will install all software needed for boot on the disk 
bosboot -ad hdisk0 
bosboot -ad hdisk1 

How to tell the maintenance release?


instfix -i |grep ML

Performance - Glance/Perfview/OVPA

What is /opt/perf/bin/extract used for?

extract - (extract functionality) reads the contents of OVPA scopeux


log files or previously extracted log files.

/opt/perf/bin/extract -xp -r /home/gwild/zgbltemplate -g -b today 7:00 -e today 18:00 -f stdout

------------------------------------------------------------------------------------------------

You can use dig (if installed):

dig @yourserver version.bind chaos txt

Or with nslookup:

nslookup -q=txt -class=CHAOS version.bind. yourserver

------------------------------------------------------------------------------------------------

How to extend a F/S with OnlineJFS?

lvextend -L 210640 /dev/vg52/lvsaparchive


fsadm -b 210640M /export/data/sap/IPR/ARCHIVE

------------------------------------------------------------------------------------------------

Online JFS not working?

Are we licensed for OnlineJFS?


# vxlicense -p

Check to see if vxportal in kernel:

# kmsystem -q vxportal
Should see:
Module Configured Loadable
=================================================
vxportal Y -

Check device:
# lsdev | grep 97

Should see:
97 97 vxportal unknown

Is /dev/vxportal corrupt?
# ll /dev/vxportal

Should be like:
crw-r--r-- 1 root sys 97 0x000000 Nov 15 2000 /dev/vxportal

If missing or incorrect permissions:


# rm /dev/vxportal
# mknod /dev/vxportal c 97 0
# chmod 644 /dev/vxportal

If vxportal was not "Configured" in the kernel (from kmsystem command), then rebuild kernel:

If none of that applied, and vxlicense -p was okay, try re-enabling the license:

/sbin/fs/vxfs/vxenablef -e online

------------------------------------------------------------------------------------------------

Using adb, How many cpu's are installed and what speed?

echo "processor_count/D" | adb /stand/vmunix /dev/kmem

echo "itick_per_tick/D" | adb /stand/vmunix /dev/kmem (/10000)

How about Itanium?

echo "active_processor_count/D" | adb -o /stand/vmunix /dev/kmem

echo "itick_per_usec/D" | adb -o /stand/vmunix /dev/kmem

Rgds...Geoff

USER CLONE:

Useradd –u !!!!

What if both /etc/passwd and /etc/shadow got removed…..


Der is always a backup copy deamon writes in /etc/*passwd* and /etc/*shadow*
Brief about the directory representation in UNIX
A Unix directory is a file containing a correspondence between filenames and inodes. A
directory is a special file that the kernel maintains. Only kernel modifies directories, but
processes can read directories. The contents of a directory are a list of filename and
inode number pairs. When new directories are created, kernel makes two entries named
'.' (refers to the directory itself) and '..' (refers to parent directory).
System call for creating directory is mkdir (pathname, mode).

Df -g

You might also like