Here is an example of some custom stats easily called in screen with the “tsar” keyword.

Add the following to your .screenrc file:

bindkey -t tsar stuff 'watch --interval=1 "w;echo "";ps aux |sort -k3r|head -5;echo "";sar -u 1 1; echo "";sar -n DEV 1 1;echo "";free;echo "";echo "Established : $(netstat -an|grep -i estab|wc -l) Listening : $(netstat -an | grep -i list|wc -l)""^M'

This one gives me a quick realtime view of CPU usage, top CPU processes, network activity and memory usage.

About troyski

I'm a freelance UNIX engineer working in the UK. I'm married to Tina and between us we have six children. I'm a bit of an Apple fan boy, and all the Windows machines in the house are a thing of the past now.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Post navigation