Linux operation » History » Revision 2
Revision 1 (jun chen, 04/22/2025 04:40 PM) → Revision 2/3 (jun chen, 05/06/2025 03:11 PM)
# Linux operation
## LSF monitor
首先需要确定lsf config位置,并grep queue的名字:
```
/edatool/lsf10/conf/lsbatch/lsf01/configdir/
lsb.queues, lsb.hosts
```
在 lsb.queues 中,寻找 QUEUE_NAME 和 HOSTS 对应的列表
```
Begin Queue
QUEUE_NAME = pd
PRIORIYT = 30
...
USERS = pd
HOSTS = nor_10g
```
在 lsb.hosts 中获得具体的 machine name
## owner wrapper
如果需要征用其他人权限,移交文件所属权
Wrapper script
```
g++ getid.cpp -O3 -o br_pc_wrapper
chmod +s br_pc_wrapper
```
Wrapper code
```
#include <unistd.h>
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <cstring>
real_uid = getuid();
effective_uid = getuid();
seteuid(4219);
setuid(4219);
setreuid(4249, 4249);
system(argv[1]);
```