Friday, 4 July 2014

SUN Solaris performance basic check commands


SUN Solaris performance basic check commands:
--------------------------------------------
1. How to find what Solaris release am I running on my system?
Use: cat /etc/release

2. How can I know which Solaris/hardware do I have - 32 or 64 bit?

Use: isainfo -kv

3. How to check physical memory on solaris?
Use: /usr/sbin/prtconf | grep Memory



4. What process or processes are using the most resources? To see the top processes using CPU and memory resources, use:

Use: ps -eo pid,pcpu,args | sort +1n                %cpu


Use: ps -eo pid,vsz,args | sort +1n                 kilobytes of virtual memory


Use: /usr/ucb/ps aux |more                          Output is sorted with highest users (processes) of CPU and memory at the top


5. CPU + total memory by users

Use: prstat -a

6. Top 5 oracle process

Use: prstat -u oracle -n 5 1 1


7. Other outputs

Use: prstat –c
Use: prstat –T


8. Free memory

Use:  vmstat 2 2


First line shows the stats when started, the second line gives the current stat

9. Display kernel settings

Use: sysdef –i|more


10. Processor Speed

Use: /usr/sbin/psrinfo -v | awk '/processor operates at/ {print $6}' | uniq

11. Swap info

Use: /usr/sbin/swap –s


12. Type ldd <your exe name>

This will list all the dynamic shared objects needed.

13. Extended process information

Use: /usr/ucb/ps –auxww


Some useful commands

Use: iostat -xn 5 
Use: netstat -i 1

14. Number of cpu's

Use: uname –X


15. Find Solaris model

Use: /usr/platform/`uname -i`/sbin/prtdiag|grep "System Configuration"

No comments: