Project

General

Profile

Linux operation » History » Version 2

jun chen, 05/06/2025 03:11 PM

1 1 jun chen
# Linux operation
2
3 2 jun chen
## LSF monitor
4
5
首先需要确定lsf config位置,并grep queue的名字:
6
```
7
/edatool/lsf10/conf/lsbatch/lsf01/configdir/
8
9
lsb.queues, lsb.hosts
10
```
11
12
在 lsb.queues 中,寻找 QUEUE_NAME 和 HOSTS 对应的列表
13
```
14
Begin Queue
15
QUEUE_NAME   = pd
16
PRIORIYT     = 30
17
...
18
USERS        = pd
19
HOSTS        = nor_10g
20
```
21
在 lsb.hosts 中获得具体的 machine name
22
23 1 jun chen
24
## owner wrapper
25
26
如果需要征用其他人权限,移交文件所属权
27
28
Wrapper script
29
30
```
31
g++ getid.cpp -O3 -o br_pc_wrapper
32
chmod +s br_pc_wrapper
33
```
34
35
Wrapper code
36
37
```
38
#include <unistd.h>
39
#include <sys/types.h>
40
#include <stdio.h>
41
#include <stdlib.h>
42
#include <cstring>
43
44
real_uid = getuid();
45
effective_uid = getuid();
46
seteuid(4219);
47
setuid(4219);
48
setreuid(4249, 4249);
49
system(argv[1]);
50
51
```