Rigorous and Reliable (RAR)
BIBO -- O - Printable Version

+- Rigorous and Reliable (RAR) (http://rar.shufangkeji.com:60380)
+-- Forum: 大计算 (/forumdisplay.php?fid=257)
+--- Forum: 应用 (/forumdisplay.php?fid=363)
+---- Forum: BIBO (/forumdisplay.php?fid=602)
+---- Thread: BIBO -- O (/showthread.php?tid=9121)


BIBO -- O - lingu - 09-03-2020 11:53 PM

[done] p1. implement delete function in procone.py
[todo] p2. make bibo a module -- cod://bibo It installs the client and mid-tier programs of bibo including the tests.


BIBO means BIBliOgraphy. BIBO matches an article with most related articles in an corpus.

We maintain several BIBO systems.

There is BIBO system on wp289b
We build a BIBO system on limbo305
We build BIBO system on g1b for procuratorate (this system will be moved to limbo30-2 soon

We record designers' info for cod://prada/procuratorate

Users' info about BIBO

---
20210812/zhihao: link U info
20210809/zhihao: link BIBO on wp289b
20210808/zhihao: BIBO on limbo305
20201006/zhihao: add BIBO M info
20200926/zhihao: add p2
20200924/zhihao: move designers' info and BIBO system
20200923/zhihao: add $bibo_base
20200923/zhihao: update tellThinker and procone.py
20200923/lingu: split blocks.
20200923/zhihao: update talk2thinker pseudocode
20200922/zhihao: add designers' info
20200917/lingu: specify simpleserv igate.
20200915/linye: add Designers' info and Maintainers' info.
20200909/zhihao: add cog


RE: Design of BIBO - lingu - 09-09-2020 08:58 AM

BIBO code is current in cod://prada/procuratorate


RE: BIBO - lingu - 09-09-2020 08:59 AM

zhihao pls work as a cog for bibo.


RE: BIBO - zhihao - 09-09-2020 04:45 PM

(09-09-2020 08:59 AM)lingu Wrote:  zhihao pls work as a cog for bibo.

updated headpost


RE: BIBO - lingu - 09-11-2020 02:28 PM

目前BIBO的运行比较复杂,要启动simpleserv和Data Thinker,并联通端口。

linye - 之前大部分BIBO功能都在g1b,请将think, sage, BIBO部署到limbo30-2,这样我们可以在limbo30-2上直接启动BIBO,不依赖g1b。

另外,我建议请把BIBO变成一个服务,用systemctl start bibo.service启动。
RR linye

ymy - 之前联通端口用ssh,不太稳定,请直接通过ada开通管道,通过ada:20050对外提供limbo30-2的simpleserve端口 - tcp端口62818 , 通过ada:6580提供limbo30-1的web端口 - tcp端口80. 另外,通过igate direct服务提供limbo30-1, limbo30-2的SSH服务 - tcp端口22


RE: BIBO - linye - 09-11-2020 04:16 PM

(09-11-2020 02:28 PM)lingu Wrote:  目前BIBO的运行比较复杂,要启动simpleserv和Data Thinker,并联通端口。

linye - 之前大部分BIBO功能都在g1b,请将think, sage, BIBO部署到limbo30-2,这样我们可以在limbo30-2上直接启动BIBO,不依赖g1b。

另外,我建议请把BIBO变成一个服务,用systemctl start bibo.service启动。
RR linye

收到


RE: BIBO - linye - 09-15-2020 01:47 PM

20200915 1245/linye used the following command to test the query function, and shows the result:
Code:
[linye@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat limbo30-2 20050
{
"code": 200,
"msg": "ok",
"children": [
  {
   "keys": [
     {
       "type": "key1",
       "value": "抢劫",
       "detailid": "087e0145e4a911ea987a005056c00001"
     },
     {
       "type": "key1",
       "value": "抢劫",
       "detailid": "087e0216e4a911ea987a005056c00001"
     },
     {
       "type": "key1",
       "value": "抢劫",
       "detailid": "087e02cee4a911ea987a005056c00001"
     }
   ],
   "caseid": "67be23689e6311eabceb005056c00001",
   "caseyear": 2014,
   "casetitle": "张某、沈某某等七人抢劫案",
   "casetype": "最高人民检察院指导性案例",
   "caserate": "5.00",
   "caseaction": "抢劫罪",
   "score": 100
  },
  {
   "keys": [
     {
       "type": "key1",
       "value": "盗窃",
       "detailid": "087b7c01e4a911ea987a005056c00001"
     },
     {
       "type": "key1",
       "value": "盗窃",
       "detailid": "087b7e26e4a911ea987a005056c00001"
     }
   ],
   "caseid": "67be26729e6311eabceb005056c00001",
   "caseyear": 2017,
   "casetitle": "张四毛盗窃案",
   "casetype": "最高人民检察院指导性案例",
   "caserate": "5.00",
   "caseaction": "盗窃罪",
   "score": 100
  },
  {
   "keys": [
     {
       "type": "key3",
       "value": "入户抢劫",
       "detailid": "087dfc79e4a911ea987a005056c00001"
     },
     {
       "type": "key2",
       "value": "入户抢劫",
       "detailid": "087dfc79e4a911ea987a005056c00001"
     },
     {
       "type": "key1",
       "value": "抢劫、盗窃",
       "detailid": "087dfc79e4a911ea987a005056c00001"
     },
     {
       "type": "key3",
       "value": "补充起诉",
       "detailid": "087dfd91e4a911ea987a005056c00001"
     },
     {
       "type": "key2",
       "value": "入户抢劫",
       "detailid": "087dfd91e4a911ea987a005056c00001"
     },
     {
       "type": "key1",
       "value": "抢劫、盗窃",
       "detailid": "087dfd91e4a911ea987a005056c00001"
     },
     {
       "type": "key2",
       "value": "入户抢劫",
       "detailid": "087dfe86e4a911ea987a005056c00001"
     },
     {
       "type": "key1",
       "value": "抢劫、盗窃",
       "detailid": "087dfe86e4a911ea987a005056c00001"
     }
   ],
   "caseid": "67be23409e6311eabceb005056c00001",
   "caseyear": 2014,
   "casetitle": "陈邓昌抢劫、盗窃,付志强盗窃案",
   "casetype": "最高人民检察院指导性案例",
   "caserate": "5.00",
   "caseaction": "抢劫罪",
   "score": 100
  },
  {
   "keys": [
     {
       "type": "key1",
       "value": "抢劫",
       "detailid": "087b8e5ae4a911ea987a005056c00001"
     },
     {
       "type": "key1",
       "value": "抢劫",
       "detailid": "087b8faee4a911ea987a005056c00001"
     }
   ],
   "caseid": "67be23909e6311eabceb005056c00001",
   "caseyear": 2016,
   "casetitle": "马世龙(抢劫)核准追诉案",
   "casetype": "最高人民检察院指导性案例",
   "caserate": "5.00",
   "caseaction": "抢劫罪",
   "score": 100
  }
]
}



RE: BIBO - linye - 09-15-2020 04:49 PM

(09-11-2020 04:16 PM)linye Wrote:  
(09-11-2020 02:28 PM)lingu Wrote:  目前BIBO的运行比较复杂,要启动simpleserv和Data Thinker,并联通端口。

linye - 之前大部分BIBO功能都在g1b,请将think, sage, BIBO部署到limbo30-2,这样我们可以在limbo30-2上直接启动BIBO,不依赖g1b。

另外,我建议请把BIBO变成一个服务,用systemctl start bibo.service启动。
RR linye

收到

good to me, headpost updated.


RE: BIBO - lingu - 09-17-2020 07:59 PM

(09-03-2020 11:53 PM)lingu Wrote:  Maintainers' info.
之前大部分BIBO功能都在g1b,请将think, sage, BIBO部署到limbo30-2,这样我们可以在limbo30-2上直接启动BIBO,不依赖g1b。

zhihao pls work on this.

I am moving the manual igate connection to trajan. The simpleserv service is currently running on g1b.

I ran simpleserv on g1b-2.
Code:
18:58:12 lingu@g1b-2:/home/lingu/forest/prada/prada/procuratorate> ./simpleserv.sh

Then I set up manual igate.
Code:
nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 10.6.64.22:20050:localhost:62818 lingu@10.6.64.22

We should configure igate in our standardized way.


RE: BIBO - lingu - 09-19-2020 02:53 PM

zhihao - it looks like there is no progress in this project. You should document the logic of simpleserv, then propose a change for the insert function.


RE: BIBO - zhihao - 09-19-2020 08:29 PM

(09-19-2020 02:53 PM)lingu Wrote:  zhihao - it looks like there is no progress in this project. You should document the logic of simpleserv, then propose a change for the insert function.


simpleserv.sh
监听62818端口,执行talk2thinker.sh

talk2thinker.sh
读取一个案例请求,保存到$toneroot/newreeq文件,执行tellThinker, getresults函数

tellThinker()
将"@$spc (-1 -1 -1 -1 -1 -1) > (0 $reqno $j) $toneroot/procone.py --tycano $j"写入$toneroot/manytasks.ts作为sage执行的任务。

procone.py
在某一案例内容中搜索key{1,2,3},构建"keys": []。

getresults()
执行thinkres.py,返回procone.py查询到的结果,构建返回的json。


RE: BIBO - zhihao - 09-20-2020 01:45 AM

(09-19-2020 08:29 PM)zhihao Wrote:  
(09-19-2020 02:53 PM)lingu Wrote:  zhihao - it looks like there is no progress in this project. You should document the logic of simpleserv, then propose a change for the insert function.


simpleserv.sh
监听62818端口,执行talk2thinker.sh

talk2thinker.sh
读取一个案例请求,保存到$toneroot/newreeq文件,执行tellThinker, getresults函数

tellThinker()
将"@$spc (-1 -1 -1 -1 -1 -1) > (0 $reqno $j) $toneroot/procone.py --tycano $j"写入$toneroot/manytasks.ts作为sage执行的任务。

procone.py
在某一案例内容中搜索key{1,2,3},构建"keys": []。

getresults()
执行thinkres.py返回procone.py查询到的结果,构建返回的json。

我想在talk2thinker.sh的 flog_enable_timestamp=True flog " received new case in $newcasepfn" 下面加上以下代码,把接收到的案例信息存放到文件夹名最大的目录内
Code:
...
...
  /bin/cp $reqpfn $newcasepfn
  flog_enable_timestamp=True flog "    received new case in $newcasepfn"

  # if "type":"insert"
  casetype=`jq '.type' $newcasepfn`
  if [[ $casetype == "\"insert\"" ]]; then
    newdir=$(ls /thinker/globe/udata/lingu/testy/procuratorate/tests/typical | wc -l)
    mkdir $newdir
    casecnt=$((++newdir))
    cp $newcasepfn $newdir/insert.json

    echo -e "{\n\
    "code": 200,\n\
    "msg": "ok",\n\
    "children": []\n\
    }"
    exit 0
  fi

RR lingu


RE: BIBO - zhihao - 09-22-2020 01:30 PM

g1b上开通trajan:20050到localhost:62818的通道。启动服务时提示coolauntie: command not found
Code:
[zhihao@g1b-2 procuratorate]$ sudo bash simpleserv.sh
/home/sage2/sage/bin/sage_clear: line 34: coolauntie: command not found
^C[zhihao@g1b-2 procuratorate]$ sudo bash simpleserv.sh &
[2] 97729
[zhihao@g1b-2 procuratorate]$ ps aux | grep "ssh -t"
zhihao    79215  0.0  0.0  83556  7856 pts/44   T    11:27   0:00 ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
zhihao   101997  0.0  0.0 112728  2328 pts/44   S+   12:26   0:00 grep --color=auto ssh -t

[2]+  Stopped                 sudo bash simpleserv.sh
[zhihao@g1b-2 procuratorate]$

simpleserv服务已启动
Code:
[zhihao@g1b-2 procuratorate]$ ps aux | grep "simpleserv"
root      97729  0.0  0.0 214220  6204 pts/44   T    12:25   0:00 sudo bash simpleserv.sh
zhihao   112347  0.0  0.0 112728  2332 pts/44   S+   12:28   0:00 grep --color=auto simpleserv
[zhihao@g1b-2 procuratorate]$

尝试ncat,长时间无任何输出
Code:
[root@limbo30-1 processed]# ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050



RE: BIBO - lingu - 09-22-2020 01:37 PM

(09-19-2020 08:29 PM)zhihao Wrote:  
(09-19-2020 02:53 PM)lingu Wrote:  zhihao - it looks like there is no progress in this project. You should document the logic of simpleserv, then propose a change for the insert function.


simpleserv.sh
监听62818端口,执行talk2thinker.sh

talk2thinker.sh
读取一个案例请求,保存到$toneroot/newreeq文件,执行tellThinker, getresults函数

tellThinker()
将"@$spc (-1 -1 -1 -1 -1 -1) > (0 $reqno $j) $toneroot/procone.py --tycano $j"写入$toneroot/manytasks.ts作为sage执行的任务。

procone.py
在某一案例内容中搜索key{1,2,3},构建"keys": []。

getresults()
执行thinkres.py,返回procone.py查询到的结果,构建返回的json。

Why do you just write it here without generating any results?

Ask for review, then update the headpost.

Use [ code ] to wrap pseudocode.


RE: BIBO - lingu - 09-22-2020 01:40 PM

(09-20-2020 01:45 AM)zhihao Wrote:  
(09-19-2020 08:29 PM)zhihao Wrote:  
(09-19-2020 02:53 PM)lingu Wrote:  zhihao - it looks like there is no progress in this project. You should document the logic of simpleserv, then propose a change for the insert function.


simpleserv.sh
监听62818端口,执行talk2thinker.sh

talk2thinker.sh
读取一个案例请求,保存到$toneroot/newreeq文件,执行tellThinker, getresults函数

tellThinker()
将"@$spc (-1 -1 -1 -1 -1 -1) > (0 $reqno $j) $toneroot/procone.py --tycano $j"写入$toneroot/manytasks.ts作为sage执行的任务。

procone.py
在某一案例内容中搜索key{1,2,3},构建"keys": []。

getresults()
执行thinkres.py返回procone.py查询到的结果,构建返回的json。

我想在talk2thinker.sh的 flog_enable_timestamp=True flog " received new case in $newcasepfn" 下面

Dont specify the location like this. Reply the existing pseudocode, and specify what you want to do.

Quote:加上以下代码,把接收到的案例信息存放到文件夹名最大的目录内

...
...
/bin/cp $reqpfn $newcasepfn
flog_enable_timestamp=True flog " received new case in $newcasepfn"

# if "type":"insert"
casetype=`jq '.type' $newcasepfn`
if [[ $casetype == "\"insert\"" ]]; then
newdir=$(ls /thinker/globe/udata/lingu/testy/procuratorate/tests/typical | wc -l)
mkdir $newdir
casecnt=$((++newdir))
cp $newcasepfn $newdir/insert.json

OK.

Quote: echo -e "{\n\
"code": 200,\n\
"msg": "ok",\n\
"children": []\n\
}"
exit 0
fi

i dont know whether it is a good idea to generate the response here. But it is okay to design like this now and we can improve later.

Quote:RR lingu

OK.

But don't write code. Write pseudocode. Don't you know this rule?


RE: BIBO - lingu - 09-22-2020 01:45 PM

(09-22-2020 01:30 PM)zhihao Wrote:  g1b上开通trajan:20050到localhost:62818的通道。启动服务时提示coolauntie: command not found
Code:
[zhihao@g1b-2 procuratorate]$ sudo bash simpleserv.sh
/home/sage2/sage/bin/sage_clear: line 34: coolauntie: command not found
[/quote]

here is an error. Didn't you see it? Should figure out the reason and solve the problem.

[quote]
^C[zhihao@g1b-2 procuratorate]$ sudo bash simpleserv.sh &
[2] 97729
[zhihao@g1b-2 procuratorate]$ ps aux | grep "ssh -t"
zhihao    79215  0.0  0.0  83556  7856 pts/44   T    11:27   0:00 ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
zhihao   101997  0.0  0.0 112728  2328 pts/44   S+   12:26   0:00 grep --color=auto ssh -t

[2]+  Stopped                 sudo bash simpleserv.sh
[zhihao@g1b-2 procuratorate]$

simpleserv服务已启动
Code:
[zhihao@g1b-2 procuratorate]$ ps aux | grep "simpleserv"
root      97729  0.0  0.0 214220  6204 pts/44   T    12:25   0:00 sudo bash simpleserv.sh
zhihao   112347  0.0  0.0 112728  2332 pts/44   S+   12:28   0:00 grep --color=auto simpleserv
[zhihao@g1b-2 procuratorate]$

尝试ncat,长时间无任何输出
Code:
[root@limbo30-1 processed]# ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050

what's in simpleserv's log?


RE: BIBO - zhihao - 09-22-2020 01:52 PM

(09-22-2020 01:45 PM)lingu Wrote:  
(09-22-2020 01:30 PM)zhihao Wrote:  g1b上开通trajan:20050到localhost:62818的通道。启动服务时提示coolauntie: command not found
Code:
[zhihao@g1b-2 procuratorate]$ sudo bash simpleserv.sh
/home/sage2/sage/bin/sage_clear: line 34: coolauntie: command not found
^C[zhihao@g1b-2 procuratorate]$ sudo bash simpleserv.sh &
[2] 97729
[zhihao@g1b-2 procuratorate]$ ps aux | grep "ssh -t"
zhihao    79215  0.0  0.0  83556  7856 pts/44   T    11:27   0:00 ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
zhihao   101997  0.0  0.0 112728  2328 pts/44   S+   12:26   0:00 grep --color=auto ssh -t

[2]+  Stopped                 sudo bash simpleserv.sh
[zhihao@g1b-2 procuratorate]$

simpleserv服务已启动
Code:
[zhihao@g1b-2 procuratorate]$ ps aux | grep "simpleserv"
root      97729  0.0  0.0 214220  6204 pts/44   T    12:25   0:00 sudo bash simpleserv.sh
zhihao   112347  0.0  0.0 112728  2332 pts/44   S+   12:28   0:00 grep --color=auto simpleserv
[zhihao@g1b-2 procuratorate]$

尝试ncat,长时间无任何输出
Code:
[root@limbo30-1 processed]# ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050

what's in simpleserv's log?

simpleserv.log内容如下
Code:
[zhihao@g1b-2 zhihao]$ pwd
/thinker/local/today/users/zhihao
[zhihao@g1b-2 zhihao]$ ls
auntie.log      procone-16.log  procone-25.log  procone-7.log
procone-10.log  procone-17.log  procone-2.log   procone-8.log
procone-11.log  procone-19.log  procone-3.log   procone-9.log
procone-12.log  procone-1.log   procone-4.log   sage.log
procone-13.log  procone-23.log  procone-5.log   simpleserv.log
procone-14.log  procone-24.log  procone-6.log   talk2thinker-x.log
[zhihao@g1b-2 zhihao]$ cat simpleserv.log
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
working [0920-18:45:41]
      received: /{"type":"query","query":"陈邓昌抢劫、盗窃,付志强盗窃案(检例第17号)【推送字段】入户抢劫入户盗窃+暴力【关键词】第二审程序刑事抗诉入户抢劫盗窃罪补充起诉【基本案情】被告人陈邓昌,男,​贵州省人,1989年出生,无业。被告人付志强,男,贵州省人,1981年出生,农民。一、抢劫罪2012年2月18日15时,被告人陈邓昌携带螺丝刀等作案工具来到广东​省佛山市禅城区澜石石头后二村田边街10巷1号的一间出租屋,撬门进入房间盗走现金人民币100元,后在客厅遇到被害人陈南姐,陈邓昌拿起铁锤威胁不让其喊叫,并逃离现场​。二、盗窃罪1.2012年2月23日,被告人付志强携带作案工具来到广东省佛山市高明区荷城街道井溢村398号302房间,撬门进入房间内盗走现金人民币300元。2.​2012年2月25日,被告人付志强、陈邓昌密谋后携带作案工具到佛山市高明区荷城街道井溢村287号502出租屋,撬锁进入房间盗走一台华硕笔记本电脑(价值人民币29​05元)。后二人以1300元的价格销赃。3.2012年2月28日,被告人付志强携带作案工具来到佛山市高明区荷城街道井溢村243号402房间,撬锁进入房间后盗走现​金人民币1500元。4.2012年3月3日,被告人付志强、陈邓昌密谋后携带六角匙等作案工具到佛山市高明区荷城街道官当村34号401房,撬锁进入房间后盗走现金人民​币700元。5.2012年3月28日,被告人陈邓昌、叶其元、韦圣伦(后二人另案处理,均已判刑)密谋后携带作案工具来到佛山市禅城区跃进路31号501房间,叶其元负​责望风,陈邓昌、韦圣伦二人撬锁进入房间后盗走联想一体化电脑一台(价值人民币3928元)、尼康P300数码相机一台(价值人民币1813元)及600元现金人民币。后​在逃离现场的过程中被人发现,陈邓昌等人将一体化电脑丢弃。6.2012年4月3日,被告人付志强携带作案工具来到佛山市高明区荷城街道岗头冯村283号301房间,撬锁​进入房间后盗走现金人民币7000元。7.2012年4月13日,被告人陈邓昌、叶其元、韦圣伦密谋后携带作案工具来到佛山市禅城区石湾凤凰路隔田坊63号5座303房间​,叶其元负责望风,陈邓昌、韦圣伦二人撬锁进入房间后盗走现金人民币6000元、港币900元以及一台诺基亚N86手机(价值人民币608元)。【诉讼过程】2012年4​月6日,付志强因涉嫌盗窃罪被广东省佛山市公安局高明分局刑事拘留,同年5月9日被逮捕。2012年5月29日,陈邓昌因涉嫌盗窃罪被佛山市公安局高明分局刑事拘留,同年​7月2日被逮捕。2012年7月6日,佛山市公安局高明分局以犯罪嫌疑人付志强、陈邓昌涉嫌盗窃罪向佛山市高明区人民检察院移送审查起诉。2012年7月23日,高明区人​民检察院以被告人付志强、陈邓昌犯盗窃罪向佛山市高明区人民法院提起公诉。一审期间,高明区人民检察院经进一步审查,发现被告人陈邓昌有三起遗漏犯罪事实。2012年9月​24日,高明区人民检察院依法补充起诉被告人陈邓昌入室盗窃转化为抢劫的犯罪事实一起和陈邓昌伙同叶其元、韦圣伦共同盗窃的犯罪事实二起。2012年11月14日,佛山市​高明区人民法院一审认为,检察机关指控被告人陈邓昌犯抢劫罪、盗窃罪,被告人付志强犯盗窃罪的犯罪事实清楚,证据确实充分,罪名成立。被告人陈邓昌在入户盗窃后被发现,为​抗拒抓捕而当场使用凶器相威胁,其行为符合转化型抢劫的构成要件,应以抢劫罪定罪处罚,但不应认定为“入户抢劫”。理由是陈邓昌入户并不以实施抢劫为犯罪目的,而是在户内​临时起意以暴力相威胁,且未造成被害人任何损伤,依法判决:被告人陈邓昌犯抢劫罪,处有期徒刑三年九个月,并处罚金人民币四千元;犯盗窃罪,处有期徒刑一年九个月,并处罚​金人民币二千元;决定执行有期徒刑五年,并处罚金人民币六千元元。被告人付志强犯盗窃罪,处有期徒刑二年,并处罚金人民币二千元。2012年11月19日,佛山市高明区人​民检察院认为一审判决适用法律错误,造成量刑不当,依法向佛山市中级人民法院提出抗诉。2013年3月21日,佛山市中级人民法院二审判决采纳了抗诉意见,撤销原判对原审​被告人陈邓昌抢劫罪量刑部分及决定合并执行部分,依法予以改判。【抗诉理由】一审宣判后,佛山市高明区人民检察院审查认为一审判决未认定被告人陈邓昌的行为属于“入户抢劫​”,属于适用法律错误,且造成量刑不当,应予纠正,遂依法向佛山市中级人民法院提出抗诉;佛山市人民检察院支持抗诉。抗诉和支持抗诉理由是:1.原判决对“入户抢劫”的理​解存在偏差。原判决以“暴力行为虽然发生在户内,但是其不以实施抢劫为目的,而是在户内临时起意并以暴力相威胁,且未造成被害人任何损害”为由,未认定被告人陈邓昌所犯抢​劫罪具有“入户”情节。根据2005年7月《最高人民法院关于审理抢劫、抢夺刑事案件适用法律若干问题的意见》关于认定“入户抢劫”的规定,“入户”必须以实施抢劫等犯罪​为目的。但是,这里“目的”的非法性不是以抢劫罪"}/ ..more
      received: // ..more
      received a blank line
  talk2thinker reqno: 0
    received new case in /thinker/storage/udata/lingu/testy/procuratorate/tests/newcase/newcase.txt [0920-18:45:41]
      ts file /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts generated
      torun   sage_user=sage2 /thinker/globe/.think/run/auntie register /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts
      auntie completes with exit code 0
    collecting results from /thinker/storage/udata/lingu/testy/procuratorate/tests/res2
Sending results: [0920-18:45:59]
{
"code": 404,
"msg": "not found",
"children": [
]
}

{
"code": 404,
"msg": "not found",
"children": [
]
}

      for exit status 1, we recycle thinker
    session returns 0
  initializing thinker state
working [0920-18:47:47]
    session returns 0
  tardy client. abandoning this session
  initializing thinker state
working [0920-19:01:27]
  tardy client. abandoning this session
    session returns 0
[zhihao@g1b-2 zhihao]$

simpleserv.log为前两天生成的文件
Code:
[zhihao@g1b-2 zhihao]$ ll
total 192
-rw-rw-r-- 1 zhihao zhihao 47638 Sep 20 19:01 auntie.log
-rw-rw-r-- 1 zhihao zhihao  4228 Sep 20 18:01 procone-10.log
-rw-rw-r-- 1 zhihao zhihao  1260 Sep 19 15:26 procone-11.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:26 procone-12.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-13.log
-rw-rw-r-- 1 zhihao zhihao   630 Sep 19 15:27 procone-14.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-16.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-17.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-19.log
-rw-rw-r-- 1 zhihao zhihao  1250 Sep 20 18:06 procone-1.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-23.log
-rw-rw-r-- 1 zhihao zhihao   630 Sep 19 15:27 procone-24.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-25.log
-rw-rw-r-- 1 zhihao zhihao  1372 Sep 20 18:06 procone-2.log
-rw-rw-r-- 1 zhihao zhihao  2058 Sep 19 15:26 procone-3.log
-rw-rw-r-- 1 zhihao zhihao   686 Sep 19 15:26 procone-4.log
-rw-rw-r-- 1 zhihao zhihao   808 Sep 19 15:26 procone-5.log
-rw-rw-r-- 1 zhihao zhihao   686 Sep 19 15:26 procone-6.log
-rw-rw-r-- 1 zhihao zhihao   625 Sep 19 15:26 procone-7.log
-rw-rw-r-- 1 zhihao zhihao   686 Sep 19 15:26 procone-8.log
-rw-rw-r-- 1 zhihao zhihao   625 Sep 19 15:26 procone-9.log
-rw-rw-r-- 1 zhihao zhihao 35974 Sep 20 19:01 sage.log
-rw-rw-r-- 1 zhihao zhihao  9058 Sep 20 19:01 simpleserv.log
-rw-rw-r-- 1 zhihao zhihao  2171 Sep 20 18:45 talk2thinker-x.log
[zhihao@g1b-2 zhihao]$



RE: BIBO - lingu - 09-22-2020 02:35 PM

(09-22-2020 01:30 PM)zhihao Wrote:  g1b上开通trajan:20050到localhost:62818的通道。启动服务时提示coolauntie: command not found

[zhihao@g1b-2 procuratorate]$ sudo bash simpleserv.sh

why sudo?

Quote:
Quote:
Quote:/home/sage2/sage/bin/sage_clear: line 34: coolauntie: command not found
^C[zhihao@g1b-2 procuratorate]$ sudo bash simpleserv.sh &
[2] 97729
[zhihao@g1b-2 procuratorate]$ ps aux | grep "ssh -t"
zhihao 79215 0.0 0.0 83556 7856 pts/44 T 11:27 0:00 ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
zhihao 101997 0.0 0.0 112728 2328 pts/44 S+ 12:26 0:00 grep --color=auto ssh -t

[2]+ Stopped sudo bash simpleserv.sh
[zhihao@g1b-2 procuratorate]$
[/code]

simpleserv服务已启动
Code:
[zhihao@g1b-2 procuratorate]$ ps aux | grep "simpleserv"
root      97729  0.0  0.0 214220  6204 pts/44   T    12:25   0:00 sudo bash simpleserv.sh
zhihao   112347  0.0  0.0 112728  2332 pts/44   S+   12:28   0:00 grep --color=auto simpleserv
[zhihao@g1b-2 procuratorate]$

尝试ncat,长时间无任何输出
Code:
[root@limbo30-1 processed]# ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050

what's in simpleserv's log?

simpleserv.log内容如下
Code:
[zhihao@g1b-2 zhihao]$ pwd
/thinker/local/today/users/zhihao
[zhihao@g1b-2 zhihao]$ ls
auntie.log      procone-16.log  procone-25.log  procone-7.log
procone-10.log  procone-17.log  procone-2.log   procone-8.log
procone-11.log  procone-19.log  procone-3.log   procone-9.log
procone-12.log  procone-1.log   procone-4.log   sage.log
procone-13.log  procone-23.log  procone-5.log   simpleserv.log
procone-14.log  procone-24.log  procone-6.log   talk2thinker-x.log
[zhihao@g1b-2 zhihao]$ cat simpleserv.log
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
working [0920-18:45:41]
      received: /{"type":"query","query":"陈邓昌抢劫、盗窃,付志强盗窃案(检例第17号)【推送字段】入户抢劫入户盗窃+暴力【关键词】第二审程序刑事抗诉入户抢劫盗窃罪补充起诉【基本案情】被告人陈邓昌,男,​贵州省人,1989年出生,无业。被告人付志强,男,贵州省人,1981年出生,农民。一、抢劫罪2012年2月18日15时,被告人陈邓昌携带螺丝刀等作案工具来到广东​省佛山市禅城区澜石石头后二村田边街10巷1号的一间出租屋,撬门进入房间盗走现金人民币100元,后在客厅遇到被害人陈南姐,陈邓昌拿起铁锤威胁不让其喊叫,并逃离现场​。二、盗窃罪1.2012年2月23日,被告人付志强携带作案工具来到广东省佛山市高明区荷城街道井溢村398号302房间,撬门进入房间内盗走现金人民币300元。2.​2012年2月25日,被告人付志强、陈邓昌密谋后携带作案工具到佛山市高明区荷城街道井溢村287号502出租屋,撬锁进入房间盗走一台华硕笔记本电脑(价值人民币29​05元)。后二人以1300元的价格销赃。3.2012年2月28日,被告人付志强携带作案工具来到佛山市高明区荷城街道井溢村243号402房间,撬锁进入房间后盗走现​金人民币1500元。4.2012年3月3日,被告人付志强、陈邓昌密谋后携带六角匙等作案工具到佛山市高明区荷城街道官当村34号401房,撬锁进入房间后盗走现金人民​币700元。5.2012年3月28日,被告人陈邓昌、叶其元、韦圣伦(后二人另案处理,均已判刑)密谋后携带作案工具来到佛山市禅城区跃进路31号501房间,叶其元负​责望风,陈邓昌、韦圣伦二人撬锁进入房间后盗走联想一体化电脑一台(价值人民币3928元)、尼康P300数码相机一台(价值人民币1813元)及600元现金人民币。后​在逃离现场的过程中被人发现,陈邓昌等人将一体化电脑丢弃。6.2012年4月3日,被告人付志强携带作案工具来到佛山市高明区荷城街道岗头冯村283号301房间,撬锁​进入房间后盗走现金人民币7000元。7.2012年4月13日,被告人陈邓昌、叶其元、韦圣伦密谋后携带作案工具来到佛山市禅城区石湾凤凰路隔田坊63号5座303房间​,叶其元负责望风,陈邓昌、韦圣伦二人撬锁进入房间后盗走现金人民币6000元、港币900元以及一台诺基亚N86手机(价值人民币608元)。【诉讼过程】2012年4​月6日,付志强因涉嫌盗窃罪被广东省佛山市公安局高明分局刑事拘留,同年5月9日被逮捕。2012年5月29日,陈邓昌因涉嫌盗窃罪被佛山市公安局高明分局刑事拘留,同年​7月2日被逮捕。2012年7月6日,佛山市公安局高明分局以犯罪嫌疑人付志强、陈邓昌涉嫌盗窃罪向佛山市高明区人民检察院移送审查起诉。2012年7月23日,高明区人​民检察院以被告人付志强、陈邓昌犯盗窃罪向佛山市高明区人民法院提起公诉。一审期间,高明区人民检察院经进一步审查,发现被告人陈邓昌有三起遗漏犯罪事实。2012年9月​24日,高明区人民检察院依法补充起诉被告人陈邓昌入室盗窃转化为抢劫的犯罪事实一起和陈邓昌伙同叶其元、韦圣伦共同盗窃的犯罪事实二起。2012年11月14日,佛山市​高明区人民法院一审认为,检察机关指控被告人陈邓昌犯抢劫罪、盗窃罪,被告人付志强犯盗窃罪的犯罪事实清楚,证据确实充分,罪名成立。被告人陈邓昌在入户盗窃后被发现,为​抗拒抓捕而当场使用凶器相威胁,其行为符合转化型抢劫的构成要件,应以抢劫罪定罪处罚,但不应认定为“入户抢劫”。理由是陈邓昌入户并不以实施抢劫为犯罪目的,而是在户内​临时起意以暴力相威胁,且未造成被害人任何损伤,依法判决:被告人陈邓昌犯抢劫罪,处有期徒刑三年九个月,并处罚金人民币四千元;犯盗窃罪,处有期徒刑一年九个月,并处罚​金人民币二千元;决定执行有期徒刑五年,并处罚金人民币六千元元。被告人付志强犯盗窃罪,处有期徒刑二年,并处罚金人民币二千元。2012年11月19日,佛山市高明区人​民检察院认为一审判决适用法律错误,造成量刑不当,依法向佛山市中级人民法院提出抗诉。2013年3月21日,佛山市中级人民法院二审判决采纳了抗诉意见,撤销原判对原审​被告人陈邓昌抢劫罪量刑部分及决定合并执行部分,依法予以改判。【抗诉理由】一审宣判后,佛山市高明区人民检察院审查认为一审判决未认定被告人陈邓昌的行为属于“入户抢劫​”,属于适用法律错误,且造成量刑不当,应予纠正,遂依法向佛山市中级人民法院提出抗诉;佛山市人民检察院支持抗诉。抗诉和支持抗诉理由是:1.原判决对“入户抢劫”的理​解存在偏差。原判决以“暴力行为虽然发生在户内,但是其不以实施抢劫为目的,而是在户内临时起意并以暴力相威胁,且未造成被害人任何损害”为由,未认定被告人陈邓昌所犯抢​劫罪具有“入户”情节。根据2005年7月《最高人民法院关于审理抢劫、抢夺刑事案件适用法律若干问题的意见》关于认定“入户抢劫”的规定,“入户”必须以实施抢劫等犯罪​为目的。但是,这里“目的”的非法性不是以抢劫罪"}/ ..more
      received: // ..more
      received a blank line
  talk2thinker reqno: 0
    received new case in /thinker/storage/udata/lingu/testy/procuratorate/tests/newcase/newcase.txt [0920-18:45:41]
      ts file /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts generated
      torun   sage_user=sage2 /thinker/globe/.think/run/auntie register /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts
      auntie completes with exit code 0
    collecting results from /thinker/storage/udata/lingu/testy/procuratorate/tests/res2
Sending results: [0920-18:45:59]
{
"code": 404,
"msg": "not found",
"children": [
]
}

{
"code": 404,
"msg": "not found",
"children": [
]
}

      for exit status 1, we recycle thinker
    session returns 0
  initializing thinker state
working [0920-18:47:47]
    session returns 0
  tardy client. abandoning this session
  initializing thinker state
working [0920-19:01:27]
  tardy client. abandoning this session
    session returns 0
[zhihao@g1b-2 zhihao]$

simpleserv.log为前两天生成的文件

It is a problem. Then you should debug it.

Quote:
Code:
[zhihao@g1b-2 zhihao]$ ll
total 192
-rw-rw-r-- 1 zhihao zhihao 47638 Sep 20 19:01 auntie.log
-rw-rw-r-- 1 zhihao zhihao  4228 Sep 20 18:01 procone-10.log
-rw-rw-r-- 1 zhihao zhihao  1260 Sep 19 15:26 procone-11.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:26 procone-12.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-13.log
-rw-rw-r-- 1 zhihao zhihao   630 Sep 19 15:27 procone-14.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-16.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-17.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-19.log
-rw-rw-r-- 1 zhihao zhihao  1250 Sep 20 18:06 procone-1.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-23.log
-rw-rw-r-- 1 zhihao zhihao   630 Sep 19 15:27 procone-24.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-25.log
-rw-rw-r-- 1 zhihao zhihao  1372 Sep 20 18:06 procone-2.log
-rw-rw-r-- 1 zhihao zhihao  2058 Sep 19 15:26 procone-3.log
-rw-rw-r-- 1 zhihao zhihao   686 Sep 19 15:26 procone-4.log
-rw-rw-r-- 1 zhihao zhihao   808 Sep 19 15:26 procone-5.log
-rw-rw-r-- 1 zhihao zhihao   686 Sep 19 15:26 procone-6.log
-rw-rw-r-- 1 zhihao zhihao   625 Sep 19 15:26 procone-7.log
-rw-rw-r-- 1 zhihao zhihao   686 Sep 19 15:26 procone-8.log
-rw-rw-r-- 1 zhihao zhihao   625 Sep 19 15:26 procone-9.log
-rw-rw-r-- 1 zhihao zhihao 35974 Sep 20 19:01 sage.log
-rw-rw-r-- 1 zhihao zhihao  9058 Sep 20 19:01 simpleserv.log
-rw-rw-r-- 1 zhihao zhihao  2171 Sep 20 18:45 talk2thinker-x.log
[zhihao@g1b-2 zhihao]$

With sudo, the user becomes root, and you should look into root's log dir.
Code:
13:32:55 lingu@g1b-2:/thinker/local/today/users/root> ll simpleserv.log
-rw-r--r-- 1 root root 331558 Sep 22 11:45 simpleserv.log
13:33:03 lingu@g1b-2:/thinker/local/today/users/root>



RE: BIBO - zhihao - 09-22-2020 02:40 PM

(09-22-2020 02:35 PM)lingu Wrote:  With sudo, the user becomes root, and you should look into root's log dir.
Code:
13:32:55 lingu@g1b-2:/thinker/local/today/users/root> ll simpleserv.log
-rw-r--r-- 1 root root 331558 Sep 22 11:45 simpleserv.log
13:33:03 lingu@g1b-2:/thinker/local/today/users/root>

是的,simpleserv.sh有新的日志,而talk2thinker.sh为前两天,说明simpleserv内代码出问题了。
Code:
[zhihao@g1b-2 root]$ pwd
/thinker/local/today/users/root
[zhihao@g1b-2 root]$ ll simpleserv.log talk2thinker-x.log
-rw-r--r-- 1 root root 331558 Sep 22 11:45 simpleserv.log
-rw-r--r-- 1 root root 116635 Sep 20 22:29 talk2thinker-x.log
[zhihao@g1b-2 root]$

通过日志定位到simpleserv.sh的该行代码‘ sage_user=sage2 /home/sage2/sage/bin/sage_clear‘过不去。
Code:
[zhihao@g1b-2 root]$ tail simpleserv.log
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
  initializing thinker state
[zhihao@g1b-2 root]$

simpleserv.sh
Code:
while true; do
  ## echo "Start servicing"
  if [[ "$reqno" == "0" ]]; then
    flog "  initializing thinker state"
    sage_user=sage2 /home/sage2/sage/bin/sage_clear
    sleep 3
  fi
  ncat --listen 62818 --sh-exec /home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh
  rr=$?
  flog "    session returns $rr"

查询sage日志,看到“.ts”缺少文件名。
Code:
[zhihao@g1b-2 root]$ pwd
/thinker/local/today/users/root
[zhihao@g1b-2 root]$ ll sage.log
-rw-r--r-- 1 root root 10515 Sep 22 11:45 sage.log
[zhihao@g1b-2 root]$ tail sage.log
  erase with /thinker/local/today/users/root/.ts log to /thinker/local/today/users/root/sage.log
  
sage_clear run by root
  erase with /thinker/local/today/users/root/.ts log to /thinker/local/today/users/root/sage.log
  
sage_clear run by root
  erase with /thinker/local/today/users/root/.ts log to /thinker/local/today/users/root/sage.log
  
sage_clear run by root
  erase with /thinker/local/today/users/root/.ts log to /thinker/local/today/users/root/sage.log
[zhihao@g1b-2 root]$

Code:
[zhihao@g1b-2 root]$ pwd
/thinker/local/today/users/root
[zhihao@g1b-2 root]$ cat .ts
@-1 (-1 -1 -1 -1 -1 -1) (-1 1 1) erase
[zhihao@g1b-2 root]$

simpleserve.sh内提及的sage_clear程序使用了coolauntie。判断是coolauntie命令没有往下执行,目前找到该命令的路径为 /thinker/bin/coolauntie。
Code:
[zhihao@g1b-2 bin]$ cat /home/sage2/sage/bin/sage_clear
#!/bin/bash
# Copyright since 2019, Ningbo Shufang Information Technology Co., Ltd.
# Copyright since 2019, Hututa Technologies Limited
# All rights reserved.
#
# sage_clear
#
# Authors: Lin Gu


set -o errexit

modname=sage

curdir=$(readlink -f $(dirname $0))
base=$curdir/../..
source /thinker/local/forest/util/utilib/bash.inc
export log_pfn=$(logpfn)

# Design:
# i from 0 to sage_atp_staff_space_cnt
# @i ( -1 -1 -1 -1 -1 -1 ) > ( 0 0 $i ) count 1
# @i ( 0 0 $i 0 0 $i ) > ( 0 1 $i ) increase 1
#      namely 1+1=2
# @sage_atp_head_space ( 0 1 0 0 1 sage_atp_staff_space_cnt ) > ( 0 2 0 ) sum
#      namely 2+2+...=2*sage_atp_staff_space_cnt
function Action () {
  # Generate command file
  todaypfn=$(todaydir)/$progname
  local turbots=${todaypfn}.ts

  echo '@-1 (-1 -1 -1 -1 -1 -1) (-1 1 1) erase' > $turbots
  flog "  erase with $turbots log to $log_pfn"
  coolauntie register $turbots >> $log_pfn
}

flog " "
flog "sage_clear run by $USER"

Action

[zhihao@g1b-2 bin]$ which coolauntie
/thinker/bin/coolauntie
[zhihao@g1b-2 bin]$

coolauntie代码内有flog相关代码,但是对应的coolauntie.log没有生成,说明命令没有执行,但是coolauntie确实位于$PATH路径内,不明白为什么不能执行
Code:
[zhihao@g1b-2 bin]$ pwd
/home/sage2/sage/bin
[zhihao@g1b-2 bin]$ head -n 20 /thinker/bin/coolauntie
#!/bin/bash

# Copyright since 2018, Ningbo Shufang Information Technology Co., Ltd.
# Copyright since 2018, Hututa Technologies Limited
# All rights reserved.
#
# A tool to help use auntie
# Refer to http://tab.d-thinker.org/showthread.php?tid=10679 for more details
#
# Authors: Xinjie Yu

progname=coolauntie

source /thinker/local/forest/util/utilib/bash.inc
flog ""
flog "[$(date)] coolauntie $*"
AUNTIE=/thinker/globe/.think/run/auntie
## set -o errexit


[zhihao@g1b-2 bin]$

Code:
[zhihao@g1b-2 root]$ pwd
/thinker/local/today/users/root
[zhihao@g1b-2 root]$ ls | grep "cool"
[zhihao@g1b-2 root]$



RE: BIBO - zhihao - 09-22-2020 03:01 PM

(09-22-2020 02:35 PM)lingu Wrote:  
(09-22-2020 01:30 PM)zhihao Wrote:  g1b上开通trajan:20050到localhost:62818的通道。启动服务时提示coolauntie: command not found

[zhihao@g1b-2 procuratorate]$ sudo bash simpleserv.sh

why sudo?

因为不用sudo的话会提示类似 “/thinker/storage/udata/lingu/testy/procuratorate/tests/typical/” permission deny的问题,但是现在无法复现。使用bash simpleserv.sh一样会卡住
Code:
[zhihao@g1b-2 procuratorate]$ bash simpleserv.sh

Code:
[zhihao@limbo30-1 processed]$ pwd
/data/20200906.1/processed
[zhihao@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050



RE: BIBO - zhihao - 09-22-2020 05:45 PM

(09-22-2020 02:40 PM)zhihao Wrote:  coolauntie代码内有flog相关代码,但是对应的coolauntie.log没有生成,说明命令没有执行,但是coolauntie确实位于$PATH路径内,不明白为什么不能执行
Code:
[zhihao@g1b-2 bin]$ pwd
/home/sage2/sage/bin
[zhihao@g1b-2 bin]$ head -n 20 /thinker/bin/coolauntie
#!/bin/bash

# Copyright since 2018, Ningbo Shufang Information Technology Co., Ltd.
# Copyright since 2018, Hututa Technologies Limited
# All rights reserved.
#
# A tool to help use auntie
# Refer to http://tab.d-thinker.org/showthread.php?tid=10679 for more details
#
# Authors: Xinjie Yu

progname=coolauntie

source /thinker/local/forest/util/utilib/bash.inc
flog ""
flog "[$(date)] coolauntie $*"
AUNTIE=/thinker/globe/.think/run/auntie
## set -o errexit


[zhihao@g1b-2 bin]$

Code:
[zhihao@g1b-2 root]$ pwd
/thinker/local/today/users/root
[zhihao@g1b-2 root]$ ls | grep "cool"
[zhihao@g1b-2 root]$

将sage_clear内出错语句单独拿到终端执行,会一直卡住,无任何输出
Code:
function Action () {
  # Generate command file
  todaypfn=$(todaydir)/$progname
  local turbots=${todaypfn}.ts

  echo '@-1 (-1 -1 -1 -1 -1 -1) (-1 1 1) erase' > $turbots
  flog "  erase with $turbots log to $log_pfn"
  coolauntie register $turbots >> $log_pfn
}

flog " "
flog "sage_clear run by $USER"

Action

Code:
[zhihao@g1b-2 ~]$ pwd
/home/zhihao
[zhihao@g1b-2 ~]$ echo '@-1 (-1 -1 -1 -1 -1 -1) (-1 1 1) erase' > turbots
[zhihao@g1b-2 ~]$ cat turbots
@-1 (-1 -1 -1 -1 -1 -1) (-1 1 1) erase
[zhihao@g1b-2 ~]$ coolauntie register turbots >> log_pfn
^C
[zhihao@g1b-2 ~]$ cat log_pfn
[zhihao@g1b-2 ~]$



RE: BIBO - lingu - 09-22-2020 05:50 PM

(09-22-2020 03:01 PM)zhihao Wrote:  因为不用sudo的话会提示类似 “/thinker/storage/udata/lingu/testy/procuratorate/tests/typical/” permission deny的问题,但是现在无法复现。使用bash simpleserv.sh一样会卡住

还是用你的用户,不要用root

把permission问题记录下来,我们找100年解法。你不记录,肯定是没法正确工作的。


RE: BIBO - lingu - 09-22-2020 05:55 PM

(09-22-2020 05:45 PM)zhihao Wrote:  
(09-22-2020 02:40 PM)zhihao Wrote:  coolauntie代码内有flog相关代码,但是对应的coolauntie.log没有生成,说明命令没有执行,但是coolauntie确实位于$PATH路径内,不明白为什么不能执行
Code:
[zhihao@g1b-2 bin]$ pwd
/home/sage2/sage/bin
[zhihao@g1b-2 bin]$ head -n 20 /thinker/bin/coolauntie
#!/bin/bash

# Copyright since 2018, Ningbo Shufang Information Technology Co., Ltd.
# Copyright since 2018, Hututa Technologies Limited
# All rights reserved.
#
# A tool to help use auntie
# Refer to http://tab.d-thinker.org/showthread.php?tid=10679 for more details
#
# Authors: Xinjie Yu

progname=coolauntie

source /thinker/local/forest/util/utilib/bash.inc
flog ""
flog "[$(date)] coolauntie $*"
AUNTIE=/thinker/globe/.think/run/auntie
## set -o errexit


[zhihao@g1b-2 bin]$

Code:
[zhihao@g1b-2 root]$ pwd
/thinker/local/today/users/root
[zhihao@g1b-2 root]$ ls | grep "cool"
[zhihao@g1b-2 root]$

将sage_clear内出错语句单独拿到终端执行,会一直卡住,无任何输出

那就debug "sage clear"。这是一条比较独立的命令,容易调试。

你是否用了screen? screen名称是什么?我进该screen查看。

Quote:[quote]
Code:
function Action () {
  # Generate command file
  todaypfn=$(todaydir)/$progname
  local turbots=${todaypfn}.ts

  echo '@-1 (-1 -1 -1 -1 -1 -1) (-1 1 1) erase' > $turbots
  flog "  erase with $turbots log to $log_pfn"
  coolauntie register $turbots >> $log_pfn
}

flog " "
flog "sage_clear run by $USER"

Action

Code:
[zhihao@g1b-2 ~]$ pwd
/home/zhihao
[zhihao@g1b-2 ~]$ echo '@-1 (-1 -1 -1 -1 -1 -1) (-1 1 1) erase' > turbots
[zhihao@g1b-2 ~]$ cat turbots
@-1 (-1 -1 -1 -1 -1 -1) (-1 1 1) erase
[zhihao@g1b-2 ~]$ coolauntie register turbots >> log_pfn
^C
[zhihao@g1b-2 ~]$ cat log_pfn
[zhihao@g1b-2 ~]$

coolauntie阻塞了。可能是用户zhihao的设置未能配合sage工作。


RE: BIBO - zhihao - 09-22-2020 05:57 PM

(09-22-2020 01:37 PM)lingu Wrote:  
(09-19-2020 08:29 PM)zhihao Wrote:  
(09-19-2020 02:53 PM)lingu Wrote:  zhihao - it looks like there is no progress in this project. You should document the logic of simpleserv, then propose a change for the insert function.


simpleserv.sh
监听62818端口,执行talk2thinker.sh

talk2thinker.sh
读取一个案例请求,保存到$toneroot/newreeq文件,执行tellThinker, getresults函数

tellThinker()
将"@$spc (-1 -1 -1 -1 -1 -1) > (0 $reqno $j) $toneroot/procone.py --tycano $j"写入$toneroot/manytasks.ts作为sage执行的任务。

procone.py
在某一案例内容中搜索key{1,2,3},构建"keys": []。

getresults()
执行thinkres.py,返回procone.py查询到的结果,构建返回的json。

Why do you just write it here without generating any results?

Ask for review, then update the headpost.

Use [ code ] to wrap pseudocode.

现已在首文添加设计信息。并将代码放入代码块


RE: BIBO - zhihao - 09-22-2020 05:58 PM

(09-22-2020 05:55 PM)lingu Wrote:  
(09-22-2020 05:45 PM)zhihao Wrote:  
(09-22-2020 02:40 PM)zhihao Wrote:  coolauntie代码内有flog相关代码,但是对应的coolauntie.log没有生成,说明命令没有执行,但是coolauntie确实位于$PATH路径内,不明白为什么不能执行
Code:
[zhihao@g1b-2 bin]$ pwd
/home/sage2/sage/bin
[zhihao@g1b-2 bin]$ head -n 20 /thinker/bin/coolauntie
#!/bin/bash

# Copyright since 2018, Ningbo Shufang Information Technology Co., Ltd.
# Copyright since 2018, Hututa Technologies Limited
# All rights reserved.
#
# A tool to help use auntie
# Refer to http://tab.d-thinker.org/showthread.php?tid=10679 for more details
#
# Authors: Xinjie Yu

progname=coolauntie

source /thinker/local/forest/util/utilib/bash.inc
flog ""
flog "[$(date)] coolauntie $*"
AUNTIE=/thinker/globe/.think/run/auntie
## set -o errexit


[zhihao@g1b-2 bin]$

Code:
[zhihao@g1b-2 root]$ pwd
/thinker/local/today/users/root
[zhihao@g1b-2 root]$ ls | grep "cool"
[zhihao@g1b-2 root]$

将sage_clear内出错语句单独拿到终端执行,会一直卡住,无任何输出

那就debug "sage clear"。这是一条比较独立的命令,容易调试。

你是否用了screen? screen名称是什么?我进该screen查看。

没有使用screen操作。现在创建了一个screen
Code:
[zhihao@g1b-2 ~]$ screen -r zh-scr
[detached from 90643.zh-scr]



RE: BIBO - zhihao - 09-22-2020 06:11 PM

(09-22-2020 05:50 PM)lingu Wrote:  
(09-22-2020 03:01 PM)zhihao Wrote:  因为不用sudo的话会提示类似 “/thinker/storage/udata/lingu/testy/procuratorate/tests/typical/” permission deny的问题,但是现在无法复现。使用bash simpleserv.sh一样会卡住

还是用你的用户,不要用root

把permission问题记录下来,我们找100年解法。你不记录,肯定是没法正确工作的。

现在已经在zhihao用户下的screen ”119609.simpleserv“ 内将simperserv.sh换成zhihao用户执行。
Code:
[zhihao@g1b-2 procuratorate]$ ./simpleserv.sh

之前没有把问题记录下来,现在卡在sage_clear,无法复现permission deny


RE: BIBO - lingu - 09-22-2020 06:23 PM

(09-22-2020 06:11 PM)zhihao Wrote:  
(09-22-2020 05:50 PM)lingu Wrote:  
(09-22-2020 03:01 PM)zhihao Wrote:  因为不用sudo的话会提示类似 “/thinker/storage/udata/lingu/testy/procuratorate/tests/typical/” permission deny的问题,但是现在无法复现。使用bash simpleserv.sh一样会卡住

还是用你的用户,不要用root

把permission问题记录下来,我们找100年解法。你不记录,肯定是没法正确工作的。

现在已经在zhihao用户下的screen ”119609.simpleserv“ 内将simperserv.sh换成zhihao用户执行。
Code:
[zhihao@g1b-2 procuratorate]$ ./simpleserv.sh

执行sage clear即可,这样调试的功能规模比较合适,简化一些。

Quote:之前没有把问题记录下来,现在卡在sage_clear,无法复现permission deny

我现在登录到你的screen。


RE: BIBO - zhihao - 09-22-2020 06:30 PM

(09-22-2020 01:40 PM)lingu Wrote:  
(09-20-2020 01:45 AM)zhihao Wrote:  
Quote:加上以下代码,把接收到的案例信息存放到文件夹名最大的目录内

...
...
/bin/cp $reqpfn $newcasepfn
flog_enable_timestamp=True flog " received new case in $newcasepfn"

# if "type":"insert"
casetype=`jq '.type' $newcasepfn`
if [[ $casetype == "\"insert\"" ]]; then
newdir=$(ls /thinker/globe/udata/lingu/testy/procuratorate/tests/typical | wc -l)
mkdir $newdir
casecnt=$((++newdir))
cp $newcasepfn $newdir/insert.json

OK.

[quote]
echo -e "{\n\
"code": 200,\n\
"msg": "ok",\n\
"children": []\n\
}"
exit 0
fi

i dont know whether it is a good idea to generate the response here. But it is okay to design like this now and we can improve later.

Quote:RR lingu

OK.

But don't write code. Write pseudocode. Don't you know this rule?

已更新到首文talk2thinker.sh内


RE: BIBO - lingu - 09-22-2020 06:43 PM

(09-22-2020 06:23 PM)lingu Wrote:  
Quote:之前没有把问题记录下来,现在卡在sage_clear,无法复现permission deny

我现在登录到你的screen。

i went to screen simpleserv and stopped the simpleserv program.

sage_clear seems to complete quickly.
Code:
[zhihao@g1b-2 procuratorate]$  sage_user=sage2 /home/sage2/sage/bin/sage_clear
[zhihao@g1b-2 procuratorate]$

Strangely there is no error reported.
Code:
[Tue Sep 22 17:41:24 CST 2020] coolauntie register /thinker/local/today/users/zhihao/.ts
coolauntie register /thinker/local/today/users/zhihao/.ts [Tue Sep 22 17:41:24 CST 2020]
  0: /thinker/globe/.think/run/auntie runs /thinker/globe/.think/run/auntie register /thinker/local/today/users/zhihao/.ts
  to run /thinker/globe/.think/run/auntie register /thinker/local/today/users/zhihao/.ts with timeout 20s
    timeout run completes with 0
  this try exits with 0 [0922-17:41:24]
[Tue Sep 22 17:41:24 CST 2020] coolauntie completes (0)

auntie log seems to be happy, too.
Code:
auntie ::...- /thinker/globe/.think/run/auntie... 0x3 0x0 0x0
2020.09.22 17:41:24 (67):   sage_user sage2
2020.09.22 17:41:24 (67):   arguments starts..- register.. 0x1 0x0 0x0
2020.09.22 17:41:24 (67):   auntie arg:..- register.. 0x3 0x1 0x1
2020.09.22 17:41:24 (67):   vb - 63 0 0 0
2020.09.22 17:41:24 (67): auntie prelude()
2020.09.22 17:41:24 (67):   nDown: - 3 0 0 0
2020.09.22 17:41:24 (67): auntie - opened up channel..- /thinker/local/sage2/atpdup.. 0x4 0x0 0x0
2020.09.22 17:41:24 (67): auntie::RegisterTasks:  /thinker/local/today/users/zhihao/.ts
2020.09.22 17:41:24 (67):   wrote to atpd: ..- TR... 0x5 0x0 0x0
2020.09.22 17:41:24 (67): Talker::sendBuffer: /thinker/local/today/users/zhihao/.ts 37
2020.09.22 17:41:24 (67):   file:: /thinker/local/today/users/zhihao/.ts
2020.09.22 17:41:24 (67):   atpd responds happily: AT.
2020.09.22 17:41:24 (67): WaveBye: Well Done

I think you can proceed to run simpleserve and see if there are any problems.


RE: BIBO - zhihao - 09-22-2020 07:00 PM

(09-22-2020 06:43 PM)lingu Wrote:  
(09-22-2020 06:23 PM)lingu Wrote:  
Quote:之前没有把问题记录下来,现在卡在sage_clear,无法复现permission deny

我现在登录到你的screen。

i went to screen simpleserv and stopped the simpleserv program.

sage_clear seems to complete quickly.
Code:
[zhihao@g1b-2 procuratorate]$  sage_user=sage2 /home/sage2/sage/bin/sage_clear
[zhihao@g1b-2 procuratorate]$

Strangely there is no error reported.
Code:
[Tue Sep 22 17:41:24 CST 2020] coolauntie register /thinker/local/today/users/zhihao/.ts
coolauntie register /thinker/local/today/users/zhihao/.ts [Tue Sep 22 17:41:24 CST 2020]
  0: /thinker/globe/.think/run/auntie runs /thinker/globe/.think/run/auntie register /thinker/local/today/users/zhihao/.ts
  to run /thinker/globe/.think/run/auntie register /thinker/local/today/users/zhihao/.ts with timeout 20s
    timeout run completes with 0
  this try exits with 0 [0922-17:41:24]
[Tue Sep 22 17:41:24 CST 2020] coolauntie completes (0)

auntie log seems to be happy, too.
Code:
auntie ::...- /thinker/globe/.think/run/auntie... 0x3 0x0 0x0
2020.09.22 17:41:24 (67):   sage_user sage2
2020.09.22 17:41:24 (67):   arguments starts..- register.. 0x1 0x0 0x0
2020.09.22 17:41:24 (67):   auntie arg:..- register.. 0x3 0x1 0x1
2020.09.22 17:41:24 (67):   vb - 63 0 0 0
2020.09.22 17:41:24 (67): auntie prelude()
2020.09.22 17:41:24 (67):   nDown: - 3 0 0 0
2020.09.22 17:41:24 (67): auntie - opened up channel..- /thinker/local/sage2/atpdup.. 0x4 0x0 0x0
2020.09.22 17:41:24 (67): auntie::RegisterTasks:  /thinker/local/today/users/zhihao/.ts
2020.09.22 17:41:24 (67):   wrote to atpd: ..- TR... 0x5 0x0 0x0
2020.09.22 17:41:24 (67): Talker::sendBuffer: /thinker/local/today/users/zhihao/.ts 37
2020.09.22 17:41:24 (67):   file:: /thinker/local/today/users/zhihao/.ts
2020.09.22 17:41:24 (67):   atpd responds happily: AT.
2020.09.22 17:41:24 (67): WaveBye: Well Done

I think you can proceed to run simpleserve and see if there are any problems.

sage_clear没问题。
Code:
[zhihao@g1b-2 zhihao]$ sage_user=sage2 /home/sage2/sage/bin/sage_clear
[zhihao@g1b-2 zhihao]$

在zhihao 的screen “simmpleserv"内开启服务
Code:
[zhihao@g1b-2 ~]$ cd forest/prada/prada/procuratorate/
[zhihao@g1b-2 procuratorate]$ ./simpleserv.sh

limbo30-1上执行ncat,一段时间后还是没有返回值
Code:
[zhihao@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050



RE: BIBO - zhihao - 09-22-2020 07:41 PM

测试了端口,runxun1能连接本地20050,runxun1能连接ada.zettadom.com:22242(g1b),g1b能连接本地62818。但是我不知道20050能否连到g1b:62818。
Code:
[zhihao@barbarossa-35 ~]$ telnet  localhost 20050
Trying ::1...
Connected to localhost.
Escape character is '^]'.
^]
telnet> Connection closed.
[zhihao@barbarossa-35 ~]$ telnet ada.zettadom.com 22242
Trying 218.71.141.62...
Connected to ada.zettadom.com.
Escape character is '^]'.
SSH-2.0-OpenSSH_6.6.1
^C^]
telnet> Connection closed.
Code:
[zhihao@g1b-2 zhihao]$ telnet localhost 62818
Trying ::1...
Connected to localhost.
Escape character is '^]'.
^]
telnet> Connection closed.
[zhihao@g1b-2 zhihao]$



RE: BIBO - lingu - 09-22-2020 07:42 PM

[quote='zhihao' pid='43428' dateline='1600768821']
limbo30-1上执行ncat,一段时间后还是没有返回值
Code:
[zhihao@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050
[/quote]

when i use g1b-2:62818 directly, the connection is fine and simpleserv.log shows the following.
[code]
working [0922-18:39:20]
      received: /a^M/ ..more
      received: /b^M/ ..more
      received: /ccd^M/ ..more
      received: /^M/ ..more
      received a blank line
  talk2thinker reqno: 2
    received new case in /thinker/storage/udata/lingu/testy/procuratorate/tests/newcase/newcase.txt [0922-18:39:28]
      ts file /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts generated
      torun   sage_user=sage2 /thinker/globe/.think/run/auntie register /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts
      auntie completes with exit code 0
    collecting results from /thinker/storage/udata/lingu/testy/procuratorate/tests/res2
    session returns 0

But when I use trajan to relay, it does not work.
Code:
[root@limbo30-1 processed]# telnet trajan.d-thinker.org 20050
Trying 211.154.134.173...
Connected to trajan.d-thinker.org.
Escape character is '^]'.
abc
dd
ewf


^]
telnet> q
Connection closed.
[root@limbo30-1 processed]#

simpleserv.log continues with the following.
Code:
for exit status 1, we recycle thinker
working [0922-18:41:30]
    session returns 0
  tardy client. abandoning this session



RE: BIBO - zhihao - 09-22-2020 08:09 PM

看到g1b-2的simpleserv.sh后台显示Permission denied。
Code:
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 63: /tmp/grep404.out: Permission denied

g1b-2 上重新开启连接runxun1的通道
Code:
[zhihao@g1b-2 zhihao]$ nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
nohup: ignoring input and appending output to ‘nohup.out’
^Z
[1]+  Stopped                 nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
[zhihao@g1b-2 zhihao]$ bg
[1]+ nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org &
[zhihao@g1b-2 zhihao]$ ps aux | grep "ssh -t"
zhihao    10213  0.0  0.0  83556  8056 pts/44   T    19:03   0:00 ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
zhihao    15442  0.0  0.0 112728  2316 pts/44   S+   19:04   0:00 grep --color=auto ssh -t
[zhihao@g1b-2 zhihao]$

limbo30-1提示Connection refused.
Code:
[zhihao@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050
Ncat: Connection refused.



RE: BIBO - lingu - 09-22-2020 08:22 PM

(09-22-2020 08:09 PM)zhihao Wrote:  看到g1b-2的simpleserv.sh后台显示Permission denied。

/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied

Perhaps that file was created by user lingu. You can delete this file manytasks.ts and try again.

Quote:
Quote:/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 63: /tmp/grep404.out: Permission denied
[/code]


g1b-2 上重新开启连接runxun1的通道
Code:
[zhihao@g1b-2 zhihao]$ nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
nohup: ignoring input and appending output to ‘nohup.out’
^Z
[1]+  Stopped                 nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
[zhihao@g1b-2 zhihao]$ bg
[1]+ nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org &
[zhihao@g1b-2 zhihao]$ ps aux | grep "ssh -t"
zhihao    10213  0.0  0.0  83556  8056 pts/44   T    19:03   0:00 ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
zhihao    15442  0.0  0.0 112728  2316 pts/44   S+   19:04   0:00 grep --color=auto ssh -t
[zhihao@g1b-2 zhihao]$

You do not need to input password?


RE: BIBO - zhihao - 09-22-2020 08:29 PM

(09-22-2020 08:09 PM)zhihao Wrote:  看到g1b-2的simpleserv.sh后台显示Permission denied。
Code:
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 63: /tmp/grep404.out: Permission denied

上面运行的simpleserv.sh为添加了插入逻辑后脚本
Code:
[zhihao@g1b-2 procuratorate]$ pwd
/home/zhihao/forest/prada/prada/procuratorate
[zhihao@g1b-2 procuratorate]$ ./simpleserv.sh



RE: BIBO - zhihao - 09-22-2020 08:38 PM

(09-22-2020 08:22 PM)lingu Wrote:  
(09-22-2020 08:09 PM)zhihao Wrote:  看到g1b-2的simpleserv.sh后台显示Permission denied。

/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied

Perhaps that file was created by user lingu. You can delete this file manytasks.ts and try again.

Quote:
Quote:/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 63: /tmp/grep404.out: Permission denied
[/code]


g1b-2 上重新开启连接runxun1的通道
Code:
[zhihao@g1b-2 zhihao]$ nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
nohup: ignoring input and appending output to ‘nohup.out’
^Z
[1]+  Stopped                 nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
[zhihao@g1b-2 zhihao]$ bg
[1]+ nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org &
[zhihao@g1b-2 zhihao]$ ps aux | grep "ssh -t"
zhihao    10213  0.0  0.0  83556  8056 pts/44   T    19:03   0:00 ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
zhihao    15442  0.0  0.0 112728  2316 pts/44   S+   19:04   0:00 grep --color=auto ssh -t
[zhihao@g1b-2 zhihao]$

You do not need to input password?

之前没有输入密码就挂起了,这次有输密码,ssh有连通上。
Code:
[zhihao@g1b-2 zhihao]$ nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
nohup: ignoring input and appending output to ‘nohup.out’
zhihao@trajan.d-thinker.org's password:
^Z
[1]+  Stopped                 nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
[zhihao@g1b-2 zhihao]$ bg
[1]+ nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org &
[zhihao@g1b-2 zhihao]$

删除manytasks.ts后尝试 ncat,返回404。
Code:
[zhihao@g1b-2 zhihao]$ sudo rm /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts
[zhihao@g1b-2 zhihao]$

Code:
[zhihao@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050
{
"code": 404,
"msg": "not found",
"children": [
]
}

[zhihao@limbo30-1 processed]$

同时g1b-2内的simpleserve服务后台输出表示有权限问题。
Code:
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 81: /tmp/grep404.out: Permission denied



RE: BIBO - zhihao - 09-22-2020 08:56 PM

(09-22-2020 08:38 PM)zhihao Wrote:  同时g1b-2内的simpleserve服务后台输出表示有权限问题。
Code:
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 81: /tmp/grep404.out: Permission denied

将文件夹设为777权限后,文件夹里面的文件没有权限。准备将涉及权限问题的文件newreq,newcase.txt重命名为其他,让其重新生成
Code:
[zhihao@g1b-2 zhihao]$ sudo chmod 777 /thinker/storage/udata/lingu/testy/procuratorate/tests
[sudo] password for zhihao:
[zhihao@g1b-2 zhihao]$ pwd

simpleserv.sh后台输出:
Code:
...
...
[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[Btruncate: cannot open ‘/thinker/storage/udata/lingu/testy/procuratorate/tests/newreq’ for writing: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 96: /thinker/storage/udata/lingu/testy/procuratorate/tests/newreq: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 96: /thinker/storage/udata/lingu/testy/procuratorate/tests/newreq: Permission denied
/bin/cp: cannot create regular file ‘/thinker/storage/udata/lingu/testy/procuratorate/tests/newcase/newcase.txt’: Permission denied
/bin/rm: cannot remove ‘/thinker/storage/udata/lingu/testy/procuratorate/tests/res2/*.txt’: No such file or directory
mkdir: cannot create directory ‘/thinker/storage/udata/lingu/testy/procuratorate/tests/res2/../resprev’: File exists
/bin/rm: cannot remove ‘/thinker/storage/udata/lingu/testy/procuratorate/tests/res2/../resprev/*’: No such file or directory
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 81: /tmp/grep404.out: Permission denied



RE: BIBO - zhihao - 09-22-2020 09:21 PM

修改newcase、resprev权限为777后,使用/data/20200906.1/processed内的案例查询,能得到返回结果
Code:
[zhihao@limbo30-1 processed]$ pwd
/data/20200906.1/processed
Code:
[zhihao@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050
{
"code": 200,
"msg": "ok",
"children": [
  {
   "keys": [
     {
       "type": "key1",
       "value": "抢劫",
       "detailid": "087e0145e4a911ea987a005056c00001"
     },
     {
       "type": "key1",
       "value": "抢劫",
       "detailid": "087e0216e4a911ea987a005056c00001"
     },
     {
       "type": "key1",
       "value": "抢劫",
       "detailid": "087e02cee4a911ea987a005056c00001"
     }
   ],
   "caseid": "67be23689e6311eabceb005056c00001",
   "caseyear": 2014,
   "casetitle": "张某、沈某某等七人抢劫案",
   "casetype": "最高人民检察院指导性案例",
   "caserate": "5.00",
   "caseaction": "抢劫罪",
   "score": 100
  },
  {
   "keys": [
     {
       "type": "key1",
       "value": "盗窃",
       "detailid": "087b7c01e4a911ea987a005056c00001"
     },
     {
       "type": "key1",
       "value": "盗窃",
       "detailid": "087b7e26e4a911ea987a005056c00001"
     }
   ],
   "caseid": "67be26729e6311eabceb005056c00001",
   "caseyear": 2017,
   "casetitle": "张四毛盗窃案",
   "casetype": "最高人民检察院指导性案例",
   "caserate": "5.00",
   "caseaction": "盗窃罪",
   "score": 100
  },
  {
   "keys": [
     {
       "type": "key3",
       "value": "入户抢劫",
       "detailid": "087dfc79e4a911ea987a005056c00001"
     },
     {
       "type": "key2",
       "value": "入户抢劫",
       "detailid": "087dfc79e4a911ea987a005056c00001"
     },
     {
       "type": "key1",
       "value": "抢劫、盗窃",
       "detailid": "087dfc79e4a911ea987a005056c00001"
     },
     {
       "type": "key3",
       "value": "补充起诉",
       "detailid": "087dfd91e4a911ea987a005056c00001"
     },
     {
       "type": "key2",
       "value": "入户抢劫",
       "detailid": "087dfd91e4a911ea987a005056c00001"
     },
     {
       "type": "key1",
       "value": "抢劫、盗窃",
       "detailid": "087dfd91e4a911ea987a005056c00001"
     },
     {
       "type": "key2",
       "value": "入户抢劫",
       "detailid": "087dfe86e4a911ea987a005056c00001"
     },
     {
       "type": "key1",
       "value": "抢劫、盗窃",
       "detailid": "087dfe86e4a911ea987a005056c00001"
     }
   ],
   "caseid": "67be23409e6311eabceb005056c00001",
   "caseyear": 2014,
   "casetitle": "陈邓昌抢劫、盗窃,付志强盗窃案",
   "casetype": "最高人民检察院指导性案例",
   "caserate": "5.00",
   "caseaction": "抢劫罪",
   "score": 100
  },
  {
   "keys": [
     {
       "type": "key1",
       "value": "抢劫",
       "detailid": "087b8e5ae4a911ea987a005056c00001"
     },
     {
       "type": "key1",
       "value": "抢劫",
       "detailid": "087b8faee4a911ea987a005056c00001"
     }
   ],
   "caseid": "67be23909e6311eabceb005056c00001",
   "caseyear": 2016,
   "casetitle": "马世龙(抢劫)核准追诉案",
   "casetype": "最高人民检察院指导性案例",
   "caserate": "5.00",
   "caseaction": "抢劫罪",
   "score": 100
  }
]
}

[zhihao@limbo30-1 processed]$

zengxingliang.json为插入请求,可以返回code 200
Code:
[zhihao@limbo30-1 processed]$ ( cat zengxingliang.json; sleep 18 ) | ncat trajan.d-thinker.org 20050
{
    code: 200,
    msg: ok,
    children: []
    }
[zhihao@limbo30-1 processed]$



RE: BIBO - lingu - 09-22-2020 09:21 PM

(09-03-2020 11:53 PM)lingu Wrote:  talk2thinker.sh
Code:
读取一个案例请求,保存到$toneroot/newreeq文件,执行tellThinker, getresults函数

对于伪代码来说,这又太模糊了。请改为如下形式:
Code:
读取一个案例请求,保存到$toneroot/newreeq文件
tellThinker
getresults

Quote:...
...

尽快补齐省略部分。

Quote: /bin/cp $reqpfn $newcasepfn
flog_enable_timestamp=True flog " received new case in $newcasepfn"

insert (){

作为伪代码,这个insert()很突兀,不知怎么理解。

Quote: # if "type":"insert"
casetype=`jq '.type' $newcasepfn`
if [[ $casetype == "\"insert\"" ]]; then
newdir=$(ls /thinker/globe/udata/lingu/testy/procuratorate/tests/typical | wc -l)
mkdir $newdir
casecnt=$((++newdir))
cp $newcasepfn $newdir/insert.json

在下次运行simpleserv时,casecnt会重置为10,这就错了。

我们得保存casecnt,可以暂时用pcf来保存一个变量,我等会具体提议。


RE: BIBO - lingu - 09-22-2020 09:41 PM

driver: we need handle case count well for the bibo system.

(09-03-2020 11:53 PM)lingu Wrote:  talk2thinker.sh

读取一个案例请求,保存到$toneroot/newreeq文件,执行tellThinker, getresults函数
...
...

If we have vars in bibo-ext.pcf -- http://rar.shufangkeji.com:60380/showthread.php?tid=9160&pid=43444#pid43444 I suggest we read case count here.
Code:
casecnt = use the pcf program to read bibo_doc_cnt in $bibo_base/bibo-ext.pcf

Quote:
/bin/cp $reqpfn $newcasepfn
flog_enable_timestamp=True flog " received new case in $newcasepfn"

insert (){
# if "type":"insert"
casetype=`jq '.type' $newcasepfn`
if [[ $casetype == "\"insert\"" ]]; then
newdir=$(ls /thinker/globe/udata/lingu/testy/procuratorate/tests/typical | wc -l)
mkdir $newdir
casecnt=$((++newdir))

We need update the case count here.
Code:
use the pcf program to write bibo_doc_cnt as casecnt in $bibo_base/bibo-ext.pcf

RR zhihao

--- working proactively. I added the logic in cod://prada commit 7b8c391

A simple test of pcf shows the functionality of pcf works as expected.
Code:
20:35:08 lingu@g1b-2:/home/lingu/forest/prada/prada> pcf --pcf /thinker/globe/soft/bibo/bibo-ext.pcf --get bibo_doc_cnt
10
20:49:09 lingu@g1b-2:/home/lingu/forest/prada/prada> pcf --pcf /thinker/globe/soft/bibo/bibo-ext.pcf --add bibo_doc_cnt 11
20:49:27 lingu@g1b-2:/home/lingu/forest/prada/prada> pcf --pcf /thinker/globe/soft/bibo/bibo-ext.pcf --get bibo_doc_cnt
11
20:49:29 lingu@g1b-2:/home/lingu/forest/prada/prada>



RE: BIBO - lingu - 09-22-2020 09:56 PM

(09-03-2020 11:53 PM)lingu Wrote:  insert (){
# if "type":"insert"
casetype=`jq '.type' $newcasepfn`
if [[ $casetype == "\"insert\"" ]]; then
newdir=$(ls /thinker/globe/udata/lingu/testy/procuratorate/tests/typical | wc -l)

such logic is quite error-prone because w dont know who may write something to the dir 'typical'.

I suggest we change it to use casecnt.
Code:
newdir=/thinker/globe/udata/lingu/testy/procuratorate/tests/typical/$((++casecnt))

Quote: mkdir $newdir
casecnt=$((++newdir))

no need to do ++ here and the assignment because the code above already handles both.

RR zhihao

--- working practively, I have implemented the above in cod://yotta commit fae4fb1


RE: BIBO - lingu - 09-22-2020 10:17 PM

I am deleting the trash cases 11-200.

save a copy first.
Code:
21:09:59 lingu@g1b-2:/home/lingu/forest/prada/prada> cd /thinker/globe/udata/lingu/testy/procuratorate/tests/typical
21:14:17 lingu@g1b-2:/thinker/globe/udata/lingu/testy/procuratorate/tests/typical> ls
0    107  116  125  134  143  152  161  170  18   189  198  26  35  44  53  62  71  80  9   99
1    108  117  126  135  144  153  162  171  180  19   199  27  36  45  54  63  72  81  90
10   109  118  127  136  145  154  163  172  181  190  2    28  37  46  55  64  73  82  91
100  11   119  128  137  146  155  164  173  182  191  20   29  38  47  56  65  74  83  92
101  110  12   129  138  147  156  165  174  183  192  200  3   39  48  57  66  75  84  93
102  111  120  13   139  148  157  166  175  184  193  21   30  4   49  58  67  76  85  94
103  112  121  130  14   149  158  167  176  185  194  22   31  40  5   59  68  77  86  95
104  113  122  131  140  15   159  168  177  186  195  23   32  41  50  6   69  78  87  96
105  114  123  132  141  150  16   169  178  187  196  24   33  42  51  60  7   79  88  97
106  115  124  133  142  151  160  17   179  188  197  25   34  43  52  61  70  8   89  98
21:14:18 lingu@g1b-2:/thinker/globe/udata/lingu/testy/procuratorate/tests/typical> mkdir -p /thinker/globe/udata/lingu/testy/shed/20200922
21:15:05 lingu@g1b-2:/thinker/globe/udata/lingu/testy/procuratorate/tests/typical> cd ..
21:15:24 lingu@g1b-2:/thinker/globe/udata/lingu/testy/procuratorate/tests> rsync -arv typical /thinker/globe/udata/lingu/testy/shed/20200922/
...
typical/95/
typical/95/insert.json
typical/95/insert.json1
typical/95/insert.json~
typical/96/
typical/96/insert.json
typical/96/insert.json1
typical/96/insert.json~
typical/97/
typical/97/insert.json
typical/97/insert.json1
typical/97/insert.json~
typical/98/
typical/98/insert.json
typical/98/insert.json1
typical/98/insert.json~
typical/99/
typical/99/insert.json
typical/99/insert.json1
typical/99/insert.json~

sent 3799548 bytes  received 12120 bytes  124972.72 bytes/sec
total size is 3760682  speedup is 0.99
21:16:18 lingu@g1b-2:/thinker/globe/udata/lingu/testy/procuratorate/tests>

Remove trash files.
Code:
21:17:23 lingu@g1b-2:/thinker/globe/udata/lingu/testy/procuratorate/tests/typical> rm -rf 1[1-9] [2
-9]? 1??
21:18:13 lingu@g1b-2:/thinker/globe/udata/lingu/testy/procuratorate/tests/typical> ls
0  1  10  2  200  3  4  5  6  7  8  9
21:18:16 lingu@g1b-2:/thinker/globe/udata/lingu/testy/procuratorate/tests/typical> rm -rf 200
rm: cannot remove '200/insert.json1': Permission denied
rm: cannot remove '200/insert.json': Permission denied
rm: cannot remove '200/insert.json~': Permission denied
21:18:19 lingu@g1b-2:/thinker/globe/udata/lingu/testy/procuratorate/tests/typical> sudo rm -rf 200
[sudo] password for lingu:

Adjust the value of bibo_doc_cnt.
Code:
[root@g1b-2 typical]# echo "bibo_doc_cnt: 10" > /thinker/globe/soft/bibo/bibo-ext.pcf
[root@g1b-2 typical]# chmod 777 /thinker/globe/soft/bibo/bibo-ext.pcf
[root@g1b-2 typical]# cat /thinker/globe/soft/bibo/bibo-ext.pcf
bibo_doc_cnt: 10
[root@g1b-2 typical]#



RE: BIBO - zhihao - 09-23-2020 12:39 AM

(09-03-2020 11:53 PM)lingu Wrote:  talk2thinker.sh
Code:
读取一个案例请求,保存到$toneroot/newreeq文件,执行tellThinker, getresults函数
...
...
  /bin/cp $reqpfn $newcasepfn
  flog_enable_timestamp=True flog "    received new case in $newcasepfn"

insert (){
  # if "type":"insert"
  casetype=`jq '.type' $newcasepfn`
  if [[ $casetype == "\"insert\"" ]]; then
    newdir=$(ls /thinker/globe/udata/lingu/testy/procuratorate/tests/typical | wc -l)
    mkdir $newdir
    casecnt=$((++newdir))
    cp $newcasepfn $newdir/insert.json

    echo -e "{\n\
    "code": 200,\n\
    "msg": "ok",\n\
    "children": []\n\
    }"
    exit 0
  fi
}

修改首文talk2thinker.sh的伪代码部分为:
Code:
function work; do
    while $newcasepfn is not null; do
        read $newcasepfn
    done

    funtion tellThinker; do
        set $casecnt as the number of cases
        create a new directory $newdir, set its name as $casecnt + 1
        copy $newcasepfn to $newdir
        
        for each case; do
            analyse cases with sage
        done
    done

    function getresults; do
        function scrutinize:
            generate response for each case
        generate response for all cases
        return response
    done
done

RR lingu


RE: BIBO - zhihao - 09-23-2020 12:41 AM

(09-22-2020 09:56 PM)lingu Wrote:  
(09-03-2020 11:53 PM)lingu Wrote:  insert (){
# if "type":"insert"
casetype=`jq '.type' $newcasepfn`
if [[ $casetype == "\"insert\"" ]]; then
newdir=$(ls /thinker/globe/udata/lingu/testy/procuratorate/tests/typical | wc -l)

such logic is quite error-prone because w dont know who may write something to the dir 'typical'.

I suggest we change it to use casecnt.
Code:
newdir=/thinker/globe/udata/lingu/testy/procuratorate/tests/typical/$((++casecnt))

Quote: mkdir $newdir
casecnt=$((++newdir))

no need to do ++ here and the assignment because the code above already handles both.

RR zhihao

--- working practively, I have implemented the above in cod://yotta commit fae4fb1

LGTM


RE: BIBO - zhihao - 09-23-2020 12:49 AM

(09-22-2020 09:41 PM)lingu Wrote:  driver: we need handle case count well for the bibo system.

(09-03-2020 11:53 PM)lingu Wrote:  talk2thinker.sh

读取一个案例请求,保存到$toneroot/newreeq文件,执行tellThinker, getresults函数
...
...

If we have vars in bibo-ext.pcf -- http://rar.shufangkeji.com:60380/showthread.php?tid=9160&pid=43444#pid43444 I suggest we read case count here.
Code:
casecnt = use the pcf program to read bibo_doc_cnt in $bibo_base/bibo-ext.pcf

Quote:
/bin/cp $reqpfn $newcasepfn
flog_enable_timestamp=True flog " received new case in $newcasepfn"

insert (){
# if "type":"insert"
casetype=`jq '.type' $newcasepfn`
if [[ $casetype == "\"insert\"" ]]; then
newdir=$(ls /thinker/globe/udata/lingu/testy/procuratorate/tests/typical | wc -l)
mkdir $newdir
casecnt=$((++newdir))

We need update the case count here.
Code:
use the pcf program to write bibo_doc_cnt as casecnt in $bibo_base/bibo-ext.pcf

RR zhihao

--- working proactively. I added the logic in cod://prada commit 7b8c391

A simple test of pcf shows the functionality of pcf works as expected.
Code:
20:35:08 lingu@g1b-2:/home/lingu/forest/prada/prada> pcf --pcf /thinker/globe/soft/bibo/bibo-ext.pcf --get bibo_doc_cnt
10
20:49:09 lingu@g1b-2:/home/lingu/forest/prada/prada> pcf --pcf /thinker/globe/soft/bibo/bibo-ext.pcf --add bibo_doc_cnt 11
20:49:27 lingu@g1b-2:/home/lingu/forest/prada/prada> pcf --pcf /thinker/globe/soft/bibo/bibo-ext.pcf --get bibo_doc_cnt
11
20:49:29 lingu@g1b-2:/home/lingu/forest/prada/prada>

LGTM


RE: BIBO - lingu - 09-23-2020 01:08 AM

(09-23-2020 12:39 AM)zhihao Wrote:  
(09-03-2020 11:53 PM)lingu Wrote:  talk2thinker.sh
Code:
读取一个案例请求,保存到$toneroot/newreeq文件,执行tellThinker, getresults函数
...
...
  /bin/cp $reqpfn $newcasepfn
  flog_enable_timestamp=True flog "    received new case in $newcasepfn"

insert (){
  # if "type":"insert"
  casetype=`jq '.type' $newcasepfn`
  if [[ $casetype == "\"insert\"" ]]; then
    newdir=$(ls /thinker/globe/udata/lingu/testy/procuratorate/tests/typical | wc -l)
    mkdir $newdir
    casecnt=$((++newdir))
    cp $newcasepfn $newdir/insert.json

    echo -e "{\n\
    "code": 200,\n\
    "msg": "ok",\n\
    "children": []\n\
    }"
    exit 0
  fi
}

修改首文talk2thinker.sh的伪代码部分为:

function work; do
while $newcasepfn is not null; do
read $newcasepfn
done

You need define that is 'not full'. Otherwise, we cannot translate this pseudocode into code scientifically.

Quote: funtion tellThinker; do
set $casecnt as the number of cases
create a new directory $newdir, set its name as $casecnt + 1
copy $newcasepfn to $newdir

for each case; do
analyse cases with sage
done
done

OK but pls use a separate code block for a function, unless the function is nested in another.

I also suggest you use C-style syntactic structures, such as
Code:
tellThinker() {
        set $casecnt as the number of cases
        create a new directory $newdir, set its name as $casecnt + 1
        copy $newcasepfn to $newdir
        
        for each case {
            analyse cases with sage
        }
}

The C-style representation is usually more concise.

Quote: function getresults; do
function scrutinize:
generate response for each case
generate response for all cases
return response
done
done
[/code]

RR lingu

I think they are generally better than before. So I am fine with the updates.


RE: BIBO - zhihao - 09-23-2020 11:34 AM

(09-23-2020 01:08 AM)lingu Wrote:  
(09-23-2020 12:39 AM)zhihao Wrote:  
(09-03-2020 11:53 PM)lingu Wrote:  talk2thinker.sh
Code:
读取一个案例请求,保存到$toneroot/newreeq文件,执行tellThinker, getresults函数
...
...
  /bin/cp $reqpfn $newcasepfn
  flog_enable_timestamp=True flog "    received new case in $newcasepfn"

insert (){
  # if "type":"insert"
  casetype=`jq '.type' $newcasepfn`
  if [[ $casetype == "\"insert\"" ]]; then
    newdir=$(ls /thinker/globe/udata/lingu/testy/procuratorate/tests/typical | wc -l)
    mkdir $newdir
    casecnt=$((++newdir))
    cp $newcasepfn $newdir/insert.json

    echo -e "{\n\
    "code": 200,\n\
    "msg": "ok",\n\
    "children": []\n\
    }"
    exit 0
  fi
}

修改首文talk2thinker.sh的伪代码部分为:

function work; do
while $newcasepfn is not null; do
read $newcasepfn
done

You need define that is 'not full'. Otherwise, we cannot translate this pseudocode into code scientifically.

while循环已修改为 read $newcasepfn till meet blank line

(09-23-2020 01:08 AM)lingu Wrote:  
Quote: funtion tellThinker; do
set $casecnt as the number of cases
create a new directory $newdir, set its name as $casecnt + 1
copy $newcasepfn to $newdir

for each case; do
analyse cases with sage
done
done

OK but pls use a separate code block for a function, unless the function is nested in another.

I also suggest you use C-style syntactic structures, such as
Code:
tellThinker() {
        set $casecnt as the number of cases
        create a new directory $newdir, set its name as $casecnt + 1
        copy $newcasepfn to $newdir
        
        for each case {
            analyse cases with sage
        }
}

The C-style representation is usually more concise.

work内的函数已提取到代码块外面。
函数现已使用C结构表示。
伪代码如下:
Code:
work() {
    read $newcasepfn till meet blank line

    tellThinker()
    getresults()
}

tellThinker() {
    set $casecnt as the number of cases
    create a new directory $newdir, set its name as $casecnt + 1
    copy $newcasepfn to $newdir
    
    for each case; do
        analyse cases with sage
    done
}

getresults() {
    scrutinize() {
        generate response for each case
        }
    generate response for all cases
    return response
}


(09-23-2020 01:08 AM)lingu Wrote:  
Quote: function getresults; do
function scrutinize:
generate response for each case
generate response for all cases
return response
done
done
[/code]

RR lingu

I think they are generally better than before. So I am fine with the updates.

已更新首文talk2thinker.sh伪代码


RE: BIBO - lingu - 09-23-2020 12:14 PM

(09-23-2020 11:34 AM)zhihao Wrote:  not null 已修改为 not full。work内的函数已提取到代码块外面。函数现已使用C结构表示。
已更新首文。

I have split the blocks of functions in the headpost, and added an explanation line to the functions. This will make the writing easier to read.

Quote:tellThinker() {
set $casecnt as the number of cases
create a new directory $newdir, set its name as $casecnt + 1
copy $newcasepfn to $newdir

for each case; do
analyse cases with sage
done
}

This logic needs to handle multiple types of requests -- query, insert, delete. Pls design the switching logic and use different functions to do the work.

Also, design and implement the delete logic as we discussed -- for delete, rename the original file to be a different name, create a file in the original name and make sure it does not match any keywords.

Later, we need move the logic to a C++ program so that it can communicate with think in memory-to-memory data exchange.


RE: BIBO - zhihao - 09-23-2020 12:39 PM

(09-03-2020 11:53 PM)lingu Wrote:  procone.py
Code:
在某一案例内容中搜索key{1,2,3},构建"keys": []。

添加procone.py 伪代码,增加删除功能
Code:
main() {
    set $tycajson_pfn as a insert.json
    get $reqtype from $tycajson_pfn
    if $reqtype is "delete"
        rename insert.json as insert2.json
        create file insert.json
    else
        generate query response
}

RR lingu


RE: BIBO - zhihao - 09-23-2020 12:58 PM

(09-23-2020 12:14 PM)lingu Wrote:  
Quote:tellThinker() {
set $casecnt as the number of cases
create a new directory $newdir, set its name as $casecnt + 1
copy $newcasepfn to $newdir

for each case; do
analyse cases with sage
done
}

This logic needs to handle multiple types of requests -- query, insert, delete. Pls design the switching logic and use different functions to do the work.

已加上switch逻辑
Code:
tellThinker() {
    set $casecnt as the number of cases

    switch $casetype {
        case "insert":
            create a new directory $newdir, set its name as $casecnt + 1
            copy $newcasepfn to $newdir
            generate insert success response
        case "delete":
            for each case; do
                analyse cases with sage
            done
            generate delete success response
        case "query":
            for each case; do
                analyse cases with sage
            done
            generate query result response
    }
}
RR lingu

(09-23-2020 12:14 PM)lingu Wrote:  Also, design and implement the delete logic as we discussed -- for delete, rename the original file to be a different name, create a file in the original name and make sure it does not match any keywords.

Later, we need move the logic to a C++ program so that it can communicate with think in memory-to-memory data exchange.

删除逻辑设计在procone.py内,已在#49回复


RE: BIBO - lingu - 09-23-2020 01:05 PM

(09-23-2020 12:39 PM)zhihao Wrote:  
(09-03-2020 11:53 PM)lingu Wrote:  procone.py
Code:
在某一案例内容中搜索key{1,2,3},构建"keys": []。

添加procone.py 伪代码,增加删除功能

main() {
set $tycajson_pfn as a insert.json
get $reqtype from $tycajson_pfn
if $reqtype is "delete"

Pls make both delete and query logic functins.

Quote: rename insert.json as insert2.json

You can use rid --insitu to do this. Otherwise, there may be complication when you have already a file insert2.json in the dir.

You should judge whether the file needs to be deleted. You can simply use re.search to search for the case ID and then judge whether the case ID matches the case ID to be deleted.

Quote: create file insert.json

How do you makes sure the new insert.json does not match any keywords?

Quote: else
generate query response
}
[/code]

should have RR'ed.


RE: BIBO - lingu - 09-23-2020 01:26 PM

(09-23-2020 12:58 PM)zhihao Wrote:  
(09-23-2020 12:14 PM)lingu Wrote:  
Quote:tellThinker() {
set $casecnt as the number of cases
create a new directory $newdir, set its name as $casecnt + 1
copy $newcasepfn to $newdir

for each case; do
analyse cases with sage
done
}

This logic needs to handle multiple types of requests -- query, insert, delete. Pls design the switching logic and use different functions to do the work.

已加上switch逻辑

tellThinker() {
set $casecnt as the number of cases

switch $casetype {
case "insert":
create a new directory $newdir, set its name as $casecnt + 1
copy $newcasepfn to $newdir
generate insert success response

Make insert a function.

Quote: case "delete":
for each case; do
analyse cases with sage

That's too vague.
Again, make delete a function.

Quote: done
generate delete success response
case "query":
for each case; do
analyse cases with sage
done
generate query result response

make query a function too.

Quote: }
}
[/code]
RR lingu

Generally OK.

Quote:
(09-23-2020 12:14 PM)lingu Wrote:  Also, design and implement the delete logic as we discussed -- for delete, rename the original file to be a different name, create a file in the original name and make sure it does not match any keywords.

Later, we need move the logic to a C++ program so that it can communicate with think in memory-to-memory data exchange.

删除逻辑设计在procone.py内,已在#49回复

Record a todo for he 'Later' part so that we can manage the task well.


RE: BIBO - zhihao - 09-23-2020 01:33 PM

(09-23-2020 01:05 PM)lingu Wrote:  
(09-23-2020 12:39 PM)zhihao Wrote:  
(09-03-2020 11:53 PM)lingu Wrote:  procone.py
Code:
在某一案例内容中搜索key{1,2,3},构建"keys": []。

添加procone.py 伪代码,增加删除功能

main() {
set $tycajson_pfn as a insert.json
get $reqtype from $tycajson_pfn
if $reqtype is "delete"

Pls make both delete and query logic functins.

已修改并更新首文
Code:
main() {
    set $tycajson_pfn as a insert.json
    get $reqtype from $tycajson_pfn
    if $reqtype is "delete"
        delete()
    else
        query()
}

delete() {
    if $reqcaseid matches $caseid
        rename insert.json but don't cover existing file
    create file insert.json
}

query() {
    generate query response
}

(09-23-2020 01:05 PM)lingu Wrote:  
Quote: rename insert.json as insert2.json

You can use rid --insitu to do this. Otherwise, there may be complication when you have already a file insert2.json in the dir.

You should judge whether the file needs to be deleted. You can simply use re.search to search for the case ID and then judge whether the case ID matches the case ID to be deleted.

已添加判断语句,判断caseid匹配后删除
Code:
delete() {
    if $reqcaseid matches $caseid
        rename insert.json but don't cover existing file
    create file insert.json
}


(09-23-2020 01:05 PM)lingu Wrote:  
Quote: create file insert.json

How do you makes sure the new insert.json does not match any keywords?

这个我不理解什么意思,是要让procone.py可以获取key,但是值都要为空吗 ?

(09-23-2020 01:05 PM)lingu Wrote:  
Quote: else
generate query response
}
[/code]

should have RR'ed.

已添加RR


RE: BIBO - zhihao - 09-23-2020 01:58 PM

(09-23-2020 01:26 PM)lingu Wrote:  
(09-23-2020 12:58 PM)zhihao Wrote:  
(09-23-2020 12:14 PM)lingu Wrote:  
Quote:tellThinker() {
set $casecnt as the number of cases
create a new directory $newdir, set its name as $casecnt + 1
copy $newcasepfn to $newdir

for each case; do
analyse cases with sage
done
}

This logic needs to handle multiple types of requests -- query, insert, delete. Pls design the switching logic and use different functions to do the work.

已加上switch逻辑

tellThinker() {
set $casecnt as the number of cases

switch $casetype {
case "insert":
create a new directory $newdir, set its name as $casecnt + 1
copy $newcasepfn to $newdir
generate insert success response

Make insert a function.

已设为函数
Code:
insert() {
    create a new directory $newdir, set its name as $casecnt + 1
    copy $newcasepfn to $newdir
    generate insert success response
}

(09-23-2020 01:26 PM)lingu Wrote:  
Quote: case "delete":
for each case; do
analyse cases with sage

That's too vague.
Again, make delete a function.

已设为函数
Code:
delete() {
    for each case; do
        analyse cases with sage
    done
    generate delete success response
}

(09-23-2020 01:26 PM)lingu Wrote:  
Quote: done
generate delete success response
case "query":
for each case; do
analyse cases with sage
done
generate query result response

make query a function too.

已设为函数
Code:
query() {
    for each case; do
        analyse cases with sage
    done
    generate query result response
}

(09-23-2020 01:26 PM)lingu Wrote:  
Quote: }
}
[/code]
RR lingu

Generally OK.

已将修改后的如下内容更新首文

tellThinker() informs think about the request.
Code:
tellThinker() {
    set $casecnt as the number of cases

    switch $casetype {
        case "insert":
            insert()
        case "delete":
            delete()
        case "query":
            query()
    }
}

insert()
Code:
insert() {
    create a new directory $newdir, set its name as $casecnt + 1
    copy $newcasepfn to $newdir
    generate insert success response
}

delete()
Code:
delete() {
    for each case; do
        analyse cases with sage
    done
    generate delete success response
}

query()
Code:
query() {
    for each case; do
        analyse cases with sage
    done
    generate query result response
}

(09-23-2020 01:26 PM)lingu Wrote:  
Quote:
(09-23-2020 12:14 PM)lingu Wrote:  Also, design and implement the delete logic as we discussed -- for delete, rename the original file to be a different name, create a file in the original name and make sure it does not match any keywords.

Later, we need move the logic to a C++ program so that it can communicate with think in memory-to-memory data exchange.

删除逻辑设计在procone.py内,已在#49回复

Record a todo for he 'Later' part so that we can manage the task well.

add "[todo] implement delete function in procone.py" in headpost


RE: BIBO - lingu - 09-23-2020 03:34 PM

(09-23-2020 01:33 PM)zhihao Wrote:  
Quote:How do you makes sure the new insert.json does not match any keywords?

这个我不理解什么意思,是要让procone.py可以获取key,但是值都要为空吗 ?

就是不要让procone.py以后在query的时候对已经被删除的文件达成任何匹配。


RE: BIBO - zhihao - 09-23-2020 03:45 PM

(09-03-2020 11:53 PM)lingu Wrote:  procone.py

delete()
Code:
delete() {
    if $reqcaseid matches $caseid
        rename insert.json but don't cover existing file
    create file insert.json
}

首文delete() 中的 create file insert.json修改为 create empty file insert.json


RE: BIBO - zhihao - 09-23-2020 05:07 PM

在procone.py和talk2thinker.sh中添加并push了删除语句

在 zhihao@g1b-2 screen simpleserv内开启simpleserv服务
Code:
[zhihao@g1b-2 procuratorate]$ ./simpleserv.sh

limbo30-1内提交del_zengxingliang.json请求,返回404错误
Code:
[zhihao@limbo30-1 processed]$ cat del_zengxingliang.json
{"type":"delete","caseid":"67be261c9e6311eabceb005056c00001"}

[zhihao@limbo30-1 processed]$

[zhihao@limbo30-1 processed]$ ( cat del_zengxingliang.json; sleep 18 ) | ncat trajan.d-thinker.org 20050
{
"code": 404,
"msg": "not found",
"children": [
]
}

[zhihao@limbo30-1 processed]$ pwd
/data/20200906.1/processed

在zhihao@g1b-2 screen zh-scr内检查日志,看到talk2thinker.log日志和talk2thinker.sh的不符,检查后发现日志是从文件thinkres.py 154行开始记录。
Code:
[zhihao@g1b-2 zhihao]$ ll simpleserv.log talk2thinker-x.log
-rw-rw-r-- 1 zhihao zhihao 264840 Sep 23 16:00 simpleserv.log
-rw-rw-r-- 1 zhihao zhihao  37376 Sep 23 16:00 talk2thinker-x.log
[zhihao@g1b-2 zhihao]$

simpleserv.log
Code:
working [0923-16:00:05]
      received: /{"type":"delete","caseid":"67be261c9e6311eabceb005056c00001"}/ ..more
      received: // ..more
      received a blank line
  talk2thinker reqno: 1
    received new case in /thinker/storage/udata/lingu/testy/procuratorate/tests/newcase/newcase.txt [0923-16:00:06]
      ts file /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts generated
      torun   sage_user=sage2 /thinker/globe/.think/run/auntie register /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts
      auntie completes with exit code 0
    collecting results from /thinker/storage/udata/lingu/testy/procuratorate/tests/res2
Sending results: [0923-16:00:08]
{
"code": 404,
"msg": "not found",
"children": [
]
}

{
"code": 404,
"msg": "not found",
"children": [
]
}

      for exit status 1, we recycle thinker
    session returns 0
[zhihao@g1b-2 zhihao]$

talk2thinker.log
Code:
[2020-09-23 16:00:08] talk2thinker starts
  tycano: x
  more args
talking to thinker
      scrutinize /thinker/storage/udata/lingu/testy/procuratorate/tests/res2
      scrutinize fns res_16.txt-tmp res_6.txt res.res res_8.txt res_4.txt res_17.txt-tmp res_7.txt res_1.txt res_5.txt res_12.txt res_10.txt res_13.txt res_3.txt res_2.txt res_9.txt res_11.txt res_15.txt res_18.txt-tmp res_19.txt-tmp res_14.txt .res.res.swp
          to mv /thinker/storage/udata/lingu/testy/procuratorate/tests/res2/res_6.txt
          to mv /thinker/storage/udata/lingu/testy/procuratorate/tests/res2/res_8.txt
          to mv /thinker/storage/udata/lingu/testy/procuratorate/tests/res2/res_4.txt
          to mv /thinker/storage/udata/lingu/testy/procuratorate/tests/res2/res_7.txt
          to mv /thinker/storage/udata/lingu/testy/procuratorate/tests/res2/res_1.txt
          to mv /thinker/storage/udata/lingu/testy/procuratorate/tests/res2/res_5.txt
          to mv /thinker/storage/udata/lingu/testy/procuratorate/tests/res2/res_12.txt
          to mv /thinker/storage/udata/lingu/testy/procuratorate/tests/res2/res_10.txt
          to mv /thinker/storage/udata/lingu/testy/procuratorate/tests/res2/res_13.txt
          to mv /thinker/storage/udata/lingu/testy/procuratorate/tests/res2/res_3.txt
          to mv /thinker/storage/udata/lingu/testy/procuratorate/tests/res2/res_2.txt
          to mv /thinker/storage/udata/lingu/testy/procuratorate/tests/res2/res_9.txt
          to mv /thinker/storage/udata/lingu/testy/procuratorate/tests/res2/res_11.txt
          to mv /thinker/storage/udata/lingu/testy/procuratorate/tests/res2/res_15.txt
          to mv /thinker/storage/udata/lingu/testy/procuratorate/tests/res2/res_14.txt
      juxtoposed with 10 cases
    producing output without search results
    thinkres completed with /thinker/storage/udata/lingu/testy/procuratorate/tests/res2/res.res
[zhihao@g1b-2 zhihao]$



RE: BIBO - lingu - 09-23-2020 05:43 PM

(09-23-2020 05:07 PM)zhihao Wrote:  在zhihao@g1b-2 screen zh-scr内检查日志,看到talk2thinker.log日志和talk2thinker.sh的不符,检查后发现日志是从文件thinkres.py 154行开始记录。

Yes -- some messages are confusing. I have changed them in cod://prada commit e228632.

I think you should look into procone's log to see whether deletion took place.

I looked into one log file.
Code:
[2020-09-23 16:00:07] procone starts
  tycano: 16
  more args
  keys in /thinker/storage/udata/lingu/testy/procuratorate/tests/typical/16/insert.json
    keys ready
    tyca json loaded
    opening intermediate file /thinker/storage/udata/lingu/testy/procuratorate/tests/res2/res_16.txt-tmp
    opened result file /thinker/storage/udata/lingu/testy/procuratorate/tests/res2/res_16.txt-tmp

But I am not sure if it is deleting.


RE: BIBO - zhihao - 09-23-2020 06:20 PM

(09-23-2020 05:43 PM)lingu Wrote:  
(09-23-2020 05:07 PM)zhihao Wrote:  在zhihao@g1b-2 screen zh-scr内检查日志,看到talk2thinker.log日志和talk2thinker.sh的不符,检查后发现日志是从文件thinkres.py 154行开始记录。

Yes -- some messages are confusing. I have changed them in cod://prada commit e228632.

I think you should look into procone's log to see whether deletion took place.

I looked into one log file.
Code:
[2020-09-23 16:00:07] procone starts
  tycano: 16
  more args
  keys in /thinker/storage/udata/lingu/testy/procuratorate/tests/typical/16/insert.json
    keys ready
    tyca json loaded
    opening intermediate file /thinker/storage/udata/lingu/testy/procuratorate/tests/res2/res_16.txt-tmp
    opened result file /thinker/storage/udata/lingu/testy/procuratorate/tests/res2/res_16.txt-tmp

But I am not sure if it is deleting.

我生成的log中,procone.log最后修改日期都为20200919.
Code:
[zhihao@g1b-2 zhihao]$ pwd
/thinker/local/today/users/zhihao
[zhihao@g1b-2 zhihao]$ ll
total 600
-rw-rw-r-- 1 zhihao zhihao 114659 Sep 23 17:17 auntie.log
-rw-rw-r-- 1 zhihao zhihao   6878 Sep 22 17:53 coolauntie.log
-rw------- 1 zhihao zhihao     42 Sep 22 20:45 nohup.out
-rw-rw-r-- 1 zhihao zhihao   4228 Sep 20 18:01 procone-10.log
-rw-rw-r-- 1 zhihao zhihao   1260 Sep 19 15:26 procone-11.log
-rw-rw-r-- 1 zhihao zhihao    691 Sep 19 15:26 procone-12.log
-rw-rw-r-- 1 zhihao zhihao    691 Sep 19 15:27 procone-13.log
-rw-rw-r-- 1 zhihao zhihao    630 Sep 19 15:27 procone-14.log
-rw-rw-r-- 1 zhihao zhihao    691 Sep 19 15:27 procone-16.log
-rw-rw-r-- 1 zhihao zhihao    691 Sep 19 15:27 procone-17.log
-rw-rw-r-- 1 zhihao zhihao    691 Sep 19 15:27 procone-19.log
-rw-rw-r-- 1 zhihao zhihao   1250 Sep 20 18:06 procone-1.log
-rw-rw-r-- 1 zhihao zhihao    691 Sep 19 15:27 procone-23.log
-rw-rw-r-- 1 zhihao zhihao    630 Sep 19 15:27 procone-24.log
-rw-rw-r-- 1 zhihao zhihao    691 Sep 19 15:27 procone-25.log
-rw-rw-r-- 1 zhihao zhihao   1372 Sep 20 18:06 procone-2.log
-rw-rw-r-- 1 zhihao zhihao   2058 Sep 19 15:26 procone-3.log
-rw-rw-r-- 1 zhihao zhihao    686 Sep 19 15:26 procone-4.log
-rw-rw-r-- 1 zhihao zhihao    808 Sep 19 15:26 procone-5.log
-rw-rw-r-- 1 zhihao zhihao    686 Sep 19 15:26 procone-6.log
-rw-rw-r-- 1 zhihao zhihao    625 Sep 19 15:26 procone-7.log
-rw-rw-r-- 1 zhihao zhihao    686 Sep 19 15:26 procone-8.log
-rw-rw-r-- 1 zhihao zhihao    625 Sep 19 15:26 procone-9.log
-rw-rw-r-- 1 zhihao zhihao  66305 Sep 23 17:17 sage.log
-rw-rw-r-- 1 zhihao zhihao 266700 Sep 23 17:17 simpleserv.log
-rw-rw-r-- 1 zhihao zhihao  37376 Sep 23 16:00 talk2thinker-x.log
-rw-rw-r-- 1 zhihao zhihao   3922 Sep 23 17:17 thinkeres-x.log
[zhihao@g1b-2 zhihao]$



RE: BIBO - lingu - 09-23-2020 06:27 PM

(09-23-2020 06:20 PM)zhihao Wrote:  
Code:
[zhihao@g1b-2 zhihao]$ pwd
/thinker/local/today/users/zhihao

need go to /thinker/local/today/users/sage2 because sage runs the individual tasks and sage runs using user sage2.

I suggest you split D info to anthoher thread and split the BIBO system on g1b as another thread. This is the overview thread for BIBO and we do not want it to be too crowded.


RE: BIBO - zhihao - 09-23-2020 07:11 PM

(09-23-2020 06:27 PM)lingu Wrote:  
(09-23-2020 06:20 PM)zhihao Wrote:  
Code:
[zhihao@g1b-2 zhihao]$ pwd
/thinker/local/today/users/zhihao

need go to /thinker/local/today/users/sage2 because sage runs the individual tasks and sage runs using user sage2.

I suggest you split D info to anthoher thread and split the BIBO system on g1b as another thread. This is the overview thread for BIBO and we do not want it to be too crowded.

可否实现删除功能后再移动。D info准备移动到 Technology and Beyond (TaB) / Research / D-team / Customers下,但是里面还没有检察院的板块。


RE: BIBO - zhihao - 09-23-2020 07:29 PM

我在 zhihao@g1b screen procurat内修改了talk2thinker.sh line136为flog " ===============received new case in $newcasepfn",并在screen simpleservn内重启simpleserv服务。
在screen log内查看到talk2thinker.sh对应的日志在simpleserv.log内,但是simpleserv.log内并没有看到“=====”。


RE: BIBO - lingu - 09-23-2020 07:31 PM

(09-23-2020 07:05 PM)zhihao Wrote:  talk2thinker.sh 中,我加入了 flog "casetype is: $casetype",并重启simpleserv服务
Code:
casecnt=$(pcf --pcf $biboext --get bibo_doc_cnt)
  /bin/cp $reqpfn $newcasepfn
  flog_enable_timestamp=True flog "    received new case in $newcasepfn"

  # if "type":"insert"
  casetype=`jq '.type' $newcasepfn | tr -d '"'`
  flog "casetype is: $casetype"
  if [[ $casetype == 'insert' ]]; then
    newdir=/thinker/globe/udata/lingu/testy/procuratorate/tests/typical/$((++casecnt))
    mkdir $newdir
在simpleserv.log里找到了talk2thinker日志。从下面输出上没有看到 received new case 后有上面添加的 flog "casetype is: $casetype"的输出。

计算机永远是对的,肯定是我们的程序有什么问题。

首先要确定是否你修改的talk2thinker.sh运行了。我查看simpleserv代码ncat语句如下:

Code:
ncat --listen 62818 --sh-exec /home/lingu/forest/prada/prada/procuratorate/ta\
lk2thinker.sh

你修改的应该不是/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh 那么就没有运行你修改的代码。此处应该修改路径,把simpleserv和talk2thinker.sh都放到一个类似于$bibo_base的地方去。

要学会看着代码分析和排查。


RE: BIBO - zhihao - 09-23-2020 08:13 PM

(09-23-2020 07:31 PM)lingu Wrote:  
(09-23-2020 07:05 PM)zhihao Wrote:  talk2thinker.sh 中,我加入了 flog "casetype is: $casetype",并重启simpleserv服务
Code:
casecnt=$(pcf --pcf $biboext --get bibo_doc_cnt)
  /bin/cp $reqpfn $newcasepfn
  flog_enable_timestamp=True flog "    received new case in $newcasepfn"

  # if "type":"insert"
  casetype=`jq '.type' $newcasepfn | tr -d '"'`
  flog "casetype is: $casetype"
  if [[ $casetype == 'insert' ]]; then
    newdir=/thinker/globe/udata/lingu/testy/procuratorate/tests/typical/$((++casecnt))
    mkdir $newdir
在simpleserv.log里找到了talk2thinker日志。从下面输出上没有看到 received new case 后有上面添加的 flog "casetype is: $casetype"的输出。

计算机永远是对的,肯定是我们的程序有什么问题。

首先要确定是否你修改的talk2thinker.sh运行了。我查看simpleserv代码ncat语句如下:

Code:
ncat --listen 62818 --sh-exec /home/lingu/forest/prada/prada/procuratorate/ta\
lk2thinker.sh

你修改的应该不是/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh 那么就没有运行你修改的代码。此处应该修改路径,把simpleserv和talk2thinker.sh都放到一个类似于$bibo_base的地方去。

要学会看着代码分析和排查。

已将procone.py, simpleserv.sh, talk2thinker.sh, thinkres.py放到$bibo_base: /thinker/globe/soft/bibo 并更新首文


RE: BIBO - lingu - 09-23-2020 09:02 PM

(09-23-2020 07:11 PM)zhihao Wrote:  可否实现删除功能后再移动。

OK.

Quote:D info准备移动到 Technology and Beyond (TaB) / Research / D-team / Customers下,但是里面还没有检察院的板块。

就放本版块即可。


RE: BIBO - zhihao - 09-23-2020 09:04 PM

tmux session ncat内执行ncat返回404
Code:
[zhihao@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050
{
"code": 404,
"msg": "not found",
"children": [
]
}

[zhihao@limbo30-1 processed]$



RE: BIBO - lingu - 09-23-2020 09:22 PM

(09-23-2020 09:04 PM)zhihao Wrote:  tmux session ncat内执行ncat返回404
Code:
[zhihao@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050
{
"code": 404,
"msg": "not found",
"children": [
]
}

[zhihao@limbo30-1 processed]$

I restarted sage.
Code:
1024  ~/sage/bin/sage stop
1025  ~/sage/bin/sage start

but it hasn't helped.
Code:
[zhihao@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050
{
"code": 404,
"msg": "not found",
"children": [
]
}

[zhihao@limbo30-1 processed]$



RE: BIBO - lingu - 09-23-2020 09:28 PM

(09-23-2020 09:22 PM)lingu Wrote:  but it hasn't helped.
Code:
[zhihao@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050
{
"code": 404,
"msg": "not found",
"children": [
]
}

[zhihao@limbo30-1 processed]$

i tested procone and it has some syntax error.
Code:
[sage2@g1b-2 ~]$ /thinker/globe/soft/bibo/procone.py --tycano 10
  File "/thinker/globe/soft/bibo/procone.py", line 27
    os.system(rid --insitu tycajson_pfn)
                                      ^
SyntaxError: invalid syntax
[sage2@g1b-2 ~]$

The param should be a string.

But os.system is not our preferred way to run a command. We use cmdline. So I changed it to
Code:
cmdline.runOrExit("rid --insitu tycajson_pfn")

After this is fixed, there is another error.
Code:
[sage2@g1b-2 ~]$ /thinker/globe/soft/bibo/procone.py --tycano 10
  File "/thinker/globe/soft/bibo/procone.py", line 51
    elif opt == "--reqtype"
                          ^
SyntaxError: invalid syntax
[sage2@g1b-2 ~]$

Added ':'
Next error
Code:
[sage2@g1b-2 ~]$ /thinker/globe/soft/bibo/procone.py --tycano 10
Traceback (most recent call last):
  File "/thinker/globe/soft/bibo/procone.py", line 189, in <module>
    main()
  File "/thinker/globe/soft/bibo/procone.py", line 85, in main
    if reqtype == "delete":
UnboundLocalError: local variable 'reqtype' referenced before assignment
[sage2@g1b-2 ~]$

you need make sure all vars are assigned a value before they are used. I added
Code:
reqtype = None
at the beginning of the code.

Now the query request works in tmux session ncat.
Code:
[zhihao@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050
...
   ],
   "caseid": "67be23909e6311eabceb005056c00001",
   "caseyear": 2016,
   "casetitle": "马世龙(抢劫)核准追诉案",
   "casetype": "最高人民检察院指导性案例",
   "caserate": "5.00",
   "caseaction": "抢劫罪",
   "score": 100
  }
]
}

delete seems to work as well.
Code:
[zhihao@limbo30-1 processed]$ ( cat del_zengxingliang.json; sleep 18 ) | ncat trajan.d-thinker.org 20050
{
"code": 200,
"msg": "ok",
"children": []
}

I am leaving tmux session ncat. You can proceed to test it and make sure delete works. Then inform the customer to test.


RE: BIBO - zhihao - 09-23-2020 11:14 PM

screen procurat 内执行procone.py解析错误
Code:
[sage2@g1b-2 bibo]$ ./procone.py --tycano 15 --reqtype delete --reqcaseid 67be261c9e6311eabceb005056c00001
Traceback (most recent call last):
  File "./procone.py", line 191, in <module>
    main()
  File "./procone.py", line 41, in main
    '--reference=',
  File "/usr/lib64/python2.7/getopt.py", line 131, in gnu_getopt
    opts, args = do_longs(opts, args[0][2:], longopts, args[1:])
  File "/usr/lib64/python2.7/getopt.py", line 152, in do_longs
    has_arg, opt = long_has_args(opt, longopts)
  File "/usr/lib64/python2.7/getopt.py", line 169, in long_has_args
    raise GetoptError('option --%s not recognized' % opt, opt)
getopt.GetoptError: option --reqtype not recognized
[sage2@g1b-2 bibo]$



RE: BIBO - lingu - 09-23-2020 11:31 PM

(09-23-2020 11:14 PM)zhihao Wrote:  screen procurat 内执行procone.py解析错误
Code:
[sage2@g1b-2 bibo]$ ./procone.py --tycano 15 --reqtype delete --reqcaseid 67be261c9e6311eabceb005056c00001
Traceback (most recent call last):
  File "./procone.py", line 191, in <module>
    main()
  File "./procone.py", line 41, in main
    '--reference=',
  File "/usr/lib64/python2.7/getopt.py", line 131, in gnu_getopt
    opts, args = do_longs(opts, args[0][2:], longopts, args[1:])
  File "/usr/lib64/python2.7/getopt.py", line 152, in do_longs
    has_arg, opt = long_has_args(opt, longopts)
  File "/usr/lib64/python2.7/getopt.py", line 169, in long_has_args
    raise GetoptError('option --%s not recognized' % opt, opt)
getopt.GetoptError: option --reqtype not recognized
[sage2@g1b-2 bibo]$

you need study how gnu_getopt works.

For programming, you can copy the logic for '--tycano'.


RE: BIBO - zhihao - 09-23-2020 11:41 PM

Code:
[sage2@g1b-2 bibo]$ ./procone.py --tycano 15 --reqtype delete --reqcaseid 67be261c9e6311eabceb005056c00001
[sage2@g1b-2 bibo]$

Code:
[zhihao@g1b-2 sage2]$ less procone-15.log
[2020-09-23 22:40:02] procone starts
  tycano: 15
  more args
  keys in /thinker/storage/udata/lingu/testy/procuratorate/tests/typical/15/insert.json
    keys ready
    tyca json loaded.
deleting file
(END)



RE: BIBO - zhihao - 09-24-2020 12:53 AM

screen procurat内执行两次delete请求时报错
Code:
[sage2@g1b-2 bibo]$ ./procone.py --tycano 26 --reqtype delete --reqcaseid 67be261c9e6311eabceb005056c00001
Traceback (most recent call last):
  File "./procone.py", line 203, in <module>
    main()
  File "./procone.py", line 98, in main
    glog.flog("    caseid before delete(): " + caseid)
TypeError: cannot concatenate 'str' and 'NoneType' objects
[sage2@g1b-2 bibo]$



RE: BIBO - lingu - 09-24-2020 10:41 AM

(09-24-2020 12:53 AM)zhihao Wrote:  screen procurat内执行两次delete请求时报错
Code:
[sage2@g1b-2 bibo]$ ./procone.py --tycano 26 --reqtype delete --reqcaseid 67be261c9e6311eabceb005056c00001
Traceback (most recent call last):
  File "./procone.py", line 203, in <module>
    main()
  File "./procone.py", line 98, in main
    glog.flog("    caseid before delete(): " + caseid)
TypeError: cannot concatenate 'str' and 'NoneType' objects
[sage2@g1b-2 bibo]$

This seems to be an easy-to-fix bug. Perhaps some logic asks for caseid but our "empty" json does not have it. We just need adjust the logic to handle empty json files.


RE: BIBO - zhihao - 09-24-2020 01:20 PM

(09-23-2020 06:27 PM)lingu Wrote:  
(09-23-2020 06:20 PM)zhihao Wrote:  
Code:
[zhihao@g1b-2 zhihao]$ pwd
/thinker/local/today/users/zhihao

need go to /thinker/local/today/users/sage2 because sage runs the individual tasks and sage runs using user sage2.

I suggest you split D info to anthoher thread
moved D info to Rigorous and Reliable (RAR) / 工作 / 市场 / 最高人民检察院 / prada -- D

(09-23-2020 06:27 PM)lingu Wrote:  and split the BIBO system on g1b as another thread. This is the overview thread for BIBO and we do not want it to be too crowded.
moved BIBO system info to Rigorous and Reliable (RAR) / 工作 / 市场 / 最高人民检察院 / BIBO system


RE: BIBO - lingu - 09-24-2020 07:18 PM

Let's move this thread to prada's board, too.


RE: BIBO - zhihao - 09-26-2020 11:58 AM

(09-24-2020 07:18 PM)lingu Wrote:  Let's move this thread to prada's board, too.

moved this thread to prada's board.


RE: BIBO - lingu - 09-26-2020 01:21 PM

Now it's time to make bibo a module -- cod://bibo It installs the client and mid-tier programs of bibo including the tests.

The bibo tests should be able to run on client boxes, such as limbo30-1.

Pls also create a board for BIBO. This prada board has been crowded.


RE: BIBO - zhihao - 09-26-2020 03:14 PM

(09-26-2020 01:21 PM)lingu Wrote:  Now it's time to make bibo a module -- cod://bibo It installs the client and mid-tier programs of bibo including the tests.
OK, add todo tag to headpost.

(09-26-2020 01:21 PM)lingu Wrote:  The bibo tests should be able to run on client boxes, such as limbo30-1.
OK, I'll copy test cases directory to cod://bibo.

(09-26-2020 01:21 PM)lingu Wrote:  Pls also create a board for BIBO. This prada board has been crowded.

created in http://rar.shufangkeji.com:60380/forumdisplay.php?fid=602.


RE: BIBO - lingu - 09-29-2020 09:57 AM

(09-26-2020 03:14 PM)zhihao Wrote:  
(09-26-2020 01:21 PM)lingu Wrote:  Now it's time to make bibo a module -- cod://bibo It installs the client and mid-tier programs of bibo including the tests.
OK, add todo tag to headpost.

pls create cod://bibo soon. We should deploy it on limbo30 and wp288.


RE: BIBO - zhihao - 10-06-2020 06:01 PM

(09-03-2020 11:53 PM)lingu Wrote:  We build BIBO system for procuratorate

add new maintainer info for BIBO system on limbo30-2:

We build BIBO system (( -> on g1b ))for procuratorate(( -> (this system will be moved to limbo30-2 soon))

(( -> We maintain BIBO system on limbo30-2 for procuratorate))


RE: BIBO - lingu - 10-06-2020 09:07 PM

(09-03-2020 11:53 PM)lingu Wrote:  We maintain BIBO system on limbo30-2 for procuratorate

We maintain all BIBO systems, not just the one on g1b. I'll change the headpost.

Also, the link points to a post, not the thread. You should remove the 'pid...' part of the URL. I am also changing it in the headpost.


RE: BIBO - zhihao - 10-08-2020 12:07 AM

(09-29-2020 09:57 AM)lingu Wrote:  
(09-26-2020 03:14 PM)zhihao Wrote:  
(09-26-2020 01:21 PM)lingu Wrote:  Now it's time to make bibo a module -- cod://bibo It installs the client and mid-tier programs of bibo including the tests.
OK, add todo tag to headpost.

pls create cod://bibo soon. We should deploy it on limbo30 and wp288.

created cod://bibo


RE: BIBO - lingu - 10-08-2020 08:46 PM

(10-08-2020 12:07 AM)zhihao Wrote:  
(09-29-2020 09:57 AM)lingu Wrote:  pls create cod://bibo soon. We should deploy it on limbo30 and wp288.

created cod://bibo

There is a strange file [B in the CT. Pls check.

What is procone-ok?

I am moving most of the programs into a subdir 'plug' because they are plug-in programs. The main driving program is actually sage. We may place some internal programs in cod://biboback and downsync them to cod://bibo

We ship cod://bibo's SIM files to customer site for installation.


RE: BIBO - zhihao - 10-08-2020 10:47 PM

(10-08-2020 08:46 PM)lingu Wrote:  
(10-08-2020 12:07 AM)zhihao Wrote:  
(09-29-2020 09:57 AM)lingu Wrote:  pls create cod://bibo soon. We should deploy it on limbo30 and wp288.

created cod://bibo

There is a strange file [B in the CT. Pls check.

What is procone-ok?

[B is created by lingu, it's an old version of procone.py, maybe created by mistake, I deleted it.
procone-ok.py is my backup copyed to bibo system by mistake, I deleted it.
Code:
[zhihao@g1b-2 bibo]$ ll /thinker/globe/soft/bibo/
total 43
-rwxrwxr-x 1 lingu  lingu   6438 Sep 24 22:45 [B
-rwxrwxrwx 1 zhihao zhihao  2269 Sep 27 23:57 bibo-ext.pcf
drwxrwxrwx 1 zhihao zhihao    16 Sep 26 16:13 processed
-rwxr-xr-x 1 root   root    8597 Sep 28 08:46 procone-ok.py
-rwxrwxr-x 1 lingu  lingu  10471 Sep 28 09:48 procone.py
-rwxrwxr-x 1 lingu  lingu   1148 Sep 26 15:52 simpleserv.sh
-rwxrwxrwx 1 sage2  sage2   1970 Sep 28 11:15 talk2thinker.ret
-rwxrwxr-x 1 zhihao zhihao  6363 Sep 27 19:10 talk2thinker.sh
-rwxrwxr-x 1 zhihao zhihao  4198 Sep 27 15:47 thinkres.py
[zhihao@g1b-2 bibo]$



RE: BIBO - lingu - 10-09-2020 07:52 AM

(10-08-2020 10:47 PM)zhihao Wrote:  
(10-08-2020 08:46 PM)lingu Wrote:  
(10-08-2020 12:07 AM)zhihao Wrote:  
(09-29-2020 09:57 AM)lingu Wrote:  pls create cod://bibo soon. We should deploy it on limbo30 and wp288.

created cod://bibo

There is a strange file [B in the CT. Pls check.

What is procone-ok?

[B is created by lingu, it's an old version of procone.py, maybe created by mistake, I deleted it.
procone-ok.py is my backup copyed to bibo system by mistake, I deleted it.

haven't seen changes in the CT, yet. Have you pushed your changes?


RE: BIBO - zhihao - 10-09-2020 11:38 AM

(10-09-2020 07:52 AM)lingu Wrote:  
(10-08-2020 10:47 PM)zhihao Wrote:  
(10-08-2020 08:46 PM)lingu Wrote:  
(10-08-2020 12:07 AM)zhihao Wrote:  
(09-29-2020 09:57 AM)lingu Wrote:  pls create cod://bibo soon. We should deploy it on limbo30 and wp288.

created cod://bibo

There is a strange file [B in the CT. Pls check.

What is procone-ok?

[B is created by lingu, it's an old version of procone.py, maybe created by mistake, I deleted it.
procone-ok.py is my backup copyed to bibo system by mistake, I deleted it.

haven't seen changes in the CT, yet. Have you pushed your changes?

pushed at 202010090837


RE: BIBO - zhihao - 08-08-2021 12:37 PM

(09-03-2020 11:53 PM)lingu Wrote:  We build BIBO system on g1b for procuratorate (this system will be moved to limbo30-2 soon

((->We build a BIBO system on limbo305))


RE: BIBO - zhihao - 08-09-2021 06:33 PM

There is BIBO system on wp289b


RE: BIBO - lingu - 08-12-2021 01:26 PM

(09-03-2020 11:53 PM)lingu Wrote:  [done] p1. implement delete function in procone.py
[todo] p2. make bibo a module -- cod://bibo It installs the client and mid-tier programs of bibo including the tests.


BIBO means BIBliOgraphy. BIBO matches an article with most related articles in an corpus.

We maintain several BIBO systems.

There is BIBO system on wp289b
We build a BIBO system on limbo305
We build BIBO system on g1b for procuratorate (this system will be moved to limbo30-2 soon

We record designers' info for cod://prada/procuratorate

No users' info? Pls build Ui and Ue.

We can move some admin info, such as how to start and stop bibo, into U info as well because we want our partners to help maintain them and they are considered users by us.


RE: BIBO - zhihao - 08-12-2021 02:47 PM

(08-12-2021 01:26 PM)lingu Wrote:  
(09-03-2020 11:53 PM)lingu Wrote:  [done] p1. implement delete function in procone.py
[todo] p2. make bibo a module -- cod://bibo It installs the client and mid-tier programs of bibo including the tests.


BIBO means BIBliOgraphy. BIBO matches an article with most related articles in an corpus.

We maintain several BIBO systems.

There is BIBO system on wp289b
We build a BIBO system on limbo305
We build BIBO system on g1b for procuratorate (this system will be moved to limbo30-2 soon

We record designers' info for cod://prada/procuratorate

No users' info? Pls build Ui and Ue.

Created Ui. Ue will create later.
---
Users' info about BIBO
---

mark title as BIBO - O