| 6 | |
| 7 | == Useful Aliases == |
| 8 | |
| 9 | I use these (note, bash shell) aliases to help with debugging things. You may need to adjust some of the variables to match your system. (see the NetDRMS file 'config.local') |
| 10 | |
| 11 | {{{ |
| 12 | export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}"; echo -ne "\007"' |
| 13 | |
| 14 | export JSOC_ROOT=/opt/netdrms/ |
| 15 | export JSOC_DBHOST=sdo4localhost |
| 16 | export JSOC_DBNAME=sdac_drms |
| 17 | export JSOC_DBUSER=[CENSORED] |
| 18 | |
| 19 | export DRMS=$JSOC_ROOT |
| 20 | export SUMSSERVER=sdo4localhost |
| 21 | export PATH=$PATH:/home/sums/bin:/home/sums/scripts |
| 22 | |
| 23 | alias drms="psql -U $JSOC_DBUSER -d $JSOC_DBNAME" |
| 24 | alias sums="psql -U $JSOC_DBUSER -d ${JSOC_DBNAME}_sums -p 5434" |
| 25 | # alias jetty='sudo /opt/jetty/bin/jetty.sh' |
| 26 | # alias apachectl='sudo /usr/sbin/apachectl' |
| 27 | |
| 28 | export DERBY_HOME=/opt/derby |
| 29 | # alias ij=/opt/derby/bin/ij |
| 30 | alias ij=/opt/JMD/bin/jmdij |
| 31 | alias jmd='sudo /opt/JMD/bin/JMD.sh' |
| 32 | |
| 33 | alias sumtail='tail -f `ls -1t /usr/local/logs/SUM//sum_svc*| head -1`' |
| 34 | alias drmsq='drms -c "select count(*) from sunum_queue"' |
| 35 | alias drmsq2='drms -c "select count(*), series_name from sunum_queue group by series_name"' |
| 36 | export IJCMD='/usr/bin/java -classpath '`ls -1t /opt/JMD/jar/*.jar | head -1`' -Dij.connection.jmdDB=jdbc:derby://localhost:31001//opt/derby/derbyDB |
| 37 | org.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; |
| 40 | alias 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; |
| 42 | alias jmdspeed='tail -n 2000 `ls -1t /opt/JMD/log/*stderr* | head -1` | grep DONE | cut -d: -f1-2 | uniq -c' |
| 43 | alias jmdspeedxl='grep DONE `ls -1t /opt/JMD/log/*stderr* | head -1` | tail -n 2000 | cut -d: -f1-2 | uniq -c' |
| 44 | alias jmdspeed2='grep DONE `ls -1tr /opt/JMD/log/*stderr* | tail -3` | cut -d: -f2 | uniq -c' |
| 45 | alias jmdtail='tail -f `ls -1t /opt/JMD/log/*stderr* | head -1`' |
| 46 | alias jmdcat='cat `ls -1t /opt/JMD/log/*stderr* | head -1`' |
| 47 | }}} |
| 48 | |