logo

How to View Job Information Submitted to PBS 📂Programing

How to View Job Information Submitted to PBS

Overview1

This document summarizes how to check the status and detailed information of jobs submitted to PBS.

Code

qstat

The list of currently submitted jobs can be checked using the qstat command. For example, the following output appears.

(base) qstat
Job ID            Name             User              Time Use S Queue
----------------  ---------------- ----------------  -------- - -----
12345.server      test_job         user1             00:00:00 Q batch
12346.server      train_model      user1             01:12:31 R batch
12347.server      data_prep        user2             00:45:10 R batch
12348.server      sim_run_01       user2             12:34:56 R gpu_q
12349.server      jupyter_nb       user3             04:20:15 R interactive
12350.server      vasp_opt         user3             00:00:00 H batch
12351.server      vasp_opt_2       user3             00:00:00 Q batch

Here, the S column indicates the job’s status, and the possible values are:

  • Q: Queued
  • R: Running
  • E: Exiting
  • H: Held

qstat -u {USER}

To view only the jobs of a specific user, use the command qstat -u $USER.

(base) qstat -u user2
Job ID            Name             User              Time Use S Queue
----------------  ---------------- ----------------  -------- - -----
12347.server      data_prep        user2             00:45:10 R batch
12348.server      sim_run_01       user2             12:34:56 R gpu_q

qstat -f {JOB_ID}

Use the -f option to print detailed information for the job.

(base) qstat -f 12346.server
Job Id: 12346.server
    Job_Name = train_model
    Job_Owner = user1@server
    job_state = R
    queue = batch
    server = server.domain
    Checkpoint = u
    ctime = Mon May 25 10:00:00 2026
    Error_Path = server.domain:/home/user1/train_model.e12346
    Output_Path = server.domain:/home/user1/train_model.o12346
    ... (생략) ...
    Resource_List.ncpus = 8
    Resource_List.ngpus = 2
    Resource_List.walltime = 48:00:00
    stime = Wed May 27 09:54:28 2026
    ... (생략) ...

If you only want specific information, combine with the grep command. For example, to view only GPU-related information, enter the following command:

(base) qstat -f 12346.server | grep ngpus
    exec_vnode = (e007:ncpus=8:ngpus=2)
    Resource_List.ngpus = 2
    Resource_List.select = 1:ncpus=8:ngpus=2
    comment = Job run at Wed May 27 at 09:54 on (e007:ncpus=8:ngpus=2)