Solaris is the computer operating system that Sun Microsystems provides for its family of Scalable Processor Architecture-based processors as well as for Intel-based processors. When it comes to Solaris Servers whether it is a Solaris 10 or Solaris 11 server, I should admit that I am not really exposed at. However, during the past days, I was messing around Solaris machines. The environment is not the same as on Linux machines. Arguments in commands can be very painful as they are different compared to Linux machines. Here are some tips which might be helpful.
Networking
Getting the network cards and its IP addresses :
ifconfig -a
Verify Firewall status (Enabling and Disabling the service IpFilter)
svcadm enable svc:/network/ipfilter:default
svcadm disable svc:/network/ipfilter:default
ipfstat -io
CPU
The CPU status:
psrinfo -v
Memory
Memory assigned on the Solaris Machine:
prtconf | grep Memory
Processes and Ports
Find all listening ports of all processes
ps -ef | awk '{print $2}' | xargs -I '{}' sh -c 'echo examining process {}; pfiles {}' | egrep sockname
More detailed view of all processes
ps -ef | awk '{print $2}' | xargs -I '{}' sh -c 'echo examining process {}; pfiles {}'
Architecture
Check compatibility for 32 or 64-bit binaries support (Applicable for only Solaris 10)
isainfo -v
Other interesting stuff to begin with:
To list all the services instances active, inactive and disabled as recorded in the service configuration repository.
svcs -a
Each of the services in Solaris has one log file each. It is located at
/var/svc/log
Downloading a package from a repository. The Download can be carried out on a Solaris11 machine even if the installation destination is a Solaris10 server.
/opt/csw/bin/pkgutil --stream --target=sparc:5.10 --output vim-and-others.pkg --yes --download vim
For the installation of the package on a Solaris 10 machine, use the following command:
pkgadd -d vim-and-others.pkg
Getting the list of LUNs
sudo /usr/sbin/mpathadm list lu | grep rdsk
Getting state of LUNs
for dir in *; do ssh ext0087@"$dir" 'for i in $(sudo /usr/sbin/mpathadm list lu | grep rdsk); do sudo /usr/sbin/mpathadm show lu $i; done' >> "$dir" ; done
Hope you enjoyed it. I’m looking forward to some Solaris tutorials soon.