用户如何查看已经提交运行作业的cpu,内存等情况

用户如何查看已提交任务的运行情况?

答:正常情况下,是不允许用户登录到计算节点的,除非使用上述提到的交互式登录。

但是当任务被qsub提交后,用户可以登录到运行自己任务的那些计算节点上,以观察任务运行情况。如下例:

[liuxj@shenma163 Desktop]$ qstat -u liuxj       /*查看已经提交的任务的JobID

34760.master               shenma           liuxj           04:26:17 R parallel

[liuxj@shenma163 Desktop]$ qstat -n  34760  /*查看34760被提交到哪些计算节点上

master:
Req’d Req’d Elap
Job ID Username Queue Jobname SessID NDS TSK Memory Time S Time

34760.master liuxj parallel shenma 3709 4 64 — 2000: R 00:19

shenma110/15+shenma110/14+shenma110/13+shenma110/12+shenma110/11+shenma110/10+shenma110/9+shenma110/8

+shenma110/7+shenma110/6+shenma110/5+shenma110/4+shenma110/3+shenma110/2+shenma110/1+shenma110/0

+shenma109/15+shenma109/14+shenma109/13+shenma109/12+shenma109/11+shenma109/10+shenma109/9+shenma109/8

+shenma109/7+shenma109/6+shenma109/5+shenma109/4+shenma109/3+shenma109/2+shenma109/1+shenma109/0

[liuxj@shenma163 Desktop]$ ssh shenma110         /*登录到运行作业的主节点shenma111

Warning: Permanently added ‘shenma111,10.10.1.111′ (RSA) to the list of known hosts.
Last login: Wed Dec 18 09:33:41 2013 from 10.10.1.162
[liuxj@shenma110 ~]$ cd /var/spool/torque/spool/   /*到作业运行过程中输出所在目录
[liuxj@shenma110] ls                    /*查看该文件,以检查任务是不是正常在运行
34760.master.OU

[liuxj@shenma110] tail -f 34760.mastre.OU /*时时查看程序输出情况

[liuxj@shenma110]top /*查看程序进程CPU,内存占有率,及cpu进程个数

 

注:更多查看进程运行情况工具命令,请查阅top,ps的相关手册