User Tools

Site Tools


servst

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
servst [2025/07/16 02:59] zhangykservst [2025/07/17 04:34] (current) zhangyk
Line 1: Line 1:
 <markdown> <markdown>
 # servst # servst
 +
 +[Gitlab](https://www.frcbs.tsinghua.edu.cn/gitlab/zhangyuankuan/servst)
  
 ## 1. Description ## 1. Description
-`servst` is a collection of tools designed to inspect the utilization status of +`servst` is primarily a collection of tools designed to inspect the utilization  
-each server.+status of each server. Then I add support for MD tasks, to show them or kill  
 +them conveniently and thoroughly.
  
 - `gpust` and `cpust` provide status for servers - `gpust` and `cpust` provide status for servers
 - `gpurf` and `cpurf` refresh status information for all or specific servers - `gpurf` and `cpurf` refresh status information for all or specific servers
 - `lsmd`  and `lsmds` fetch the latest progress of MD tasks for servers - `lsmd`  and `lsmds` fetch the latest progress of MD tasks for servers
 +- `killmd` kill target MD tasks
  
 ## 2. Installation ## 2. Installation
Line 129: Line 133:
 ``` ```
  
-## 4Design+### 3.4 For killmd
  
-### 4.1 For gpust and gpurf+Guide can be called by typing `killmd -h`. 
 +``` 
 +usage: killmd.py [-h] [-a] [-p PID] [-g GPU]
  
-#### 4.1.1 Outer layer +Kill series of md tasks instantly.
-I write some global aliases which will be ready when a shell instance is opened. +
-As you can see, the content of `gpuinfo`, located at `rainbow:/tmp/gpust` will +
-be fetched.+
  
-For `tcsh`+options
-```sh +  -h, --help         show this help message and exit 
-# File location:  +  -a--all          Kill all md tasks 
-    # /etc/csh.cshrc (for servers with OS Ubuntu and Centos) +  -p PID, --pid PID  Process ID to kill 
-    # /etc/tmp.cshrc (for servers with Slackwareincluding orange and violet) +  -g GPU, --gpu GPU  GPU id
-alias gpust ssh 101.6.120.23 'cat /tmp/gpust/gpuinfo' +
-alias cpust ssh 101.6.120.23 'cat /tmp/cpust/cpuinfo' +
-alias gpurf ssh 101.6.120.23 '/home/zhangyk/codelib/cmd/gpust/gpust.py' +
-alias cpurf ssh 101.6.120.23 '/home/zhangyk/codelib/cmd/gpust/cpust.py' +
-alias lsmds /home/zhangyk/codelib/cmd/servst/lsmds.py +
-alias lsmd /home/zhangyk/codelib/cmd/servst/lsmd.py+
 ``` ```
  
-For `bash`+`killmd -awill kill all md tasks in the current server. 
-```sh +`killmd -p 12345` will kill the task with pid `12345`, as well as related tasks 
-# File location:  +`killmd -g 0will kill tasks runing on `GPU 0`
-    # /etc/bash.bashrc (for servers with OS Ubuntu and Centos) +
-    # /etc/bashrc (for servers with OS Slackware, including orange and violet) +
-alias gpust="ssh 101.6.120.23 'cat /tmp/gpust/gpuinfo'" +
-alias cpust="ssh 101.6.120.23 'cat /tmp/cpust/cpuinfo'" +
-alias gpurf="ssh 101.6.120.23 '/home/zhangyk/codelib/cmd/servst/gpust.py'" +
-alias cpurf="ssh 101.6.120.23 '/home/zhangyk/codelib/cmd/servst/cpust.py'" +
-alias lsmds='/home/zhangyk/codelib/cmd/servst/lsmds.py' +
-alias lsmd='/home/zhangyk/codelib/cmd/servst/lsmd.py' +
-``` +
- +
-#### 4.1.2 Inner layer +
- +
-The scripts `gpust.py` and `cpust.py` execute hourly, collecting information  +
-from each server, extracting useful data and storing it in `gpuinfo` and `cpuinfo` +
- +
-### 4.2 For lsmd and lsmds +
- +
-`lsmd` will fetch `PID` of processes with `pmemdin their names and called by  +
-the user, get the `cwd(current work directory) then find the latest `.ncfile.+
  
-`lsmds` will collect the output of `lsmd` on wanted servers and print them all.+## 4Acknowledgement
  
 +Thanks to Prof. Xue and Zhewei Qiu. I optimized their script 
 +`checkamber.py` to get `lsmd.py`.
 </markdown> </markdown>
servst.1752634788.txt.gz · Last modified: 2025/07/16 02:59 by zhangyk