Thursday, March 20, 2014

Solaris 10 - Notes - Daily

#traceroute -v
#netstat -an | grep LISTEN
#route -n , route -tu
#prtdiag | head
#prtdiag -v
#prtconf |grep Mem
#vmstat 5 10
#df –k –F ufs
#df –k –F vxfs
#vxdisk -p or list
#/dm/dmtool s m
#/dm/dmtool de - to deteach the mirror
#find /export/store3 -type f \( -name \*.iso \)
#find /export/store3 -type f \( -name \*.iso -o -name \*.jpg \)
#tail -f /var/adm/messages
#smbstatus -b / -s / -v
#cat /etc/release
#showrev -a
#uname -a / -rv
#root@vmshcoss01>gzcat "xxx.tar.gz" | tar -xvf -
#root@vmshcoss01>gzip -d "xxx.tar.gz" |tar -xvf -
root@vmshcoss01>tar -xvf xxx.tar
root@vmshcoss01>tar -C /myfolder -zxvf yourfile.tar.gz

Work with console session Solaris

stty rows 40 cols 80
exec /usr/bin/ksh -o emacs
export TERM

SyBase IQ - query in columns
Sybase Adaptive Server - query in rows

run the script
ctl + ad
next day
screen -r

#screen -x / -d / -r

#mount -F ufs -o remount,rw /dev/dsk/c1t0d0s0 /
#mount | head 1

#mount -o rw,remount /dev/md/dsk/d10 /
#fsck /dev/md/rdsk/d10

#cfgadm -al | grep -i c3 -  Configuration administration Hot Plug Devices

#shutdown -y -i6 -g0 - reboot
#shutdown -y -i0 -g0 - shutdown

#/etc/init.d/volmgt stop or start
#svcadm restart volfs

#pkgadd -G -d ./VBoxSolarisAdditions.pkg

Solaris 10 Single User mode
1. reboot
2. on GRUB screen - Select "Oracle Solaris 10  8/11 s10x_u10wos_17b x86"
3. Select Line "Kernel /platform/i86pc/multiboot"
4. after the multiboot add followings
"Kernel /platform/i86pc/multiboot -B console=ttya -s"
5. Then Press Enter
6. Press b to boot with that options.

Sometimes even you can login to Single user mode, system can't mount / to /a

Searching for installed OS instances…
/dev/dsk/c1t0d0s0 is under md control, skipping.
/dev/dsk/c1t1d0s0 is under md control, skipping.
No installed OS instance found.
# mount -o ro /dev/dsk/c1t0d0s0 /a
# mount -o rw /dev/dsk/c1t0d0s0 /a

To reset the root user password
#cd /a/etc
#vi  shadow
(delete pvclqIvh6tBm6)

After that you can login without typing root password, then
#passwd to change the password.
# df -hF ufs
# swap -lh

/etc/nodename - hostname
/etc/hosts = /etc/inet/ipnodes

dig +short
dig @local.dns.server
dig A +noall +answer
dig MX +noall +answer
dig NS +noall +answer 
dig ANY +noall +answer
dig -x +short

Solaris 10 DNS client & servers configuration files and log locations:
root@vmshcom01> svcs -l svc:/network/dns/server:default
root@vmshcom01> svcs -l svc:/network/dns/client:default
/etc/named.conf - BIND Configuration
/var/named/bind-log - DNS server log
/var/adm/messages - system messages
/var/svc/log/network-dns-client:default.log - SMF DNS client log (search for ERRORS and
/var/svc/log/network-dns-client:default.log - SMF DNS server log (search for ERRORS and
/var/svc/manifest/network/dns/client.xml - DNS Client Manifest Configuration
/var/svc/manifest/network/dns/server.xml - DNS Server Manifest Configuration

Solaris 10 DNS Client & servers Tools:

/usr/sbin/dig - DNS lookup utility, replaces nslookup future release of Solaris.
/usr/sbin/nslookup - DNS lookup utility, now marked obsolete and will be removed in a future release of Solaris
/usr/sbin/rndc - name server control utility
named-checkconf - named configuration file syntax checking tool
named-checkzone - zone file validity checking tool
/usr/sbin/svcs - Report SMF service status
/usr/sbin/svcadm - Manage SMF services.
/usr/sbin/svcprop - Verify SMF configuration properties



No comments:

Quote of the Day