2024年4月19日 星期五

OpenPBS 查詢歷史紀錄

相關指令
qstat -x -u user

相關訊息 
qstat: PBS is not configured to maintain job history

設定指令
qmgr -c "s s job_history_enable=1"    #開啟
qmgr -c "s s job_history_enable=0"    #關閉  set server job_history_enable=0

2024年4月12日 星期五

Debian 12 安裝 OpenPBS(version = 23.06.06)

運算管理節點安裝必要套件
apt install expat libedit2 postgresql python3 postgresql-contrib sendmail-bin tcl tk libical3 postgresql-server-dev-all libhwloc-dev

編輯環境設定

sudo apt install -y gcc make libtool libhwloc-dev libx11-dev \
      libxt-dev libedit-dev libical-dev ncurses-dev perl \
      postgresql-server-dev-all postgresql-contrib python3-dev tcl-dev tk-dev swig \
      libexpat-dev libssl-dev libxext-dev libxft-dev autoconf \
      automake g++ libcjson-dev

sudo apt install -y git
git clone https://github.com/openpbs/openpbs.git
cd openpbs
sudo mkdir -p /opt/pbs

./autogen.sh
./configure -prefix=/opt/pbs
make

安裝設定
sudo make install
sudo /opt/pbs/libexec/pbs_postinstall

sudo chmod 4755 /opt/pbs/sbin/pbs_iff /opt/pbs/sbin/pbs_rcp

設定角色
編輯 /etc/pbs.conf
systemctl enable pbs
systemctl restart pbs

相關設定檔及指令
Qmgr: set server flatuid = True
Qmgr: set server query_other_jobs = True

pbsnodes -a
qmgr -c "print server"
qmgr -c "create node work01"
pbs_hostn -v servernode

echo 'sleep 60' | qsub

/etc/hosts
/etc/pbs.conf
/opt/pbs/etc/pbs.sh

參考
https://github.com/openpbs/openpbs/blob/master/INSTALL

2024年4月2日 星期二

R 套件 Pgirmess 安裝

Debian 11 相關套件
apt install  libudunits2-dev libgdal-dev libproj-dev 

pgirmess R 安裝指令如下
install.packages('sf', repos='https://cran.r-project.org/r')
install.packages('spdep', repos='https://cran.r-project.org/r')
install.packages('pgirmess', repos='https://cran.r-project.org/r')

注意 libproj-dev libgdal-dev 版本

2024年3月6日 星期三

XRDP管理筆記

查詢xrdp 相關process
#!/bin/bash
for i in $(ps --no-header -o pid -C xrdp-sesman);do
ps -o ppid,pid,uid,user:16,cmd --ppid ${i}
done

相關指令
xrdp-sesadmin -u=root -s=localhost -c=list

相關檔案
/etc/xrdp/sesman.ini    #設定 ListenPort,ReconnectScript,MaxSessions
/etc/xrdp/xrdp.ini