Changes between Version 2 and Version 3 of jmdDebug


Ignore:
Timestamp:
03/06/15 08:47:28 (10 years ago)
Author:
joe
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • jmdDebug

    v2 v3  
    2727 
    2828export DERBY_HOME=/opt/derby 
    29 # alias ij=/opt/derby/bin/ij 
    3029alias ij=/opt/JMD/bin/jmdij 
    3130alias jmd='sudo /opt/JMD/bin/JMD.sh' 
     
    3433alias drmsq='drms -c "select count(*) from sunum_queue"' 
    3534alias drmsq2='drms -c "select count(*), series_name from sunum_queue group by series_name"' 
     35 
    3636export IJCMD='/usr/bin/java -classpath '`ls -1t /opt/JMD/jar/*.jar | head -1`' -Dij.connection.jmdDB=jdbc:derby://localhost:31001//opt/derby/derbyDB 
    3737org.apache.derby.tools.ij' 
    38  
    39 alias jmdq='echo "select count(*) as count, request_type as type, substr(series_name,1,20) as series from drms.su_cache group by request_type, series_name" | '$IJCMD; 
     38alias jmdq='echo "select count(*) as count, request_type as type, substr(series_name,1,20) as series from drms.su_cache where state <> '"'DONE'"' group by request_type, series_name" | 
     39'`ijcmd`; 
     40alias jmdq0='echo "select count(*) from drms.su_cache where state <> '"'DONE'"'" | '`ijcmd`; 
    4041alias jmdq2='echo "select count(*) as count, state, request_type as type, substr(series_name,1,20) as series from drms.su_cache group by state,request_type, series_name" | '$IJCMD; 
    41 alias jmdstale='echo "select count(*),substr(series_name,1,20),request_type, min(elapse_Time), max(elapse_time) from drms.su_cache where elapse_time > 1200 group by series_name, request_type" | '$IJCMD; 
     42alias jmdstale='echo "select count(*) as count,substr(series_name,1,20) as series,request_type as type, min(elapse_Time) as min_time, max(elapse_time) as max_time from drms.su_cache where elapse_time > 1200 group by series_name, request_type" | '$IJCMD; 
    4243alias jmdspeed='tail -n 2000 `ls -1t /opt/JMD/log/*stderr* | head -1` | grep DONE | cut -d: -f1-2 | uniq -c' 
    4344alias jmdspeedxl='grep DONE `ls -1t /opt/JMD/log/*stderr* | head -1` | tail -n 2000 | cut -d: -f1-2 | uniq -c' 
     
    4546alias jmdtail='tail -f `ls -1t /opt/JMD/log/*stderr* | head -1`' 
    4647alias jmdcat='cat `ls -1t /opt/JMD/log/*stderr* | head -1`' 
     48# alias jmdofln='echo "select su_cache.sunum, sum62.sunum from drms.su_cache as su_cache left join sum62 on su_cache.sunum = sum62.sunum where state='"'OFLN'"'; " | `ijcmd`' 
     49}}} 
     50 
     51And what they all do: 
     52 
     53{{{ 
     54drms : connect to the DRMS database using psql (command line postgres client) 
     55sums : connect to the SUMS  database using psql (command line postgres client) 
     56ij : connect to the JMD database using ij (command line derby client) 
     57 
     58jmd : script to start/stop the JMD service.  (call using `jmd start` or `jmd stop`) 
     59 
     60sumtail : tail -f the most recent sums log 
     61jmdtail : tail -f the most recent jmd log 
     62jmdcat : cat the most recent jmd log 
     63 
     64drmsq : report the number of items in the DRMS sunum_queue table 
     65drmsq2 : report the number of items per series in the DRMS sunum_queue table 
     66 
     67jmdq : report the number of items per series in the JMD drms.su_cache table that are not marked 'DONE'. 
     68jmdq0 : report the number of items (a single number) in the JMD drms.su_cache table that are not marked 'DONE'. 
     69jmdq2 : report the number of items in the JMD drms.su_cache table, broken down by series & processing state. 
     70 
     71jmdspeed : a count of how many SCPs per minute have recently completed 
     72jmdspeedxl : a count of how many SCPs per minute have completed (looks further back through the JMD logs) 
     73jmdspeed2 : a count of how many SCPs per hour have completed over the last day or so. 
     74 
     75jmdstale : report on things in the JMD drms.su_cache table that have elapsed times of more than 20 min. 
     76jmdofln : (note, requires populating a 'sum62' table) : report on which items marked as 'ofln' were on the JSOC /SUM62 partition 
    4777}}} 
    4878 
    4979 
    5080== Restarting the JMD == 
     81 
     82In your JMD directory, there should be a `bin/JMD.sh`.  It behaves like an rc script, so call it as root with either 'start' or 'stop' as an argument.  See the above 'jmd' alias which calls it using sudo, so you can do `jmd stop; jmd start`. 
    5183 
    5284