List the files in current directory sorted by size
What are ways we can create users in solaris?
#useradd -d /export/home/shiva -m shiva then add a user account in /export/home directory... then see the status of password shiva user by using this command #logins -x -l shiva Output: shiva 100 ...
here Im using useradd -d /etc/export/home/shiva -m shiva, its creating a shiva user ok but im not able to assign the passwd that particular shiva user. Im getting error is permission denied, here Im l...
How can we find ram size in solaris server ?
You can also use given command:
prtconf | head -3 | grep Mem
Code
/usr/platform/sun4u/sbin/prtdiag -v
What is the big difference between /dev/dsk and /dev/rdsk ?
Raw device deals with sectors the smallest units in disks which is 512 Bytes
Block device deals with blocks which are 8 K Bytes each in Solaris.
/dev/dsk-block device /dev/rdsk -raw device
In /dev/rdsk if the data which is written did not used full 512bytes of a sector then for the next time we cannot use the left space.
where as /dev/dsk maintains a buffer memory from where the data is copied to disk so there is no loss of space.
Define major number and minor number ?
Major number specify the specific device driver for that device.
Minor number specify the specific unit for that device.
Major Number: major number defines the device class.
Minor Number: minor number defines the members in that device class.
What is the command to find out the nfs version in solaris?
pkginfo -l nfs (pakage name)
By seeing the file /etc/default/nfs
by executing the command nfsstat-m
How to take backup from solaris server?
boot -s
fsck /dev/rdks/c1t0d0s0
#ufsdump 0uf /dev/rmt/0 /dev/rdsk/c1t0d0s0
for restore
#ufsrestore /dev/rmt/0 /
The arp command is used to manage entries in the ARP cache. To display the entries in the ARP cache, use the a option,
How do we know how many lan cards we have in server?
dladm show-dev
ifconfig -a (for configured LAN cards)
We can use below commands also to check how many LAN cards:
kstat -c net | grep net
/usr/platform/sun4u/sbin/prtdiag -v
How to find out GLobal zone name from a non-global zone?
#zoneadm -z nonglobalzonename list
netstat -p|grep SP
or
arp -a|grep SP
What is function of arp-a and what is function of dladm show-dev?
The arp command is used to manage entries in the ARP cache. To display the entries in the ARP cache, use the a option.
#arp -a
This command user in solaris for display all configure and not configure lan card who are connect in server.
When would you want to reconfigure the kernel and how would you do it?
Is Solaris the kernel is Dynamic as it is System V. We do not configure the kernel per say, we download and install a newer version. Saying that, we can modify the /etc/system file and adjust parameters like Oracle Memory, ensure tape drive device drivers get loaded, ect...
Normally to have the driver support
How to stop & start a process in solaris?
If you want to restart process with same PID then you can use pkill -HUP
You cannot stop a process, you have to abort the process. But you can stop the services in Solaris 10 using svcadm command. A service may contain multiple processes
Work station crashes suddenly, how will you retrieve data?
We cannot retrieve the data from crash. but we can analyze what made server or workstation crash provided the crash dumps should be enabled. we can send it oracle for review.Data can be retrieved if there is backup enabled
we can check the crash dump file. in /var/crash/hostname.xx0 ,or by dumpadm command we can find the path of crash file.
How will you add a virtual ip address to a server. Given the interface qe0 and ip 10.10.1.150?
# ifconfig qe0:1 plumb# ifconfig qe0:1 10.10.1.150 up
ifconfig qe0:1 10.10.1.150 netmask 255.255.255.0 broadcast + up
USE CMD ifconfig qe0 addiff 10.10.1.150 up
How do you determining current booted disk in Sun solaris os?
prtconf -vp|grep -i boot ----gives last booted device
who -b -------last booted time
eeprom boot-device----------gives boot device
df -h
In the /etc/default/login file, which of the following will not allow you to login remotely as root?
Console=
#vi /etc/default/login
# CONSOLE=/dev/console (Only root can login)
CONSOLE=/dev/console (normal user can login and after that can do switch as root but directly root cant login from remote)
open, #vi /etc/default/profile
go to 18th line, and comment the line CONSOLE=/dev/console to: #CONSOLE=/dev/console
Now you can do telnet to remote pc as Root admin
How can I disable stop+a utility on Sun machines, which brings system into ok> prompt?
Two way can do
1)#kbd -a (for enable|disable)
or
2)#Vi /etc/default/kbd
KEYBOARD_ABORT=disable
For temprary basis type command disable stop+Akbd -a disable
For permanent basis vi/etc/default/kb and edit keyboard_abort diable
Regards
Anupam
CMS Info Gurgaon
How to change hostname on solaris 10?
If we want change the host name permanently we have to change the entry in 3 files. Before changing 3 files first type the following command #hostname ----- here new host name is now we assign the nam...
for temp: #hostname
for permanent change :
entry in the following files:
cat /etc/nodename
cat /etc/hosts
cat /etc/inet/ipnodes
cat /etc/hostname.xxx0
Explain how will you create extra volumes?
we can create the extra volume by the soft partition methods like: metainit d701 -p d70 metainit d702 -p d70 after that format newfs /dev/md/rdsk/d701 newfs /dev/md/rdsk/c702 make entry in vfstab ...
metadb -a creates state database replicas (you can also create then using The Solaris Volume Manager software GUI) The syntax of the command is: metadb -a [-f] [-c n] [-l nnnn] disk_slice metainit ...
What type of names are used for administering disk drives in solaris environment
There are 3 types of device names: 1. Logical device names: Present in /dev and are soft links to physical device names in /devices. Used in command line (i.e., while...
c#t#d#s#
1.c# Controller number
2.t# Target number -- actually disk number
3.d# Disk number -- always d0 for SCSI disks.
4.s# Slice number
du -sk