Wise people learn when they can; fools learn when they must - Arthur Wellesley

Saturday, 17 January 2015

Solaris Practice -3 [Random-Answers]


                 SOLARIS PRACTICE-3 [RANDOM-answers]


A daemon is a software process that runs in the background continuously and provides the
service to the client upon request

inodes free/used
root@sol-test-1:>/# df -F ufs -oi
root@sol-test-1:>/# df  -oi
root@sol-test-1:>/# ls -i

nfs version
root@sol-test-1:>/# nfsstat -a
root@sol-test-1:>/# modinfo |grep -i nfs
root@sol-test-1:>/# cat /etc/default/nfs

list files in current dir sorted by size
root@sol-test-1:>/# du -sk |sort -n

Process Stop & Process Run
pstop <pid> & prun <pid>

to disable STOP+A
kbd -a enable|disable
vi /etc/default/kbd
KEYBOARD_ABORT=disable (remove the #)

Corrupted passwd / shadow file
restore with /etc/opasswd and run the pwconv cmd

shared memory
ipcs -m
root@sol-test-1:>/# sysdef |grep -i shmmax

how many ram cards & in which slot
prtdiag

from where df -k fetch the info
/etc/mnttab

Not on system console
check - /etc/default/login   for
CONSOLE=/dev/console [ # this line]

info about all pkgs installed on system currently
/var/sadm/install/contents

touch & cat
if file already exists touch will change the timestamp otherwise creates a 0kb file
cat will create several 0kb file at atime/option to write in that file also
or generally to dump the contetnts of file to standard o/p

to know the machine id
#hostid

on x86 (serial id)   serial is a sticker on system to identify the machine serial no
#ipmitool fru

#smbios |grep -i serial

#prtfru (on sparc)
*the serial in banner is hostid in decimal, not the machine serial


cmd to rebuild the device tree
reboot -- -r
or
#touch /reconfigure then reboot
Or
#devfsadm   or #drvconfig 

interactive boot
boot –a

the root fs is full
tunefs -m0 /
or create  a mirror with larger disk.. and sync both... then detach and make the larger one primary

what is Generic_147441-01 in uname -a
147441 is kernel patch and -01 is patch rev no.


what if /etc/deleted ? no cdrom - no net boot
might be try boot -ar
interactive boot .. which will might be recreate the missing files..or restore it from bkp


pkts are delayed or dropped ?
netstat -i (ierrs or oerrs) if they are increasing means problem with packets
if prob found then chk with ndd that on which mode the nic is operating
half duplex or full duplex

vtoc resides on sec 0 ... then bootblk on 1-15....then super block in 16-31

vtoc stores the disk structure and organization...
bootblk stores the boot related info...
superblock stores the partition related info and
 No. of data blocks
· No.of cylinder groups
· Size of data block fragment
· Description of hardware
· Name of mount point
· File system state flag ( clean , stable , active , logging or unknown)


default boot device
#eeprom
#df -kh
#printenv boot-device

Reconfigure devices without reboot
devfsadm / drvconfig
system is 32bit or 64bit
isainfo -b   /   isainfo -kv

How to remove all current routes and assign 192.168.1.100 as default router?
# route flush
# route add default 192.168.1.100

How to change the network settings?
# sys-unconfig

What all does the NVRAM store?
Ethernet Address / Host ID / Time of Day (TOD) clock and EEPROM Parameters

Where are all the port numbers stored?
/etc/services

What are the different types of "file systems" in Solaris?
There are 3 Types of file system :
1) Disk based : ufs (standard unix), hsfs (cd-rom), pcfs (Floppy)
                          Or udf (DVD and CD Rom)
2) Distributed : NFS (enables sharing of files between many types of n/w)
3) Pseudo : tmpfs (temporary), swapfs , fdfs, procfs

Which command shows the users currently logged in to system?
who ( It reads the information from /var/adm/utmpx file)

Which command displays all login and logouts?

last (It reads the information from /var/adm/wtmpx file)

No comments:

Post a Comment