NSTX MDSplus Plotting Tool - Diagnosing Problems

If you experience problems with the MDS Plotting or Listing tools, such as mdsplot1.html, mdsscope.html or mdssignals.html, you may send e-mail to bdavis. This page is intended to help someone diagnose and possibly fix problems when Bill cannot be reached.

A schematic of the overall design of mdsscope.html, etc., can be seen at http://w3.pppl.gov/~bdavis/ScopeServerSchematic.gif The perl scripts parse information from the HTML forms and sends commands to the appropriate IDL routine via an open socket connection. The resulting .png file or text file is passed back to the requesting browser, and is kept in the scratch area for 10 days.

The servers for these pages run continuously on nstxops and are restarted if the "sentry" program (which runs every five minutes) does not find them running (actually, sentry will attempt to restart the server if it does not get a successful status from commands similar to the ones below).

The sentry program, written by Jim Hirsch, checks for programs in the file /usr/pppl/nstxops/etc/procs.nstxops.

To restart the servers, ssh to nstxops, and:

   su nstxops
   (your normal Linux password)
   cd /usr/pppl/nstxops/bin/web
   ./idlMDSListServer status -v
   ./idlMDSPlotServer status -v
   ./idlMDSPlotServer2549 status -v
If the programs are missing, or you think they may be hung, you can restart them (as nstxops):
   ./idlMDSListServer restart -v
   ./idlMDSPlotServer restart -v
   ./idlMDSPlotServer2549 restart -v
These programs are shell scripts, which invoke another script (with the same name, but ending in .sh). This script does some housekeeping, like purging scratch files, rotating the log file name, etc., and starts up the perl script (with the same name, but ending in .pl). In general, environmental variables are set near the top of the scripts, so any universal changes can be made through these.

There are two plot servers, for better performance. The corrsponding log files are in the directory /usr/pppl/nstxops/bin/web/log. The ports must be available before the perl scripts can work. If run the following netstat command and don't see LISTEN on a line with the port number in question, the port is available for a new program. If the port is being used, you will see something like:

     netstat -a | grep 2546
     tcp        0      0 *:2546                      *:*                         LISTEN      
To see what ports are used by the web pages:
     cd /w/nstx.pppl.gov/htdocs/nstx/Software/WebTools
     grep "form name" *.html | grep action
     
     efitflux.html:<form name="efitflux" action="http://nstxops.pppl.gov:2546/" method=GET
     mdscrossplot.html:<form name="crossplot" action="http://nstxops.pppl.gov:2546/" method=GET
     mdslarksignals.html:<form name="plotsignals" action="http://nstxops.pppl.gov:2549/" method=GET
     mdsplot1.html:<form name="plot1scope" action="http://nstxops.pppl.gov:2546/" method=GET
     mdsscopeadj.html:<form name="plotscopesadj" action="http://nstxops.pppl.gov:2546/" 
   ...

If you have comments about this page, please send e-mail to bdavis


Edited 21-Nov-2005 by: Bill Davis