NSTX MDSplus Plotting Tools - 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 nstxops. 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 send commands to the appropriate IDL routine via an open socket connection. The resulting .png, .jpg, html 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:

   kinit	# put in a help desk ticket to access this feature
   (your normal Linux password)
   sh  nstxops@nstxops

   cd /usr/pppl/nstxops/bin/web
   ./idlMDSListServer status -v
   ./idlMDSPlotServer status -v
   ./idlMDSPlotServer2549 status -v
   ./idlMDSPlotServer2550 status -v
   ./idlHTMLserver 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
   ./idlMDSPlotServer2550 restart -v
   ./idlHTMLserver 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 is more than one plot server for better performance. The corresponding log files are in the directory /p/nstxops/logs. The ports must be available before the perl scripts can work. If you 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 there is a bug in the IDL code being called, you can see what it is from the log file a particular server is using. Most of these are in /p/nstxops/logs, with obvious names.

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

Edited 8-Jun-2017 by Bill Davis