Wednesday, December 22, 2010

Usefull Solaris command

ntpdate -u <servername>
svcadm enable svc:/network/ntp:default
/usr/lib/inet/xntpd
Display the service dependencies  : # svcs -d FMRI
Shows the Status of all Services :  # svcs –a
List the status of the service: svcs -l FMRI
Restart the service: svcadm restart FMRI
Enable a service: svcadm enable FMRI
Request information about the hung service: svcs –x
svcadm enable svc:/network/ntp:default

To check the OS as 32 or 64 bit on Solaris server
isainfo -kv
Zones:commands
zoneadm list -cv
zlogin Servername

To check teh Solaris version
cat /etc/release
uname -a
To check the Memory IOnformation
/usr/platform/sun4u/sbin/prtdiag -v
prtconf -pv | grep -i mem
To check teh CPU stat
psrinfo
Resolution for last command issue: where last command and who doesn't work

see below docs
http://sunsolve.sun.com/search/document.do?assetkey=1-25-21939-1&searchclause=clean%2420/var/adm/wtmpx

Please try the following commands with full command path:

# /usr/lib/acct/closewtmp                               <--- Stop accounting
# /bin/cp /var/adm/wtmpx /var/adm/wtmpx.old             <--- Copying the old database
# /usr/lib/acct/nulladm /var/adm/wtmpx                  <--- nullifying the wtmpx accounting database
# /usr/lib/acct/utmp2wtmp /var/adm/wtmpx                 <--- reinitializing the accounting

Now verify that /var/adm/wtmpx has been recreated with correct ownership adm group adm permissions 0644 (-rw-r--r--), and run

one more command to time stamp s the copied-out old file:

# /usr/lib/acct/acctwtmp "runacct" /var/adm/wtmpx.misaligned

To get the old accounting info :

#/bin/last -f /var/adm/wtmpx.old
To check the Defunct process
ps -ef | grep -i defunct | wc -l

To Display the all installed Patch
showrev -p
To list the all installed Package
pkginfo -l

To check teh Veritas Volume Manager Package
pkginfo -l | grep -i vxvm

1 comment: