This commit is contained in:
virusdefender 2016-10-07 20:41:27 +08:00
parent 55f54469a9
commit e3f3227c58
12 changed files with 44 additions and 48 deletions

View File

@ -229,7 +229,8 @@
"cpu_core": 1,
// cpu和内存使用率百分比
"cpu": 4.1,
"memory": 24.5
"memory": 24.5,
"action": "pong"
}
</code></pre>
@ -242,7 +243,6 @@
<ul>
<li>src源码</li>
<li>language_config参考<code>languages.py</code>中,一般不需要修改</li>
<li>submission_id这个提交唯一的id请不要出现重复比如使用时间戳也是不推荐的</li>
<li>max_cpu_time单位毫秒</li>
<li>max_memory最大内存单位字节</li>
<li>test_case_id用于找到存放有测试用例的文件夹</li>
@ -320,7 +320,6 @@
<ul>
<li>src</li>
<li>language_config</li>
<li>submission_id</li>
<li>max_cpu_time</li>
<li>max_memory</li>
<li>test_case_id</li>

View File

@ -177,7 +177,7 @@
<li class="main "><a href="#containers-are-deployed-in-multi-hosts">Containers are deployed in multi hosts</a></li>
<li class="main "><a href="#heartbeat-request">heartbeat request</a></li>
<li class="main "><a href="#heartbeat-request">Heartbeat request</a></li>
</ul>
@ -220,7 +220,7 @@ judge_server:
- &quot;0.0.0.0:8005:8080&quot;
</code></pre>
<h1 id="heartbeat-request">heartbeat request</h1>
<h1 id="heartbeat-request">Heartbeat request</h1>
<ul>
<li>Method <code>POST</code></li>
<li><code>X-JUDGE-SERVER-TOKEN</code>: <code>sha256(token)</code></li>

View File

@ -244,7 +244,8 @@
&quot;cpu_core&quot;: 1,
// usage of cpu and memory
&quot;cpu&quot;: 4.1,
&quot;memory&quot;: 24.5
&quot;memory&quot;: 24.5,
&quot;action&quot;: &quot;pong&quot;
}
</code></pre>
@ -256,7 +257,6 @@
<ul>
<li><code>src</code>: source code</li>
<li><code>language_config</code>: refer to <code>client/Python/languages.py</code>, do not need to modify generally</li>
<li><code>submission_id</code>: the only id of the submission, do not repeat</li>
<li><code>max_cpu_time</code>: unit is ms</li>
<li><code>max_memory</code>: unit is byte</li>
<li><code>test_case_id</code>: used to get the test_case directory</li>
@ -330,7 +330,6 @@
<ul>
<li><code>src</code></li>
<li><code>language_config</code></li>
<li><code>submission_id</code></li>
<li><code>max_cpu_time</code></li>
<li><code>max_memory</code></li>
<li><code>test_case_id</code></li>

View File

@ -216,7 +216,7 @@ mkdir build &amp;&amp; cd build &amp;&amp; cmake .. &amp;&amp; make &amp;&amp; s
<li><code>args</code> (string array terminated by NULL): arguments to run this process</li>
<li><code>env</code> (string array terminated by NULL): environment variables this process can get</li>
<li><code>log_path</code>: judger log path</li>
<li><code>seccomp_rule_so_path</code>(string or NULL): seccomp rules used to limit process system calls</li>
<li><code>seccomp_rule_name</code>(string or NULL): seccomp rules used to limit process system calls. Name is used to call corresponding functions.</li>
<li><code>uid</code>: user to run this process</li>
<li><code>gid</code>: user group this process belongs to</li>
</ul>
@ -281,7 +281,7 @@ mkdir build &amp;&amp; cd build &amp;&amp; cmake .. &amp;&amp; make &amp;&amp; s
... env=[&quot;foo=bar&quot;],
... log_path=&quot;judger.log&quot;,
... # can be None
... seccomp_rule_so_path=&quot;/usr/lib/judger/librule_c_cpp.so&quot;,
... seccomp_rule_name=&quot;c_cpp&quot;,
... uid=0,
... gid=0)
@ -309,8 +309,7 @@ mkdir build &amp;&amp; cd build &amp;&amp; cmake .. &amp;&amp; make &amp;&amp; s
<li>Root user required to change uid / gid</li>
<li>Why use seccomp instead of ptrace? Ptrace can decrease process's performance significantly, for each system call, twice
context switch between child process and parent process is needed.</li>
<li>How to custom seccomp rule? <a href="https://github.com/QingdaoU/Judger/blob/newnew/src/rules/c_cpp/rule.c">Example here</a>, then reinstall jduger, your code will be compiled and installed under
<code>/usr/lib/judger</code></li>
<li>How to custom seccomp rule? <a href="https://github.com/QingdaoU/Judger/blob/newnew/src/rules/c_cpp.c">Example here</a>.</li>
</ul>
<h2 id="license">License</h2>
<p>The Star And Thank Author License (SATA)</p></div>

View File

@ -216,7 +216,7 @@ mkdir build &amp;&amp; cd build &amp;&amp; cmake .. &amp;&amp; make &amp;&amp; s
<li><code>args</code> (string array terminated by NULL): arguments to run this process</li>
<li><code>env</code> (string array terminated by NULL): environment variables this process can get</li>
<li><code>log_path</code>: judger log path</li>
<li><code>seccomp_rule_so_path</code>(string or NULL): seccomp rules used to limit process system calls</li>
<li><code>seccomp_rule_name</code>(string or NULL): seccomp rules used to limit process system calls. Name is used to call corresponding functions.</li>
<li><code>uid</code>: user to run this process</li>
<li><code>gid</code>: user group this process belongs to</li>
</ul>
@ -281,7 +281,7 @@ mkdir build &amp;&amp; cd build &amp;&amp; cmake .. &amp;&amp; make &amp;&amp; s
... env=[&quot;foo=bar&quot;],
... log_path=&quot;judger.log&quot;,
... # can be None
... seccomp_rule_so_path=&quot;/usr/lib/judger/librule_c_cpp.so&quot;,
... seccomp_rule_name=&quot;c_cpp&quot;,
... uid=0,
... gid=0)
@ -309,8 +309,7 @@ mkdir build &amp;&amp; cd build &amp;&amp; cmake .. &amp;&amp; make &amp;&amp; s
<li>Root user required to change uid / gid</li>
<li>Why use seccomp instead of ptrace? Ptrace can decrease process's performance significantly, for each system call, twice
context switch between child process and parent process is needed.</li>
<li>How to custom seccomp rule? <a href="https://github.com/QingdaoU/Judger/blob/newnew/src/rules/c_cpp/rule.c">Example here</a>, then reinstall jduger, your code will be compiled and installed under
<code>/usr/lib/judger</code></li>
<li>How to custom seccomp rule? <a href="https://github.com/QingdaoU/Judger/blob/newnew/src/rules/c_cpp.c">Example here</a>.</li>
</ul>
<h2 id="license">License</h2>
<p>The Star And Thank Author License (SATA)</p></div>

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
<url>
<loc>None/</loc>
<lastmod>2016-10-06</lastmod>
<lastmod>2016-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
@ -13,7 +13,7 @@
<url>
<loc>None/Judger/</loc>
<lastmod>2016-10-06</lastmod>
<lastmod>2016-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
@ -29,7 +29,7 @@
<url>
<loc>None/JudgeServer/</loc>
<lastmod>2016-10-06</lastmod>
<lastmod>2016-10-07</lastmod>
<changefreq>daily</changefreq>
</url>

View File

@ -23,7 +23,8 @@
"cpu_core": 1,
// cpu和内存使用率百分比
"cpu": 4.1,
"memory": 24.5
"memory": 24.5,
"action": "pong"
}
```
@ -36,7 +37,6 @@
- src源码
- language_config参考`languages.py`中,一般不需要修改
- submission_id这个提交唯一的id请不要出现重复比如使用时间戳也是不推荐的
- max_cpu_time单位毫秒
- max_memory最大内存单位字节
- test_case_id用于找到存放有测试用例的文件夹
@ -123,7 +123,6 @@
- src
- language_config
- submission_id
- max_cpu_time
- max_memory
- test_case_id

View File

@ -44,7 +44,7 @@ judge_server:
- "0.0.0.0:8005:8080"
```
# heartbeat request
# Heartbeat request
- Method `POST`
- `X-JUDGE-SERVER-TOKEN`: `sha256(token)`

View File

@ -28,7 +28,8 @@
"cpu_core": 1,
// usage of cpu and memory
"cpu": 4.1,
"memory": 24.5
"memory": 24.5,
"action": "pong"
}
```
@ -40,7 +41,6 @@
- `src`: source code
- `language_config`: refer to `client/Python/languages.py`, do not need to modify generally
- `submission_id`: the only id of the submission, do not repeat
- `max_cpu_time`: unit is ms
- `max_memory`: unit is byte
- `test_case_id`: used to get the test_case directory
@ -123,7 +123,6 @@ Special Judge must be compiled before, refer to the above API
- `src`
- `language_config`
- `submission_id`
- `max_cpu_time`
- `max_memory`
- `test_case_id`

View File

@ -25,7 +25,7 @@ mkdir build && cd build && cmake .. && make && sudo make install
- `args` (string array terminated by NULL): arguments to run this process
- `env` (string array terminated by NULL): environment variables this process can get
- `log_path`: judger log path
- `seccomp_rule_so_path`(string or NULL): seccomp rules used to limit process system calls
- `seccomp_rule_name`(string or NULL): seccomp rules used to limit process system calls. Name is used to call corresponding functions.
- `uid`: user to run this process
- `gid`: user group this process belongs to
@ -94,7 +94,7 @@ Args with string must be Python `str` type
... env=["foo=bar"],
... log_path="judger.log",
... # can be None
... seccomp_rule_so_path="/usr/lib/judger/librule_c_cpp.so",
... seccomp_rule_name="c_cpp",
... uid=0,
... gid=0)
@ -125,9 +125,10 @@ cd tests && sudo python test.py
- Root user required to change uid / gid
- Why use seccomp instead of ptrace? Ptrace can decrease process's performance significantly, for each system call, twice
context switch between child process and parent process is needed.
- How to custom seccomp rule? [Example here](https://github.com/QingdaoU/Judger/blob/newnew/src/rules/c_cpp/rule.c), then reinstall jduger, your code will be compiled and installed under
`/usr/lib/judger`
- How to custom seccomp rule? [Example here](https://github.com/QingdaoU/Judger/blob/newnew/src/rules/c_cpp.c).
## License
The Star And Thank Author License (SATA)

View File

@ -25,7 +25,7 @@ mkdir build && cd build && cmake .. && make && sudo make install
- `args` (string array terminated by NULL): arguments to run this process
- `env` (string array terminated by NULL): environment variables this process can get
- `log_path`: judger log path
- `seccomp_rule_so_path`(string or NULL): seccomp rules used to limit process system calls
- `seccomp_rule_name`(string or NULL): seccomp rules used to limit process system calls. Name is used to call corresponding functions.
- `uid`: user to run this process
- `gid`: user group this process belongs to
@ -94,7 +94,7 @@ Args with string must be Python `str` type
... env=["foo=bar"],
... log_path="judger.log",
... # can be None
... seccomp_rule_so_path="/usr/lib/judger/librule_c_cpp.so",
... seccomp_rule_name="c_cpp",
... uid=0,
... gid=0)
@ -125,9 +125,10 @@ cd tests && sudo python test.py
- Root user required to change uid / gid
- Why use seccomp instead of ptrace? Ptrace can decrease process's performance significantly, for each system call, twice
context switch between child process and parent process is needed.
- How to custom seccomp rule? [Example here](https://github.com/QingdaoU/Judger/blob/newnew/src/rules/c_cpp/rule.c), then reinstall jduger, your code will be compiled and installed under
`/usr/lib/judger`
- How to custom seccomp rule? [Example here](https://github.com/QingdaoU/Judger/blob/newnew/src/rules/c_cpp.c).
## License
The Star And Thank Author License (SATA)