Conky to Monitor WLS Managed Servers
        Posted  
        
            by John Graves
        on Oracle Blogs
        
        See other posts from Oracle Blogs
        
            or by John Graves
        
        
        
        Published on Thu, 29 Mar 2012 21:33:22 -0500
        Indexed on 
            2012/03/30
            5:37 UTC
        
        
        Read the original article
        Hit count: 495
        
/Oracle
I've been using a little utility on my linux-based machines for years called conky. It can be used to monitor system resources, but I wanted to modify it to monitor my WebLogic managed servers too.
 
Once installing conky, you'll need to update the .conkyrc file. Here is a simple example.
Basically, the important lines are these:
- Admin  (7001) ${if_empty ${exec /usr/sbin/lsof -i :7001 | grep LISTEN}}${color red}DOWN${color} ${else}${color green} UP ${color}(${tcp_portmon 7001 7001 count}) ${endif}
- OSB    (8011) ${if_empty ${exec /usr/sbin/lsof -i :8011 | grep LISTEN}}${color red}DOWN${color} ${else}${color green} UP ${color}(${tcp_portmon 8011 8011 count}) ${endif}
- BAM    (9001) ${if_empty ${exec /usr/sbin/lsof -i :9001 | grep LISTEN}}${color red}DOWN${color} ${else}${color green} UP ${color}(${tcp_portmon 9001 9001 count}) ${endif}
- DB     (1521) ${if_empty ${exec /usr/sbin/lsof -i :1521 | grep LISTEN}}${color red}DOWN${color} ${else}${color green} UP ${color}(${tcp_portmon 1521 1521 count}) ${endif} 
  It uses lsof to find out if ports are in use. 
Here is a video showing it in action.
© Oracle Blogs or respective owner