In my unix / linux server , there are always many process running in high CPU and use much memory , it makes the system run very slow .
Can advise if I would like to find it out , find and kill the processes which are
1) running over 3 hours with 90% CPU .
2) the process run over 12 hours
Can advise how can I write it ? or I guess these are very useful unix admin script , can advise where I can find the similiar one ?