Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Service management of Sage - D
09-07-2016, 02:00 PM
Post: #2
RE: Service management of Sage
(07-12-2016 05:54 PM)YU_Xinjie Wrote:  This thread is the design of service management of Sage

The usage of service management is in
http://tab.d-thinker.org/showthread.php?tid=6164
http://tab.d-thinker.org/showthread.php?tid=6197

Format PPM

./format.sh
Code:
dt format -n NVPC k

Load metadata

./load.sh
Code:
set $cfgfile, $nodefile,  search file prefix($prefix).
echo 'Greppy system is starting.....'
tr '\n' from the $nodefile

function get_basic_info:
    get vpcs,space,ip,slot,filename, nf(how many parts one line divided by space) info from $nodefile, all vars are array var.

function make_link:
parameter: $file need to search
    if [ ! -f $file on $ip ] :
          echo '$file not on $ip" and exit
    else:
          make links with $file into  thinker stdin dir.

function gain_config() :
printf $space, $filesize, $dejavusize into $cfgfile

totalline = len of $nodefile

function gen_config()
mv vpc.$num and nrcs.$num to thinker runtime dir.

for i in range(0,totalline):
    get_basic_info()
    $host[i] = $ip
    if [ $nf -eq 2 ]  ##means file need to search
      make_link
      gain_config
   else
      print $space, 0, 0, 'n' to $cfgfile
      
gen_config()
call make datacfg to run size prog
call make read to run read prog

Start service

./start.sh
Code:
trap ctrl_c

if type ctrl_c; then
    echo "You type ctrl_c to terminate program"
    kill DT
    clean all object files and exit

if the 1st parameter  == 'nohup'; then
    nohup do_start &
else
    do_start

function do_start() {
    make run
}

Stop service

./stop.sh
Code:
dt slay -n NVPC k

Show status

./status.h
Code:
dexer --ips=$ips "ps aux" | grep -E 'vpc|nrc|scheduler|mem_home|atpd|auntie|ncat' | grep 'sage' | grep -v 'dexer' | grep -v 'grep'

Saved a copy before change.
Quote this message in a reply
Post Reply 


Messages In This Thread
Service management of Sage - D - YU_Xinjie - 07-12-2016, 05:54 PM
RE: Service management of Sage - YU_Xinjie - 09-07-2016 02:00 PM
RE: Service management of Sage - YU_Xinjie - 09-07-2016, 02:47 PM
RE: Service management of Sage - lingu - 09-07-2016, 03:53 PM
RE: Service management of Sage - YU_Xinjie - 09-07-2016, 04:11 PM
RE: Service management of Sage - lingu - 09-07-2016, 05:06 PM
RE: Service management of Sage - YU_Xinjie - 09-07-2016, 05:18 PM
RE: Service management of Sage - lingu - 09-07-2016, 03:55 PM
RE: Service management of Sage - lingu - 09-07-2016, 03:58 PM
RE: Service management of Sage - lingu - 09-07-2016, 05:35 PM
RE: Service management of Sage - YU_Xinjie - 09-07-2016, 05:53 PM
RE: Service management of Sage - lingu - 09-07-2016, 06:18 PM
RE: Service management of Sage - YU_Xinjie - 09-07-2016, 06:37 PM
RE: Service management of Sage - lingu - 09-07-2016, 06:53 PM
RE: Service management of Sage - YU_Xinjie - 09-08-2016, 04:28 PM
RE: Service management of Sage - lingu - 09-15-2016, 12:49 AM
RE: Service management of Sage - lingu - 09-07-2016, 06:52 PM
RE: Service management of Sage - YU_Xinjie - 09-08-2016, 04:48 PM
RE: Service management of Sage - lingu - 09-15-2016, 12:34 AM
RE: Service management of Sage - YU_Xinjie - 09-18-2016, 03:59 PM
RE: Service management of Sage - lingu - 09-23-2016, 10:41 PM
RE: Service management of Sage - YU_Xinjie - 09-27-2016, 11:33 AM
RE: Service management of Sage - lingu - 09-27-2016, 12:35 PM
RE: Service management of Sage - YU_Xinjie - 09-08-2016, 06:41 PM
RE: Service management of Sage - YU_Xinjie - 09-27-2016, 05:16 PM
RE: Service management of Sage - YU_Xinjie - 09-27-2016, 05:34 PM
RE: Service management of Sage - OMUD - YU_Xinjie - 10-19-2016, 06:37 PM
RE: Service management of Sage - OMUD - YU_Xinjie - 12-06-2016, 12:32 PM
RE: Service management of Sage - OMUD - YU_Xinjie - 12-06-2016, 03:32 PM
RE: Service management of Sage - OMUD - YU_Xinjie - 01-12-2017, 07:05 PM
RE: Service management of Sage - OD - YU_Xinjie - 06-02-2017, 06:24 PM
RE: Service management of Sage - D - lingu - 05-08-2019, 09:55 PM
RE: Service management of Sage - D - lingu - 05-08-2019, 10:01 PM
RE: Service management of Sage - D - xwcwt - 05-09-2019, 10:37 AM
RE: Service management of Sage - D - lingu - 05-09-2019, 06:39 PM
RE: Service management of Sage - D - lingu - 05-09-2019, 06:42 PM
RE: Service management of Sage - D - lingu - 05-09-2019, 06:52 PM
RE: Service management of Sage - D - lingu - 05-09-2019, 07:09 PM
RE: Service management of Sage - D - xwcwt - 05-09-2019, 07:12 PM
RE: Service management of Sage - D - lingu - 05-10-2019, 07:41 PM
RE: Service management of Sage - D - lingu - 05-10-2019, 07:46 PM
RE: Service management of Sage - D - xwcwt - 05-11-2019, 10:14 AM
RE: Service management of Sage - D - lingu - 05-10-2019, 07:56 PM
RE: Service management of Sage - D - lingu - 11-23-2019, 11:48 PM
RE: Service management of Sage - D - zheny - 11-24-2019, 06:09 PM
RE: Service management of Sage - D - xwcwt - 11-25-2019, 03:17 PM
RE: Service management of Sage - D - lingu - 11-23-2019, 11:30 PM

Forum Jump: