参考:

Oracle Grid Engine

qsub命令

SGE - qsub使用范例

SGE作业基本用法

qsub是最为稳定的底层任务投递系统,就是把一个脚本投递到集群的计算节点上运行。

注意,只有登录节点才有资格投递任务,计算节点没有权限投递任务,只能执行,所以千万不要在投递的脚本内嵌套投递,会报错的。

下面是我最为常用的投递命令:

qsub -cwd -l vf=5g -P 任务单元 -q 队列名

先逐条解释:

-cwd: 就是 current working directory,从当前的目录开始执行作业,也就是log文件会写到当前目录;如果不加cwd的话,就会默认输出到用户的 home 目录。如果你想指定输出目录的话,就可以使用wd命令,log会输出到你指定的目录。

-l:resource=value, 表明作业运行所需要的资源。可以看到我们后面指定了预估内存 vf=5g,一般不用指定 CPU 数。注意,实际这个没什么卵用,很少有集群能严格限制用户的内存使用,vf 只会影响你投递的效率,有人就会钻空子,尽量把内存往低了投,尽快排上。这一部分其实就是个道德约束。

-P:大型组织里会分团队,分项目,不同的项目需要制定项目名,主要是为了后期方便统计计算资源的消耗,算钱,其实这个命令没卵用。

-q:指定队列名,这个就非常重要了,队列就是计算机的队列,一个队列只有一些特定的计算节点,你投了哪个节点,你就只能用该节点指定的计算资源。

待续~

qsub -help
OGS/GE 2011.11p1
usage: qsub [options]
[-a date_time] request a start time
[-ac context_list] add context variable(s)
[-ar ar_id] bind job to advance reservation
[-A account_string] account string in accounting record
[-b y[es]|n[o]] handle command as binary
[-binding [env|pe|set] exp|lin|str] binds job to processor cores
[-c ckpt_selector] define type of checkpointing for job
[-ckpt ckpt-name] request checkpoint method
[-clear] skip previous definitions for job
[-cwd] use current working directory
[-C directive_prefix] define command prefix for job script
[-dc simple_context_list] delete context variable(s)
[-dl date_time] request a deadline initiation time
[-e path_list] specify standard error stream path(s)
[-h] place user hold on job
[-hard] consider following requests "hard"
[-help] print this help
[-hold_jid job_identifier_list] define jobnet interdependencies
[-hold_jid_ad job_identifier_list] define jobnet array interdependencies
[-i file_list] specify standard input stream file(s)
[-j y[es]|n[o]] merge stdout and stderr stream of job
[-js job_share] share tree or functional job share
[-jsv jsv_url] job submission verification script to be used
[-l resource_list] request the given resources
[-m mail_options] define mail notification events
[-masterq wc_queue_list] bind master task to queue(s)
[-notify] notify job before killing/suspending it
[-now y[es]|n[o]] start job immediately or not at all
[-M mail_list] notify these e-mail addresses
[-N name] specify job name
[-o path_list] specify standard output stream path(s)
[-P project_name] set job's project
[-p priority] define job's relative priority
[-pe pe-name slot_range] request slot range for parallel jobs
[-q wc_queue_list] bind job to queue(s)
[-R y[es]|n[o]] reservation desired
[-r y[es]|n[o]] define job as (not) restartable
[-sc context_list] set job context (replaces old context)
[-shell y[es]|n[o]] start command with or without wrapping <loginshell> -c
[-soft] consider following requests as soft
[-sync y[es]|n[o]] wait for job to end and return exit code
[-S path_list] command interpreter to be used
[-t task_id_range] create a job-array with these tasks
[-tc max_running_tasks] throttle the number of concurrent tasks (experimental)
[-terse] tersed output, print only the job-id
[-v variable_list] export these environment variables
[-verify] do not submit just verify
[-V] export all environment variables
[-w e|w|n|v|p] verify mode (error|warning|none|just verify|poke) for jobs
[-wd working_directory] use working_directory
[-@ file] read commandline input from file
[{command|-} [command_args]] account_string account_name
complex_list complex[,complex,...]
context_list variable[=value][,variable[=value],...]
ckpt_selector `n' `s' `m' `x' <interval>
date_time [[CC]YY]MMDDhhmm[.SS]
job_identifier_list {job_id|job_name|reg_exp}[,{job_id|job_name|reg_exp},...]
jsv_url [script:][username@]path
mail_address username[@host]
mail_list mail_address[,mail_address,...]
mail_options `e' `b' `a' `n' `s'
working_directory path
path_list [host:]path[,[host:]path,...]
file_list [host:]file[,[host:]file,...]
priority -1023 - 1024
resource_list resource[=value][,resource[=value],...]
simple_context_list variable[,variable,...]
slot_range [n[-m]|[-]m] - n,m > 0
task_id_range task_id['-'task_id[':'step]]
variable_list variable[=value][,variable[=value],...]
wc_cqueue wildcard expression matching a cluster queue
wc_host wildcard expression matching a host
wc_hostgroup wildcard expression matching a hostgroup
wc_qinstance wc_cqueue@wc_host
wc_qdomain wc_cqueue@wc_hostgroup
wc_queue wc_cqueue|wc_qdomain|wc_qinstance
wc_queue_list wc_queue[,wc_queue,...]
ar_id advance reservation id
max_running_tasks maximum number of simultaneously running tasks
exp explicit:<socket>,<core>[:...]
lin linear:<amount>[:<socket>,<core>]
str striding:<amount>:<stepsize>[:<socket>,<core>]

SGE:qsub/qstat/qdel/qhost 任务投递和监控的更多相关文章

  1. (原创)PBS | SGE 智能任务投递系统monitor | python实现

    之前看到过高手写的一个monitor,用python面向对象实现的,依赖几个核心的python包,drmaa,zodb,理论上来说解决了所有的任务投递问题. 但是在复杂的集群环境下还是会经常出问题,这 ...

  2. SGE基本操作

    SGE怎样工作: 1. 接受用户投放的任务 2. 在任务运行以前,将任务放到一个存储区域 3. 发送任务到一个执行设备,并监控任务的运行 4. 运行结束写回结果并记录运行日志 常用的SGE命令: 1. ...

  3. sge的简单的应用

    1.sge提交脚本qsub 1.qsub work.sh work.sh 不能以数字开头 2.qsub work.sh  默认工作路径为/home/username 3.qsub -cwd work. ...

  4. sge学习 (转)

    转自http://biancheng.dnbcw.info/linux/417992.html 命令: qsub   -  submit a batch job to Grid Engine. qsh ...

  5. 集群SGE作业调度系统

    目录 0. 一些基本概念 1. 常见的几种资源管理和调度系统 2. SGE常见指令 2.1 提交任务 2.2 查看任务 2.3 删除任务 2.4 挂起/恢复任务 2.5 更改任务属性 0. 一些基本概 ...

  6. 16、SGE作业调度系统的简介

    转载:http://www.zilhua.com/2222.html http://gridscheduler.sourceforge.net/htmlman/ SGE作业调度系统的简介 一.常见的几 ...

  7. ActiveMQ笔记(6):消息延时投递

    在开发业务系统时,某些业务场景需要消息定时发送或延时发送(类似:飞信的短信定时发送需求),这时候就需要用到activemq的消息延时投递,详细的文档可参考官网说明,本文只介绍二种常用的用法: 注:本文 ...

  8. IM消息送达保证机制实现(二):保证离线消息的可靠投递

    1.前言 本文的上篇<IM消息送达保证机制实现(一):保证在线实时消息的可靠投递>中,我们讨论了在线实时消息的投递可以通过应用层的确认.发送方的超时重传.接收方的去重等手段来保证业务层面消 ...

  9. Sun Grid Engine (SGE)大型集群作业调度系统

    Oracle Grid Engine 作业调度系统的简介(目前为止我用过PBS和SGE) SGE作业调度系统学习笔记 SGE作业调度 USE of Sun Grid Engine(SGE) 待续~

随机推荐

  1. 20154312《网络对抗》Exp2 后门原理与实践

    常见问题快速链接 Handler failed to bind to xxx.xxx.xx.xxx:xxxx 使用Webcam_snap命令提示1411错误,无法正常拍照 常用后门工具实践 Windo ...

  2. sql性能优化(摘自网络)

    索引,索引!!!为经常查询的字段建索引!! 但也不能过多地建索引.insert和delete等改变表记录的操作会导致索引重排,增加数据库负担. 优化目标 1.减少 IO 次数 IO永远是数据库最容易瓶 ...

  3. redis 哨兵机制环境搭建

    Redis哨兵机制,一主二从 注:Redis哨兵切换,建议一主多从 一.一主二从 教程步骤:https://www.cnblogs.com/zwcry/p/9046207.html 二.哨兵配置(se ...

  4. python学习读取配置文件

    配置文件作为一种可读性很好的格式,非常适用于存储程序中的配置数据. 在每个配置文件中,配置数据会被分组(比如“config”和 “cmd”). 每个分组在其中指定对应的各个变量值.如下: # 定义co ...

  5. API和正则表达式

    第一章 String & StringBuilderString类用类final修饰,不能被继承,String字符串被创建后永远无法被改变,但字符串引用可以重新赋值,改变引用的指向java字符 ...

  6. Charles手机端抓包--证书

    应用测试: Charles通过无线对手机进行抓包 测试系统: ubuntu 16.04 LTS 测试手机: IOS 10.3(14E277) Charles版本: Charles 4.1.4 手机证书 ...

  7. 20145220韩旭飞《网络对抗》Exp6 信息搜集与漏洞扫描

    20145220韩旭飞<网络对抗>Exp6 信息搜集与漏洞扫描 信息搜集 whois查询 以百度的网址为例,使用whois查询域名注册信息: 从上图中可以得到3R注册信息,包括注册人的名字 ...

  8. 20165211 2017-2018-2 《Java程序设计》第7周学习总结

    20165211 2017-2018-2 <Java程序设计>第7周学习总结 教材学习内容总结 本周,我学习了书本上第十一章的内容,以下是我整理的主要知识. 第十一章 JDBC和MySQL ...

  9. python判断结构总结

    1.判断结构是允许程序针对不同情况执行不同指令序列的控制结构. 2.判断在Python中用if语句实现.简单的判断是用一个简单的if来实现的.两路判断通常使用if-else.多路判断用if-elif- ...

  10. git分支 远程协作

    创建文件mkdir ### cd ### git init 初始化 git config global user.name “username” git config global user.emia ...