The purpose of this exercise is to dump the output of
ps sorted by command.
While the system is running we wish to dump all the running process sorted by command in a file.
There is a sort option in Linux like below.
ps -ef --sort -comm | grep -v grep | grep java > /tmp/preboot.log
After the server reboots and all the processes started afresh I wish to again dump the output like below.
ps -ef --sort -comm | grep -v grep | grep java > /tmp/postboot.log
diff /tmp/preboot.log /tmp/postboot.log we can be sure that all processes have been started alright is no difference is found..
The above works in Linux and does not work in Solaris.
Please suggest any solution for my requirement of pre & post reboot check for the process for Solaris.