FAQ and Interview Questions:: An Overview

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 11

An Overview

Unix is a widely used Operating system. It comes in several flavours such as Linux,
Solarir, AIX, HP-UX, FreeBSD, Tru64 etc.,

FAQ and interview questions:


Can you tell me about your daily routine work.

My daily routine work is monitoring which includes mail box monitoring ( Including
alert monitoring for server disk space memory cpu utilization etc)
BMC bucket monitoring for new tickets, BAC monitoring to check server health, and
also to work on scheduled activities like patching, package installation etc in test and
production environments.

What will you do if there is no work.

I will proactively monitor server logs on critical servers to check if any errors ( memory
mount points related disk space related etc). I will go through pending tickets, check if
calendar notices are in place for all scheduled activites, check if all change and problem
tickets are in place and approved or not. I will also try to go through sun website, blogs
etc to keep myself updated)

How many servers are there in your organization?

There are 1000 + servers of various kinds. There may be even more servers that I am not
aware of.

What are V series and E series servers?

Sun Fire model numbers have prefixes indicating the type of system

• V: low-end and mid-range servers (UltraSPARC, IA-32 or AMD64)


• E: enterprise-class servers with high-availability features (UltraSPARC)
• B: blade servers (UltraSPARC or IA-32)
• X: rack-mount x64-based servers
• T: servers based on UltraSPARC T-series CoolThreads processors
How do you find the number of CPUs running

command is psrinfo –v

Sample output.

#> psrinfo -v
Status of virtual processor 0 as of: 02/21/2010 07:30:16
on-line since 02/25/2009 19:35:47.
The sparcv9 processor operates at 1350 MHz,
and has a sparcv9 floating point processor.
Status of virtual processor 1 as of: 02/21/2010 07:30:16
on-line since 02/25/2009 19:35:47.
The sparcv9 processor operates at 1350 MHz,
and has a sparcv9 floating point processor.
Status of virtual processor 2 as of: 02/21/2010 07:30:16
on-line since 02/25/2009 19:35:47.
The sparcv9 processor operates at 1350 MHz,
and has a sparcv9 floating point processor.
Status of virtual processor 3 as of: 02/21/2010 07:30:16
on-line since 02/25/2009 19:35:47.
The sparcv9 processor operates at 1350 MHz,
and has a sparcv9 floating point processor.
Status of virtual processor 4 as of: 02/21/2010 07:30:16
on-line since 02/25/2009 19:35:47.
The sparcv9 processor operates at 1350 MHz,
and has a sparcv9 floating point processor.
Status of virtual processor 5 as of: 02/21/2010 07:30:16
on-line since 02/25/2009 19:35:47.
The sparcv9 processor operates at 1350 MHz,
and has a sparcv9 floating point processor.
Status of virtual processor 6 as of: 02/21/2010 07:30:16
on-line since 02/25/2009 19:35:47.
.......................................etc... .

How do you find veritas volume manager version

Command: modinfo|grep vx

Look for vxio in the output below

17 11c73ca 1cf418 277 1 vxio (VxVM 4.0R_p4.7 (MP2) I/O driver)


34 781e8000 28f54 276 1 vxdmp (VxVM 4.0R_p4.7 (MP2): DMP Drive)
35 7817d66a 847 278 1 vxspec (VxVM 4.0R_p4.7 (MP2) control/st)
136 78483346 c23 273 1 vxportal (VxFS 4.0_REV-MP2f portal driver)
137 7849e000 165c95 8 1 vxfs (VxFS 4.0_REV-MP2f,116689-02 (Su)

How do I troubleshoot disk failure

See for hard errors. Check var/adm/messages also. If there are more hard errors run
explorer and send output to sun. Sun can finally decide if replacement is required or not.
iostat -En
c0t0d0 Soft Errors: 6 Hard Errors: 1 Transport Errors: 0
Vendor: TOSHIBA Product: DVD-ROM SD-M1712 Revision: 1004 Serial No:
Size: 0.00GB <0 bytes>
Media Error: 0 Device Not Ready: 1 No Device: 0 Recoverable: 0
Illegal Request: 6 Predictive Failure Analysis: 0
c1t2d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: HITACHI Product: HUS1014FASUN146G Revision: 2A07 Serial No:
0546TWL9Z7
Size: 146.80GB <146800115712 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
c1t0d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: HITACHI Product: HUS1014FASUN146G Revision: 2A07 Serial No:
0546TWLD7M
Size: 146.80GB <146800115712 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
c1t4d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: HITACHI Product: HUS1014FASUN146G Revision: 2A07 Serial No:
0546TWLDNT
Size: 146.80GB <146800115712 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
c1t5d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: HITACHI Product: HUS1014FASUN146G Revision: 2A07 Serial No:
0546TWL4WW
Size: 146.80GB <146800115712 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
c1t1d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: HITACHI Product: HUS1014FASUN146G Revision: 2A07 Serial No:
0546TWLB00
Size: 146.80GB <146800115712 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
c1t3d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: HITACHI Product: HUS1014FASUN146G Revision: 2A07 Serial No:
0546TWLBUZ
Size: 146.80GB <146800115712 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0

What is subdisk and plex in veritas:

Plex is nothing but a mirro made of one or more subdisks

What is swap and what is virtual memory

Solaris virtual memory system combines physical memory with available swap
df -kh swap
Filesystem size used avail capacity Mounted on
/dev/vx/dsk/bootdg/rootvol
12G 5.0G 6.7G 43% /
swap -s
total: 19183832k bytes allocated + 15131600k reserved = 34315432k used, 20783856k
available
top | grep -i swap
Memory: 40G phys mem, 15G free mem, 22G swap, 22G free swap
More info: http://www.princeton.edu/~unix/Solaris/troubleshoot/ram.html

What is inode and what should it contain

Inode is a unique number given to a file in Unix OS. Every file in Unix has a inode
number. unix treats directories/folders as a file so they are also having a inode value
total 451589

#> ls –li gives inode information


-i For each file, prints the i-node number in the first column of the report.

3663 -rwxrwxrwx 1 root root 155122199 May 2 2006 9_Recommended.tar.tar

Roles and Responsibilities.

· Installing and patching the UNIX operating system


· Validating the operating system and patch level
· Configuring the kernel
· Storage Management: Solstice DiskSuite, Veritas Volume Manager
· System and Network Planning/ Administration
· Network and Systems Security Administration.
· Network File System Management (NFS)
· Software and Patch Administration
· Managing users/ groups, local and NFS file system needs of the applications
· Server performance monitoring and troubleshooting for server related problem
· Veritas/ Sun Clustering
· System integration, capacity planning, performance tuning, system monitoring, system
security
· operating system hardening, load balancing and dynamic reconfiguration.
· Linux shell scripting within the following shells, sh/ksh/csh/bash.
· Installation, imaging, configuration, racking, maintenance, monitoring, networking and
support of data center Unix/Linux servers (SGI, Sun, HP, IBM, Red Hat)
· Set up Disaster Recovery Servers
· Writing shell scripts to capture system configurations and performance statistics
· To Compile and develop GNU applications and packages such as perl, modssl, and ssh

Boot process in solaris 9 and 10

Solaris 9

1. The PROM displays system identification information and then runs self-test
diagnostics to verify the system's hardware and memory.

2. Then, the PROM loads the primary boot program, bootblk, whose purpose is to load
the secondary boot program (that is located in the ufs file system) from

the default boot device.

3. The bootblk program finds and executes the secondary boot program, ufsboot, and
loads it into memory.

4. After the ufsboot program is loaded, the ufsboot program loads the kernel.

5. The kernel initializes itself and begins loading modules by using ufsboot to read the
files. When the kernel has loaded enough modules to mount the root (/) file

system, the kernel unmaps the ufsboot program and continues, using its own resources.

6. The kernel creates a user process and starts the /sbin/init process, which starts other
processes by reading the /etc/inittab file.

7. The /sbin/init process starts the run control (rc) scripts, which execute a series of other
scripts. These scripts (/sbin/rc*) check and mount file systems, start

various processes, and perform system maintenance tasks.


Solaris 10

open prom phase

-prom runs post

-locate the bootblk

-read the bootblk

-load the bootblk

boot program phase

-read the ufs bootblk

-load

kernel initilization phase

-kernel initilization

-kerner bit 32 bit or 64 bit

init phase

-initilize the rc[rc = run script]

-run rc

svc.stat phase

- svcs will Start smf

What are stad and lockd NFS solaris.

statd: Network status manager


It is used so that if an NFS server crashes and comes back alive, it can notify clients that
this event happened.
lockd: Network lock manager.
It is used to hold lock
he lockd utility is part of the NFS lock manager, which supports record locking
operations on NFS files.

Create raid 5 volume using solaris volume manager


metainit wolume-name -r component component component -i interlace-value

Eg. # metainit d45 -r c2t3d0s2 c3t0d0s2 c4t0d0s2

d45: RAID is setup

Create raid 5 volume using vertias volume manager

# vxdg init datadg disk01=c1t1d0s2 disk02=c1t2d0s2 disk03=c1t3d0s2 disk04=c1t4d0s2


# vxassist -g datadg make vol01 2g layout=raid5

2. Create a mount point for this volume:

# mkdir /vol01

3. Create a file system on this volume:

# mkfs -F vxfs /dev/vx/rdsk/datadg/vol01

4. Deport this disk group:

# vxdg deport datadg

Different between hard link and soft link

Hard Links :

1. All Links have same inode number.

2.ls -l command shows all the links with the link column(Second) shows No. of links.

3. Links have actual file contents

4.Removing any link just reduces the link count but doesn't affect other links.

Soft Links(Symbolic Links) :

1.Links have different inode numbers.

2. ls -l command shows all links with second column value 1 and the link points to
original file.

3. Link has the path for original file and not the contents.

4.Removing soft link doesn't affect anything but removing original file the link becomes
dangling link which points to nonexistent file.
Is slice 2 backup entire system backup. Meaning can I take entire system backup
using slice 2.

partition 'c' (slice 2) actually represents all of the blocks on the disk drive.

The "dd" command can backup the entire disk using slice 2.

For more information please refer http://www.sunhelp.org/faq/backup.html

How to take root file system backup

dd if=/dev/olddisk of=/dev/newdisk with all the devices unmounted and from single user
mode

However most organizations use vertias netbackup with advanced features

Explain in brief about SAR.

System Activity Recorder can monitor several system functions related to overall system
performance

• cpu utilization
• hard disk utilization
• terminal IO
• number of files open
• processes running

Example:
sar 2 5
SunOS servername 5.9 Generic_122300-22 sun4u 02/21/2010
10:51:34 %usr %sys %wio %idle
10:51:36 6 1 0 92
10:51:38 6 0 0 93
10:51:40 6 0 0 94
10:51:42 5 1 0 93
10:51:44 0 0 0 100
Average 5 1 0 94

For more information see http://docs.sun.com/app/docs/doc/816-0211/6m6nc676d?


a=view

What is iostat

Input Output statistics ( iostat )


iostat reports terminal and disk I/O activity and CPU utilization. The first line of output is
for the time period since boot & each subsequent line is for the prior interval . Kernel
maintains a number of counters to keep track of the values.
iostat’s activity class options default to tdc (terminal, disk, and CPU). If any other
option/s are specified, this default is completely overridden i.e. iostat -d will report only
statistics about the disks.

syntax:
Basic synctax is iostat interval count
option – let you specify the device for which information is needed like disk , cpu or
terminal. (-d , -c , -t or -tdc ) . x options gives the extended statistics .
interval – is time period in seconds between two samples . iostat 4 will give data at each 4
seconds interval.
count – is the number of times the data is needed . iostat 4 5 will give data at 4 seconds
interval 5 times

Example

$ iostat -xtc 5 2

extended disk statistics tty cpu

disk r/s w/s Kr/s Kw/s wait actv svc_t %w %b tin tout us sy wt id

sd0 2.6 3.0 20.7 22.7 0.1 0.2 59.2 6 19 0 84 3 85 11 0

sd1 4.2 1.0 33.5 8.0 0.0 0.2 47.2 2 23

sd2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0

sd3 10.2 1.6 51.4 12.8 0.1 0.3 31.2 3 31

The fields have the following meanings:

disk name of the disk

r/s reads per second

w/s writes per second

Kr/s kilobytes read per second

Kw/s kilobytes written per second

wait average number of transactions waiting for service (Q length)

actv average number of transactions actively being serviced


(removed from the queue but not yet completed)

%w percent of time there are transactions waiting

for service (queue non-empty)

%b percent of time the disk is busy (transactions

in progress)

Where do you find system logs in solaris.

System logs are found at /var/adm/messages

What is encapsulation

Its done using # vxencap -g rootdg rootdisk=c0t0d0s2 in veritas


Use this operation to convert one or more disks to use the Volume Manager.
This adds the disks to a disk group and replaces existing partitions with volumes. Disk
encapsulation requires a reboot for the changes to take effect.

Difference between ufsdump and tar

Ufsdump is a flavour specific command for backup in Solaris where as tar is a general
unix command for the backup.
tar - create tape archives and add or extract files
fsdump - incremental file system dump
Ufsdump is only for ufs filesystems and since it is able to use deeper knowledge of the
internals gains some performance.

What do you do if a file system is full

• Delete old logs


• Migrate/extend the file system

Limitations of tar backup

The size of files you put into a tar archive (not the archive itself)

is limited to 11 octal digits, the max. size of a single file is thus


ca. 68 GBytes.

More info pls refer to http://answers.google.com/answers/threadview?id=25116

How do you set path in solaris

PATH=$PATH:/usr/local/bin:/usr/ccs/bin:/usr/sfw/bin
export PATH

For questions or comments mail [email protected]

You might also like