Scenario Based Questions
Scenario Based Questions
Scenario Based Questions
Scenario :1
If the Unix server is not accessible(Mean to say not able to ssh/telnet the server) then what are things you
will check it in first shot.
Answer:
1.Try to ping the server to check whether server is responding or not.If not responds,then login to console
for further troubleshooting.
2. Login to hardware console(ILOM or XSCF) and try to access the OS from there(console -d 0 ).If server is
up ,then login to server and check the IP address flags(ifconfig -a) and router connectivity.
3.If the address flag is "up; running" and router connectivity also fine ,then check the ssh/telnet services.
(Ex: svcs -xv)
4.If everything is fine ,then check the system load.("w" or "uptime")
5.You will get fork errors in OS console if the system is running out resource.In these cases,you may not able
to access the system and you need to free up some memory and reduce CPU usage.
Scenario :2
Application team is requesting you to reboot the Solaris global zone.Will you reboot it immediately ? will
you wait for stakeholders approval ?
Answer:
1.You should not reboot the server without proper stake holders approvals.You need to involve incident
management team and SDM prior to rebooting the server.
2.You need to snooze the monitoring alerts from monitoring system to stop false alerts being generated
while rebooting .
3.If any cluster service is running ,please make sure you are halting the cluster properly.
4.Last but not least ,you should take all the configuration backup prior to the system rebooting.
5.Its better to have root disk details (eeprom) prior to rebooting it.
Scenario :3
Application team is complaining about system performance issue.What are the things you check in the first
shot ?
Answer:
1.Run vmstat command to identify the system bottle neck.
2.Run iowait command to determine the disk I/O issue.
3.Check the NIC card status (dladm show-dev).If any link is down,then we need to involve network team to
check it .
4.Perform hardware check .(fmadm faulty)
5.Get the list of high memory & CPU consuming process list and inform the process owner to check it.
6.If you are having many local zones on that global,identify which local zones consuming more resources.
(prstat -Z) and fix the issue on that local zone first.
Scenario:4
System is totally hung. How do you reboot the server after getting proper approval. ?
Answer:
1.If the server is hung,you should not perform hard reboot in first shot.you need to force the system to
panic.
2.You need to raise support case with oracle to find the root cause using the generated crashdump .
Scenario:5
In some situations,system will not respond properly. (Ex:Unable to kill the process,Unable to umount the
filesystem,local zone went to shutting_down state and never halted)
Answer:
1.Most of the Unix admins will be faced such a situation in their experience. In these cases
you need to generate the live crashdump using "savecore -L" command and upload to oracle support to find
the root cause. In most of the cases you need to end up with rebooting the system to fix these kind of issues.
Scenario:6
What are the challenges you have faced in Unix Administration ?
Answer:
You can impress the interviewer by saying couple of tough challenge which you have faced in the past.Here
are the some of the challenges for you.
1.Recovered vxfs filesystem with help of Symantec.
2.Recovered the Solaris 10 using ZFS snapshot.
3.Recovered the destroyed zpool
4.Fixed the Strange issue with ifconfig
5.Find the root cause for high kernel usage using Dtrace.
6.Plumbed New IP address on the local zone.
7.Completed successful migration from UFS to ZFS.
8.Liveupgrade issues with local zone sitting on top of ZPOOL.
9.Patched Solaris global zone with ZFS and Non-global zone's root FS with VXFS
Scenario:7
For an example,If you are keep on getting incidents from one server.Those may be false alerts or there is an
issue within server which needs UnixAdmin attention.What are the process you will follow to fix the
repetitive alerts ?
Answer:
1.In these kind of situations ,you need to involve problem management team to fix these repetitive
alerts.Problem management team will involve multiple teams if required to fix this issue.
The Solaris Zones feature is based on the same basic concepts as FreeBSD. In both
FreeBSD Jails and Solaris Zones, each virtual view of the runtime environment is completely
segregated, and processes from one environment cannot send signals to or even see
processes in another. Both Jails and Zones share only one instance of the operating system,
though, so multiple runtime environments can coexist on a machine with only one CPU.
Two types of zones exist: global and non-global. A machine with the Solaris Zones feature
enabled has one global zone and up to 8191 non-global zones. The maximum number of
zones that a machine supports is dependent on the hardware resources available to the
machine. Each zone has an ID assigned by the system when it's booted with the global
zone, always listed as zone ID 0. Only the global zone contains a bootable Solaris kernel and
is aware of all devices, file systems, and other zones. The global zone is also the only zone
from which non-global zone configuration, installation, and management are possible.
Non-global zones contain a subset of the Solaris OS installed in the global zone and possibly
additional packages not installed in the global zone. Each non-global zone has its own
package database listing each software package installed relative to the zone and does not
share package information with the global or other non-global zones. Non-global zones also
contain localized configuration information and other zone-specific files and directories.
Non-global zones are created by the administrator of the global zone using
the zonecfgand zoneadm commands. The zonecfg command allows the administrator to
build a zone configuration specification from the template of the global zone. For complete
information on the zonecfg and zoneadm commands, see their respective Man pageson
BigAdmin. The syntax of the zonecfg
command is:
zonecfg -z zonename
zonecfg -z zonename subcommand
zonecfg -z zonename -f command_file
zonecfg help
Subcommands to the zonecfg command are:
add <resource-type>
(global scope)
add <property-name> <property-value>
(resource scope)
cancel
commit
create [-F] [ -b | -t <template> ]
delete [-F]
end
exit [-F]
export [-f output-file]
help [commands] [syntax] [usage] [<command-name>]
info [<resource-type> [property-name=property-value]*]
remove <resource-type> { <property-name>=<property-value> }
(global scope)
remove <property-name>=<property-value>
(resource scope)
revert [-F]
select <resource-type> { <property-name>=<property-value> }
set <property-name>=<property-value>
verify
To set up a basic zone, run zonecfg in interactive mode and issue the create and set
zonepath directives. The export directive prints out the current configuration information in
a form suitable for saving to a file. Since no modifications have been made at this point,
the export directive lists the default configuration:
zonecfg -z myzone
zonecfg:myzone> create
zonecfg:myzone> export
create -b
set autoboot=false
add inherit-pkg-dir
set dir=/lib
end
add inherit-pkg-dir
set dir=/platform
end
add inherit-pkg-dir
set dir=/sbin
end
add inherit-pkg-dir
set dir=/usr
end
Make any modifications to the default template at this point. This example configures the
zone myzone to autoboot, associates the IP address 192.168.1.7 and netmask
255.255.255.0 (/24) with the physical interface hme0, mounts /opt/sfw as a read-only file
system, and copies the corresponding packaging metadata into the zone. Using a writable
loopback mount, this example exports the global zone directory /data into the zone under
the name /usr/local.
zonecfg:myzone> set zonepath=/zones/myzone
zonecfg:myzone> set autoboot=true
zonecfg:myzone> add net
zonecfg:myzone:net> set address=192.168.1.7/24
zonecfg:myzone:net> set physical=hme0
zonecfg:myzone:net> end
zonecfg:myzone> add inherit-pkg-dir
zonecfg:myzone:inherit-pkg-dir> set dir=/opt/sfw
zonecfg:myzone:inherit-pkg-dir> end
zonecfg:myzone> add fs
zonecfg:myzone:fs> set dir=/usr/local
zonecfg:myzone:fs> set special=/data
zonecfg:myzone:fs> set type=lofs
zonecfg:myzone:fs> add options [nodevices]
zonecfg:myzone:fs> end
zonecfg:myzone> verify
zonecfg:myzone> export
create -b
set zonepath=/zones/myzone
set autoboot=true
add inherit-pkg-dir
set dir=/lib
end
add inherit-pkg-dir
set dir=/platform
end
add inherit-pkg-dir
set dir=/sbin
end
add inherit-pkg-dir
set dir=/usr
end
add inherit-pkg-dir
set dir=/opt/sfw
end
add fs
set dir=/usr/local
set special=/data
set type=lofs
add options nodevices
end
add net
set address=192.168.1.7/24
set physical=hme0
end
zonecfg:myzone> commit
zonecfg:myzone> export -f /tmp/myzone-zone.cfg
zonecfg:myzone> exit
The zone is now configured and the template used to do so is saved to /tmp/myzonezone.cfg. This file can later be used to configure the same zone, or slight modifications can
be made (such as the IP address) so it can be used to configure a similar zone
using zonecfg -z secondzone -f /tmp/myzone-zone.cfg. Now it's time to install the zone
with the zoneadm command. The zoneadm command has the following syntax:
zoneadm -z zonename subcommand [options]
zoneadm [-z zonename] list [options]
zoneadm help
And the zoneadm command has the following subcommands:
boot
halt
help [subcommand]
install
list [-cipv]
ready
reboot
uninstall [-F]
verify
Now boot the zone to bring up the zone's runtime environment, and log into the zone's
console with zlogin. To log out of the zone's console, press the key sequence ~.(tilde-dot).
zoneadm -z myzone boot
zlogin -C myzone
Since this is the initial boot for the zone after its installation, it has no internal naming
configuration and will prompt for the necessary information via the console. The hostname
of the zone defaults to the zone name. The chosen name should resolve to one of the zone's
IPv4 addresses based on the zone's internal naming services (DNS, LDAP, files, NIS, NIS+,
and others). The zone can use completely separate naming services from the global zone,
and even where identical naming services are configured, they are run completely
independently.
The zone uses sysidcfg to perform the configuration, so the screens should look like those
encountered after a sys-unconfig or during an initial install of the OS. Most of the
information required at this point can be preconfigured by creating the filesysidcfg in the
zone's /etc directory prior to booting the zone for the first time. The zone can also be
unconfigured with the sys-unconfig command. See the man pages
onsysidtool(1M) and sysidcfg(4) for more information.
The state of each running zone can be seen from the global zone by executing:
zoneadm list -v
ID NAME
0 global
STATUS
running
PATH
/
2 myzone
running
/zones/myzone
This verifies that the new zone is now booted and ready for use. If the zoneadm list
-v command is run from within the non-global zone, it will only show the non-global zone.
The zonename command can be run from within a zone to display the name of the currently
running zone.
A newly booted zone is similar to a newly installed machine. There are no user accounts or
configuration settings other than the system defaults, so the first step in preparing the new
zone for production use is to create accounts, add additional software, and customize the
zone's configuration. The administrator of the global zone can then log in as a normal user
in the non-global zone by specifying the -l flag tozlogin:
zlogin -l user zonename
The zlogin command can also be run from the global zone in non-interactive mode to run
commands inside a specified zone. To execute an ls -al / in myzone, one would do the
following as the administrator from the global zone:
zlogin myzone ls -al /
total 126
drwxr-xr-x 19 root other 512 Mar 8 12:45 .
drwxr-xr-x 19 root other 512 Mar 8 12:45 ..
lrwxrwxrwx
drwxr-xr-x
1 root root
drwxr-xr-x
2 root sys
dr-xr-xr-x
1 root root
drwxr-xr-x
5 root sys
drwxr-xr-x
4 root bin
drwxr-xr-x
2 root sys
dr-xr-xr-x
1 root root
drwxr-xr-x
5 root sys
2 root sys
4 root sys
The non-interactive mode of zlogin is especially useful in running scripts to administer nonglobal zones. The zlogin command also provides a failsafe mode (-S) to connect to a nonglobal zone in the event that a zone becomes damaged and will not accept logins.
To delete the zone myzone, shut it down, remove the root file system with zoneadm
uninstall, and issue the zonecfg with the delete argument:
zlogin myzone shutdown -y -i0 -g0
zoneadm -z myzone uninstall -F
zonecfg -z myzone delete -F
Obtaining and Setting Non-Global Zone Information from the Global Zone
In addition to the use of zonecfg, zoneadm, zonename, and zlogin, a variety of standard
system commands have been modified so that zone information can be viewed or modified
from the global zone.
Process Controls
The ps command now has formatting options, -o zone and -o zoneid, that print out the
zone name or zone ID of a process. One can then grep for the zone name or zone ID to get
a listing of only those processes in the specified zone(s):
/bin/ps -efo user,zone,pid,ppid,c,stime,tty,time,comm |grep myzone
root myzone 18386
1 0 12:45:24 ?
00:00 /usr/sbin/syslogd
1 0 12:47:04 ?
00:00 /usr/lib/ssh/sshd
00:03 /usr/lib/ssh/sshd
1 0 12:45:22 ?
00:00 init
1 0 12:45:33 ?
00:01 /usr/sfw/sbin/snmpd
1 0 12:45:24 ?
00:00 /usr/sbin/cron
1 0 12:45:25 ?
1 0 12:45:23 ?
00:00 /usr/lib/saf/sac
00:00 /usr/lib/autofs/automountd
00:00 /usr/lib/crypto/kcfd
1 0 12:45:23 ?
00:00 /usr/sbin/rpcbind
1 0 12:45:24 ?
00:00 /usr/sbin/nscd
1 0 12:45:25 ?
00:00 /usr/sbin/inetd
1 0 12:45:29 ?
00:00 /usr/lib/sendmail
1 0 12:45:29 ?
00:00 /usr/lib/sendmail
1 0 12:45:29 ?
00:00 /usr/lib/utmpd
1 0 12:45:09 ?
00:00 zsched
1 0 12:45:31 ?
00:00 /usr/dt/bin/dtlogin
00:00 /usr/lib/saf/ttymon
A number of commands have been enhanced to filter the information they print by zone or
to include in their input the zone that a process belongs to. The
commandsipcs, pgrep, pkill, ptree, and prstat now include a -z flag to specify a zone.
Additionally, prstat has a -Z flag to list all processes but also a summary by zone ID. This
helps quickly identify which zone is using the most resources. The truss program has also
been modified to know about Zone-specific calls but is not yet Zone-aware.
In the Solaris OS, coreadm can be used to set the core file name pattern. The pattern now
includes %z for zone name. For example, if the core file name pattern were set
to/var/core/core.%f.%p.%z in the global zone, the core for a program named foo with the
PID of 123 running in the zone myzone would be: /var/core/core.foo.123.myzone. The
zone administrator can also run coreadm inside a non-global zone to control settings for that
specific zone.
File Systems
When run from the global zone, the -Z flag to df displays mounts in all zones. By
default, df only displays mounts located within the current zone.
df -Z
/
/devices
(/dev/dsk/c0t1d0s0 ):
(/devices
):
0 blocks
/usr
(/dev/dsk/c0t1d0s3 ):
/proc
(proc
/etc/mnttab
/dev/fd
/var
/var/run
0 blocks
):
0 files
1837 files
0 blocks
(/dev/dsk/c0t1d0s4 ):
):
):
271499 files
0 blocks
):
(swap
247016 files
859490 blocks
):
(mnttab
(fd
1881482 blocks
0 files
0 files
1889810 blocks
2111168 blocks
/tmp
(swap
2111168 blocks
/zones
(/dev/dsk/c0t1d0s5 ):
239530 files
15280 files
15280 files
): 1881482 blocks
247016 files
/zones/myzone/root/opt/sfw(/opt/sfw
/zones/myzone/root/platform(/platform
): 1881482 blocks
/zones/myzone/root/sbin(/sbin
): 1881482 blocks
/zones/myzone/root/usr(/usr
):
/zones/myzone/root/usr/local(/data
859490 blocks
):
/zones/myzone/root/etc/mnttab(mnttab
/zones/myzone/root/dev/fd(fd
/zones/myzone/root/var/run(swap
247016 files
271499 files
): 1881482 blocks
/zones/myzone/root/proc(proc
):
0 blocks
):
247016 files
247016 files
1837 files
0 blocks
0 blocks
): 2111168 blocks
0 files
0 files
15280 files
/zones/myzone/root/tmp(swap
): 2111168 blocks
15280 files
Networking
The ifconfig utility has been modified in order to configure and view interfaces based on
zone granularity as well, but interfaces can only be plumbed or unplumbed from the global
zone. To place an IP interface inside a zone from the global zone:
ifconfig <interface> zone {<name> | <number>}
ifconfig hme0:3 plumb 192.168.1.8 netmask 255.255.255.0 zone myzone up
To print the list of IP interfaces limited to the global zone from the global zone, useifconfig
-aZ. Using ifconfig -a shows network interfaces for all zones.
ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4>
mtu 8232 index 1
inet 192.168.1.7 netmask ff000000
lo0:1: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4>
mtu 8232 index 1
zone myzone
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4>
mtu 1500 index 2
inet 192.168.1.4 netmask ffffff00 broadcast 192.168.1.255
ether 8:0:20:9e:b5:40
hme0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4>
mtu 1500 index 2
zone myzone
inet 192.168.1.7 netmask ffffff00 broadcast 192.168.1.255
ifconfig -aZ
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4>
If any client backup fails I have to re-run if it is hot backup other wise inform the
application or database owner regarding the re-run of the failed backup.
As backup is the critical (which are used for restoration if required) for any
organization so we need to make sure all the backup are successfull.
3) Look for any TSR (Technology Service Request) or ARMS (Access Rights
Management System) is assigned to unix team (general request Extending the file
systems / creating new mount points User Administration).
4) If any incident happens (Server rebooted by it self if any hardware component
failed) then raise the IM Ticket(Incident Management) and we are using HP
Openview Service Center for IM.
5) Apart from the above BAU (Business As Usual) Operations we need to work on
the New Projects (if any) if no new-projects then working on the scripts to automate
the jobs and fine tuning the process.
Consider the following crontab entry: 59 23 13 * 5 /wipe.disk What time will this
cronjob
Consider the following crontab entry: 59 23 13 * 5 /wipe.disk What time will this
cronjob run?
11:59PM
Read Answers (8)
commas
View Question
prtvtoc /dev/rdsk/c0t0d0s0
Container: zone + resource management The ability to control resource usage for
processes,task and zones.Resources can be CPU level,RAM,virtual memory,Kernel
level tables etc.
Sun Logical Domains or LDoms is a full virtual machine that runs an independent
operating system instance and contains virtualized CPU, memory, storage, console,
and cryptographic devices. This technology allows you to allocate a system
resources into logical groupings and create multiple, discrete systems, each with
their own operating system, resources, and identity within a single computer
system. We can run a variety of applications software in different logical domains
and keep them independent of performance and security purposes. The LDoms
environment can help to achieve greater resource usage, better scaling, and
increased security and isolation.
Growfs is generally used for expanding storage capacity of volume with existing
data.
fmthard is tools for copy VTOC (Virtual table of contents)one Hard drive to other
Hard drive
Q: How can i disable STOP+A utility on SUN machines, which brings system into
OK> prompt?
Sticky Bit is a permission bit that protects the files with in a Directory. If the
directory has sticky bit set, a file can be deleted by the owner of the file, the owner
of the directory or root. This Prevents a user from deleting other users files from
public directories . The sticky bit is displayed as the letter t in the execute field for
'others'.
Q: What is ndd?
ndd utility is used to examine and set kernel parameters, namely the TCP/IP drivers.
To see which parameters are available for a particular driver, use the following ndd
command:
# ndd /dev/hme \?
Q: Setting parameters
prstat
Q: What is /etc/system
In Solaris 10 you can find the RAM Size using sdtwsinfo command. This command
gives complete Workstation Configuration Information in a pop up window.
Q: What is jumpstart and what are the various steps used in it.
Lights out management is the abbrevation and some of the Sun severs a use this
fecility to emotly operate the Sun sever by conneting a rollover cable from LOM port
to a laptop. There is no need to turn on the server , but if the server is just
powered , you can connect the laptop to the LOM port and operate the conected
Server. you have to inert the ip address of the LOM port in the IE and by this way
you can acess the Server to operate it
a.boot PROM
b.boot programs like bootblk,ufsboot
c.kernel initialization like loading modules
d.init phase
isainfo b
prtvtoc /dev/rdsk/c0t0d0s0
Q: Give the command that will display your default boot device?
eeprom boot-device
Devfsadm
How would you find out what version of the solaris is currently running?
uname -r is the command to know the version of the OS and uname -s for the type of OS.
How do you find out drive statistics ? iostat -E
Display Ethernet Address arp table ? arp -a
Display the inter-process communication facility status ? ipcs
Alternative for top command ? - prstat -a
Display the top most process utilizing most CPU ? - top
Given an ISO image how you mount in solaris ?
Create a loopback device file with lofiadm:
acadie# /usr/sbin/lofiadm -a /path/to/image.iso
This will create, for example, /dev/lofi/1 . It can be mounted as follows:
acadie# mount -F hsfs -o ro /dev/lofi/1 /mnt/dir
-----lofiadm -a /export/temp/software.iso /dev/lofi/1
The lofi device creates a block device version of a file. This block device can be mounted to /mnt
with the following command.
mount -F hsfs -o ro /dev/lofi/1 /nt
============================================================================
=============================
ZFS
Which command(s) would you use to setup the ZFS file system?
zfscreate
FEATURES OF ZFS
How to create ZFS File System
How to create ZFS snapshot
Restore from a ZFS snapshot
============================================================================
=======
ZONES :
Explain Zone Features & types of Zones
Features of Global Zone
1.Solaris Always boots(cold/warm) to the global zone.
2.Knows about All Hardware devices attach to system
3.Knows about all non global Zones
Features of Non-Global Zones.
1.Installed at a location on the filesystem of the Global Zone
'Zone root path' /export/home/zones/zones1 {Zone2,Zone3----} this is as root directory for this zones.
2.Share Packages with Global Zone.
3.Manage distinct hostname and table files.
4.cannot communicate with other non-global zones by default.NIC must be used, which means use
standard network API(TCP)
5.Global Zone admin can delegatenon-global zone administration
Zones Types:1.sparse Root Zones - share key fileswith global zones.
2.Whole Root Zones - require more storage
=======================================================================
Cloning works only from release 11/06.
Assume that a zone called apple is created and we are cloning to a new zone called orange. To
clone the apple zone , the apple zone must be in the installed state.
#zoneadm z apple halt
#zonecfg z apple export f /etc/zones/apple.txt ? Copies the apples configuration to a text file.
#vi /etc/zones/apple.txt ? edit the zonepath and give a new path for the new zone named orange and
issue a new ipaddress and save the file
#zonecfg z orange f /etc/zones/apple.txt
#zoneadm z orange clone apple
#zoneadm z orange boot
#zlogin C orange
The same data and users are found in the orange zone like what we created in apple zone