| 1 | |
| 2 | = The JMD = |
| 3 | |
| 4 | The JMD is a tool that facilitates the download of data between sites. It was written in java by NSO staff. It |
| 5 | can operate in one of two modes, MIRROR or USER. In MIRROR mode an attempt is made to duplicate data at another site. In USER mode, |
| 6 | when a user requests data, the JMD will attempt to download it. The JMD operates in combination with the NetDRMS software, updating the |
| 7 | pertinent databases when data is downloaded. |
| 8 | |
| 9 | The directory the JMD is installed in varies between installations and for the purposes of this discussion |
| 10 | will be referred to a $JMD_HOME (although no such environment variable exists in practice). Under this directory |
| 11 | are subdirectories that can be useful for maintenance. |
| 12 | |
| 13 | === Logging === |
| 14 | |
| 15 | JMD logs are written to the directory $JMD_HOME/log/ and follow the naming convention YYYY_MM_DD.SITE.stderrout.log, for |
| 16 | instance "2014_02_10.NSO.stderrout.log". If the JMD is restarted then the existing log file has the process ID of the JMD appended |
| 17 | to it and another log file is started, so the existance of the log files "2014_01_28.NSO.stderrout.log" and "2014_01_28.NSO.stderrout.log.174918515" |
| 18 | indicates that the JMD restarted on January 28, 2014 at the NSO site. Log files list downloads that the JMD has attempted. so the line : |
| 19 | |
| 20 | {{{ |
| 21 | Feb 10, 2014 1:12:35 AM org.vso.jmd.Downloader.SCPDownloader call INFO: Th ID:[9261]; SU:[528482873]; RN:[131877486];[aia.lev1];[MIRROR]; Sz:[12490615]; STP:[DONE]; ST:[DONE] [1.0829072MB/s] [SAO] |
| 22 | }}} |
| 23 | |
| 24 | Indicates a successful download from the SAO site. The line : |
| 25 | |
| 26 | {{{ |
| 27 | Feb 10, 2014 12:07:25 AM org.vso.jmd.Downloader.SCPDownloader call INFO: Th ID:[9243]; SU:[528417871]; RN:[131843058];[aia.lev1];[MIRROR]; Sz:[10443000]; STP:[SCP]; ST:[FAIL] [N/A] [JSOC] |
| 28 | }}} |
| 29 | |
| 30 | Indicates a failed download attempt from the JSOC site. |
| 31 | |
| 32 | If the JMD is running, you should be able to see it with the command "ps aux | grep java | grep JMD" which should show something like this : |
| 33 | |
| 34 | {{{ |
| 35 | jmdUser 25395 13.6 0.4 3018892 400780 ? Sl Jan28 2550:19 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java -Xmx2048m -Djava.io.tmpdir=/my/JMD/install/JMD_v1.5.1.1/tmp \ |
| 36 | -jar /my/JMD/install/JMD_v1.5.1.1/jar/JMD_v1.6.4.0.jar --id NSO --port 8080 --log /my/JMD/install/JMD_v1.5.1.1/log --run /my/JMD/install/JMD_v1.5.1.1/tmp --minThreads 10 --maxThreads 80 --cfg /my/JMD/install/JMD_v1.5.1.1/cfg/JMD.cfg |
| 37 | }}} |
| 38 | |
| 39 | Different versions of the JMD will have different command line arguments, but they should all show java running a .jar file, and they should all reference a configuration file (in this case |
| 40 | /my/JMD/install/JMD_v1.5.1.1/cfg/JMD.cfg). The configuration file defines the parameters the JMD runs with and is generally human readable. It typically resides in the $JMD_HOME/cfg directory. |
| 41 | |
| 42 | === Control Scripts=== |
| 43 | |
| 44 | Scripts relating to JMD operation reside in the $JMD_HOME/bin directory. The primary script is JMD.sh which can be used to start, stop and restart the JMD. Running this script |
| 45 | without any arguments will cause it to print a message explaining its syntax. |
| 46 | |
| 47 | The script jmd_admin.pl can be used to initiate a JMD download, reload the config file, set the level of logging verbosity or generate statistics. Again, running the script without arguments prints |
| 48 | a message explaining its syntax. |
| 49 | |
| 50 | The script jmdij gives access to the underlying derby database (see below). |
| 51 | |
| 52 | === The JMD database === |
| 53 | |
| 54 | The JMD incorporates a lightweight third party java-based SQL database. This is used to track what the JMD is currently processing (including errors). |
| 55 | |
| 56 | === Debugging commands === |
| 57 | |
| 58 | 1. [wiki:pingJMD Pinging the JMD - the "Are you there" test] |
| 59 | |
| 60 | |