Repository navigation
Scripting Examples
Türkçe: Scripting-Examples-TR
Recipes for non-interactive use. Two rules run through all of them:
-
Never put a secret on a command line. Command lines are visible to other
local processes and are recorded in shell history. Prefer key-based
authentication; when a password is unavoidable, feed it through
--password-stdinfrom a source that is not echoed. - Branch on the exit code, not on message text. See CLI Guide.
Before any of this works, "Allow external CLI access to remote commands" must be enabled in Settings — see CLI Guide.
hpc-client-gui doctor environment || exit $?
hpc-client-gui --profile mycluster doctor connection || exit $?
hpc-client-gui --profile mycluster --format json files ls /scratch/$USER/results
hpc-client-gui --profile mycluster files download \
/scratch/$USER/results/out.csv ./out.csv --verify
--verify compares SHA-256 after the transfer.
hpc-client-gui --profile mycluster files upload \
./inputs /scratch/$USER/inputs --recursive --if-exists resume
hpc-client-gui --profile mycluster jobs submit /scratch/$USER/job.sh --yes
Without --yes the command refuses and exits 2.
job_id=$1
while hpc-client-gui --profile mycluster --format json jobs status "$job_id" \
| grep -q '"RUNNING"\|"PENDING"'; do
sleep 60
done
Adjust the state test to your site's scontrol output; Slurm output varies
with site customization.
hpc-client-gui --profile mycluster jobs cancel "$job_id" --yes
hpc-client-gui --profile mycluster files rm /scratch/$USER/tmp --recursive --yes
hpc-client-gui --profile mycluster sh -- sinfo -o "%P %a %l %D %t"
The -- separator is required so the remote command's own options are not
consumed by this interface.
When key-based authentication is not possible, read the password from a process that never writes it to disk or to a command line:
# The password is typed into the pipe, not stored anywhere.
read -rs pw && printf '%s' "$pw" \
| hpc-client-gui --profile mycluster --password-stdin --no-saved-password files ls /home
unset pw
--no-saved-password ignores a profile's stored protected secret and requires
--password-stdin, which is useful in CI-like contexts where you want the
stored secret deliberately bypassed.
Do not hardcode a password in a script, an environment variable, or a repository. See Security Model.
hpc-client-gui --profile mycluster --strict-host-key jobs list
--strict-host-key rejects unknown host keys instead of prompting, which is
the right default for unattended automation.
HPC Client GUI — generated from docs/wiki/ in the main repository. Do not edit pages on github.com; edit the source and re-run the sync script. — Licensing · Support
Entry
Install
Use
- Connecting and Profiles
- Remote File Manager
- File Transfers
- Slurm Jobs
- Job Outputs
- Script Editor
- Terminal and Remote Commands
- X11 Forwarding
- Settings Reference
- Interface Language and i18n
Automation
Operations
Slurm
Project
- Architecture
- Building from Source
- Release Process
- Testing and CI
- Contributing
- Licensing and Commercial Use
- Support and Donations
- Release History
- Glossary
Giriş
Kurulum
Kullanım
- Bağlantı ve Profiller
- Uzak Dosya Yöneticisi
- Dosya Aktarımları
- Slurm İşleri
- İş Çıktıları
- Betik Düzenleyici
- Terminal ve Uzak Komutlar
- X11 Yönlendirme
- Ayarlar Referansı
- Arayüz Dili ve i18n
Otomasyon
İşletim
- Günlükler ve Tanılama
- Çökme Raporları ve Günlük Gönderme
- Sorun Giderme
- Güvenlik Modeli
- Veri ve Gizlilik
Slurm
Proje