Often as a consultant in C2B2 you get asked to work out why a production GlassFish application is running slowly. You ask the customer what monitoring they have in place and the usual answer is none. So what do you do? Well this post will give you an idea of how to knock up some rapid usable monitoring of a GlassFish server when all you've got is SSH. If you set this up in front of somebody then they will think you are a total Linux ninja!
To set up our console we are going to use a couple of linux tools which may need to be installed on the host. If they aren't there then you will have to embarrass the local Linux sysadmin by asking how he survives without them. The main one you need is tmux and the other is watch. tmux allows you to split a terminal screen into multiple terminals and watch allows you to run a command periodically.
In the next down run iftop (this provides network monitoring)
In the bottom right we will setup periodic thread dumps using watch: