mirror of
https://github.com/QingdaoU/oj-docs.git
synced 2024-12-28 23:41:43 +00:00
update
This commit is contained in:
parent
55f54469a9
commit
e3f3227c58
@ -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>
|
||||
|
@ -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:
|
||||
- "0.0.0.0:8005:8080"
|
||||
</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>
|
||||
|
@ -244,7 +244,8 @@
|
||||
"cpu_core": 1,
|
||||
// usage of cpu and memory
|
||||
"cpu": 4.1,
|
||||
"memory": 24.5
|
||||
"memory": 24.5,
|
||||
"action": "pong"
|
||||
}
|
||||
</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>
|
||||
|
@ -216,7 +216,7 @@ mkdir build && cd build && cmake .. && make && 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 && cd build && cmake .. && make && s
|
||||
... 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)
|
||||
|
||||
@ -309,8 +309,7 @@ mkdir build && cd build && cmake .. && make && 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>
|
||||
|
@ -216,7 +216,7 @@ mkdir build && cd build && cmake .. && make && 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 && cd build && cmake .. && make && s
|
||||
... 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)
|
||||
|
||||
@ -309,8 +309,7 @@ mkdir build && cd build && cmake .. && make && 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
@ -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>
|
||||
|
||||
|
@ -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
|
||||
|
@ -44,7 +44,7 @@ judge_server:
|
||||
- "0.0.0.0:8005:8080"
|
||||
```
|
||||
|
||||
# heartbeat request
|
||||
# Heartbeat request
|
||||
|
||||
- Method `POST`
|
||||
- `X-JUDGE-SERVER-TOKEN`: `sha256(token)`
|
||||
|
@ -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`
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user