Jump to content
  • Announcements

    • admin

      PBS Forum Has Closed   06/12/17

      The PBS Works Support Forum is no longer active.  For PBS community-oriented questions and support, please join the discussion at http://community.pbspro.org.  Any new security advisories related to commercially-licensed products will be posted in the PBS User Area (https://secure.altair.com/UserArea/). 
jerryleo

How to grab all of hist. jobs of a specific user

Recommended Posts

Hi,


 


I'd like to grab all of the history jobs of a specific user. 


 


But the 'qstat -n -x -u' only showed the history jobs in recent days,  NOT for all of history jobs. 


 


I'm wondering how can I grab all of the history jobs information of a specific user?


 


Appreciating your kindly input


 


Jerry

Share this post


Link to post
Share on other sites

Perhaps your job_history_duration is set to only a few days?


 


Job history is limited to the server attribute called job_history_duration, which has a default length of time of 2 weeks (336:00:00). This attribute will be seer via qmgr. Below is a snippet of the job_history_* attributes from the 12.2 Admin Guide. 


 




11.15.4 Configuring Job History Management

To configure job history, you enable it and you set the job history duration. You configure PBS to manage job history using the following server attributes:

 

job_history_enable

Enables or disables job history management. Setting this attribute to True enables job history management.

Format: Boolean.

Default: False

 

job_history_duration

Specifies the length of time that PBS will keep each job’s history.

Format: duration: [[hours:]minutes:]seconds[.milliseconds]

Default: Two weeks (336:00:00)

 



 



 

Special care should be considered when using job_history. This is discussed in the 12.2 Installation Guide. I have provided this snippet below:

 




2.1.2.2 Memory Required for Job History

Enabling job history requires additional memory for the server. When the server is keeping job history, it needs 8k-12k of memory per job, instead of the 5k it needs without job history. Make sure you have enough memory: multiply the number of jobs being tracked by this much memory. For example, if you are starting 100 jobs per day, and tracking history for two weeks, you’re tracking 1400 jobs at a time. On average, this will require 14.3M of memory.

 

If the server is shut down abruptly, there is no loss of job information. However, the server will require longer to start up when keeping job history, because it must read in more information.

 



 



The best way to see all job from the user is to refer to the PBS Accounting logs. There is a pbs-report Perl script provided with the PBS distribution, which will allow you to slice-and-dice the PBS Accounting logs. In addition, there is a graphical accounting product called PBS Analytics. 

Share this post


Link to post
Share on other sites

The best way to see all job from the user is to refer to the PBS Accounting logs. There is a pbs-report Perl script provided with the PBS distribution, which will allow you to slice-and-dice the PBS Accounting logs. In addition, there is a graphical accounting product called PBS Analytics. 

 

 

Scott,

 

Thank you very much for your detailed input.

 

I failed to find the pbs-report Perl script in the installation directory,  and PBS analystics is also not available.

 

Is there a way to get the pbs-report Perl script? 

 

or

 

I have to write my own script to grab the information from $PBS_HOME/server_priv/accounting/ ?

 

And 

 

what I need are the fields  NDS, TSK  returned by qstat.   Are Resource_List.nodes and Resource_List.ncpus just the equivalent fields ?

 

Thanks

 

Jerry

Share this post


Link to post
Share on other sites

Which version of PBS Professional are you currently using? 



qstat -Bf | grep version

pbs-report has been distributed with PBS Professional for quite some time. It is currently deprecated, but can be found in $PBS_EXEC/sbin/pbs-report


 


Below is a sample from be recently installed VM system




# /opt/pbs/default/sbin/pbs-report 


PBS Pro Cluster Accounting Summary Statistics
-----------------------------------------
Report from Wed Mar 19 2014 00:00:00 to Mon Mar 24 2014 09:15:08


               # of       Total       Total            Average
Username       jobs    CPU Time   Wall Time  Efcy.   Wait Time   Muda
------------  -----  ----------  ----------  -----  ----------  -----
TOTAL            10       60000          12  5000.000           0  0.000


scott            10       60000          12  5000.000           0  0.000


Minimum          10       60000          12  5000.000           0  0.000
Maximum          10       60000          12  5000.000           0  0.000
Mean             10       60000          12  5000.000           0  0.000
Deviation         0           0           0  0.000           0  0.000
Median           10       60000          12  5000.000           0  0.000


Job Set Summary
                                                    Standard
                 Minimum     Maximum        Mean   Deviation      Median
              ----------  ----------  ----------  ----------  ----------
CPU time               0       30000        6000       12000           0
Wall time              1           2           1           0           1
Wait time              0           2           0           0           0
Suspend time           0           0           0           0           0


Note: All times displayed in seconds.


You will find usage/reference of pbs-report in PBS Professional 12.2 Admin and Reference guides. However, the Reference Guide has the pbs-report man page: Section 2.5 pbs-report. You can also get the man page with pbs-report -h or -man. 


 


WRT PBS Analytics;  this is a product which is sold separately from PBS Professional. Here is a link to PBS Analytics: http://www.pbsworks.com/Product.aspx?id=7


 


WRT NDS and TSK; yes, you mapped them correctly. 




scott@sles11-00:~> qsub -lselect=2:ncpus=2 -- /bin/sleep 100
10.sles11-00     
scott@sles11-00:~> qstat -an 10

sles11-00: 
                                                            Req'd  Req'd   Elap
Job ID          Username Queue    Jobname    SessID NDS TSK Memory Time  S Time
--------------- -------- -------- ---------- ------ --- --- ------ ----- - -----
10.sles11-00    scott    workq    STDIN       16193   2   4    --    --  R 00:00
   sles11-00/0*2+sles11-00/1*2
scott@sles11-00:~> qstat -f 10
Job Id: 10.sles11-00
    Job_Name = STDIN
    Job_Owner = scott@sles11-00.virtualworld
    resources_used.cpupercent = 0
    resources_used.cput = 00:00:00
    resources_used.mem = 596kb
    resources_used.ncpus = 4
    resources_used.vmem = 8064kb
    resources_used.walltime = 00:00:10
    job_state = R
    queue = workq
    server = sles11-00
    Checkpoint = u
    ctime = Mon Mar 24 09:25:15 2014
    Error_Path = sles11-00.virtualworld:/home/scott/STDIN.e10
    exec_host = sles11-00/0*2+sles11-00/1*2
    exec_vnode = (sles11-00-00:ncpus=2)+(sles11-00-01:ncpus=2)
    Hold_Types = n
    Join_Path = n
    Keep_Files = n
    Mail_Points = a
    mtime = Mon Mar 24 09:25:15 2014
    Output_Path = sles11-00.virtualworld:/home/scott/STDIN.o10
    Priority = 0
    qtime = Mon Mar 24 09:25:15 2014
    Rerunable = True
    Resource_List.ncpus = 4
    Resource_List.nodect = 2
    Resource_List.place = free
    Resource_List.select = 2:ncpus=2
    stime = Mon Mar 24 09:25:15 2014
    session_id = 16193
    jobdir = /home/scott
    substate = 42
    Variable_List = PBS_O_SYSTEM=Linux,PBS_O_SHELL=/bin/bash,
PBS_O_HOME=/home/scott,PBS_O_LOGNAME=scott,PBS_O_WORKDIR=/home/scott,
PBS_O_LANG=en_US.UTF-8,
PBS_O_PATH=/opt/pbs/12.2.0.133411/bin:/opt/pbs/12.1.0.131281/bin:/home
/scott/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/us
r/games:/usr/lib/mit/bin:/usr/lib/mit/sbin,PBS_O_MAIL=/var/mail/scott,
PBS_O_QUEUE=workq,PBS_O_HOST=sles11-00.virtualworld
    comment = Job run at Mon Mar 24 at 09:25 on (sles11-00-00:ncpus=2)+(sles11-
00-01:ncpus=2)
    etime = Mon Mar 24 09:25:15 2014
    run_count = 1
    Submit_arguments = -lselect=2:ncpus=2 -- /bin/sleep 100
    executable = <jsdl-hpcpa:Executable>/bin/sleep</jsdl-hpcpa:Executable>
    argument_list = <jsdl-hpcpa:Argument>100</jsdl-hpcpa:Argument>
    project = _pbs_project_default


 


PBS Accounting Logs: 




sles11-00:/var/spool/PBS_12.2.0.133411/server_priv/accounting # grep 10.sles11-00 20140324 
03/24/2014 09:25:15;Q;10.sles11-00;queue=workq
03/24/2014 09:25:15;S;10.sles11-00;user=scott group=users project=_pbs_project_default jobname=STDIN queue=workq ctime=1395667515 qtime=1395667515 etime=1395667515 start=1395667515 exec_host=sles11-00/0*2+sles11-00/1*2 exec_vnode=(sles11-00-00:ncpus=2)+(sles11-00-01:ncpus=2) Resource_List.ncpus=4 Resource_List.nodect=2 Resource_List.place=free Resource_List.select=2:ncpus=2 resource_assigned.ncpus=4 
03/24/2014 09:26:55;E;10.sles11-00;user=scott group=users project=_pbs_project_default jobname=STDIN queue=workq ctime=1395667515 qtime=1395667515 etime=1395667515 start=1395667515 exec_host=sles11-00/0*2+sles11-00/1*2 exec_vnode=(sles11-00-00:ncpus=2)+(sles11-00-01:ncpus=2) Resource_List.ncpus=4 Resource_List.nodect=2 Resource_List.place=free Resource_List.select=2:ncpus=2 session=16193 end=1395667615 Exit_status=0 resources_used.cpupercent=0 resources_used.cput=08:20:00 resources_used.mem=596kb resources_used.ncpus=4 resources_used.vmem=8064kb resources_used.walltime=00:01:40 run_count=1


Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×