Getting Started on sbank

Examples will be based on the following commands:

Hints:

  • Field option -r
    • To specify which machine to get information for (e.g., on Theta),  type -r Theta
    • For all machines use -r all

  • Field option -f "[+] <FIELD>[:<WIDTH>] ... <FIELD>[:<WIDTH>]"
    • Pick the fields you want to display by using -f "field1 ... fieldn"
    • Add fields to display by using -f "+ field1 ... fieldn"
    • To see the available fields for a particular command, use -f "?"
    • You can shorten field names when entering them with the -f options
      • For instance transaction_ids_list in the sbank-list-jobs example below was added as follows: -f "+ t"
  • For all datetime filter options (-E, -S, --at, --created, --eligible, --queued, --last-updated), you can do the following:
    • Use date ranges "20120101...20120301"
    • Use compare functions ">= 20120101" or "ge 2012-01-01"
    • Datetime fields are defaulted to display only date, 10 characters long. If you wish to display complete date and time, then you can change the width to 19 characters (see man pages on -f and -w options)
  • For the sbank-list-jobs and sbank-list-transactions, you can show a lot of job data information by using the -f option
  • USE THE MAN PAGES

sbank-list-allocations

top

  • List all active allocations for all resources for project Projectx
    > sbank-list-allocations -p projectx -rall
     Id         Start       End         Resource   Project          Jobs        Charged          Available Balance 
     ---------  ----------  ----------  ---------  ---------------  ----------  ---------------  ----------------- 
     11         2011-08-30  2020-01-01  veas       Projectx              2,843      1,631,658.9       -1,631,658.9 
     16         2011-08-30  2020-01-01  vesta      Projectx             13,297     16,568,697.8      -16,568,697.8 
     279        2011-08-30  2020-01-01  cetus      Projectx              6,351     12,330,054.0      -12,330,054.0 
     2106       2016-01-04  2017-01-01  cooley     Projectx              1,139          6,032.8           43,967.2 
     2146       2016-01-14  2017-01-10  vesta      Projectx                983      1,084,770.3       25,483,927.5 
     2147       2016-01-15  2017-01-10  mira       Projectx                126      5,245,492.3        4,754,507.7 
    
    Totals:
      Rows: 6
      Cetus:
        Available Balance: -12,330,054.0 core hours
        Charged          : 12,330,054.0 core hours
        Jobs             : 6,351 
      Cooley:
        Available Balance: 43,967.2 node hours
        Charged          : 6,032.8 node hours
        Jobs             : 1,139 
      Mira:
        Available Balance: 4,754,507.7 core hours
        Charged          : 5,245,492.3 core hours
        Jobs             : 126 
      Veas:
        Available Balance: -1,631,658.9 core hours
        Charged          : 1,631,658.9 core hours
        Jobs             : 2,843 
      Vesta:
        Available Balance: 8,915,229.7 core hours
        Charged          : 17,653,468.1 core hours
        Jobs             : 14,280 
        
  • List only the created timestamp field for all allocations that were created before 01-01-2015 for Projectx accross all resources
    > sbank-list-allocations  --created "<20150101" -r all -p projectx "-f created"
     Created    
     ---------- 
     2016-01-04 
     2016-01-14 
     2016-01-15 
    
    Totals:
      Rows: 3
    Date  filters (UTC): created < "2015-01-01 00:00:00",  
        
  • List all active allocations for all resources for project Projectx and add the field Created to the display list
    shrubbery~ > sbank-list-allocations -rall  -p projectx -f "+created"
     Id         Start       End         Resource   Project          Jobs        Charged          Available Balance  Created    
     ---------  ----------  ----------  ---------  ---------------  ----------  ---------------  -----------------  ---------- 
     11         2011-08-30  2020-01-01  veas       Projectx              2,843      1,631,658.9       -1,631,658.9  2012-02-17 
     16         2011-08-30  2020-01-01  vesta      Projectx             13,297     16,568,697.8      -16,568,697.8  2012-02-22 
     279        2011-08-30  2020-01-01  cetus      Projectx              6,361     12,332,699.9      -12,332,699.9  2013-02-22 
     2106       2016-01-04  2017-01-01  cooley     Projectx              1,150          6,080.9           43,919.1  2016-01-04 
     2146       2016-01-14  2017-01-10  vesta      Projectx              1,056      1,143,981.8       25,424,716.0  2016-01-14 
     2147       2016-01-15  2017-01-10  mira       Projectx                133      8,656,211.1        1,343,788.9  2016-01-15 
    
    Totals:
      Rows: 6
      Cetus:
        Available Balance: -12,332,699.9 core hours
        Charged          : 12,332,699.9 core hours
        Jobs             : 6,361 
      Cooley:
        Available Balance: 43,919.1 node hours
        Charged          : 6,080.9 node hours
        Jobs             : 1,150 
      Mira:
        Available Balance: 1,343,788.9 core hours
        Charged          : 8,656,211.1 core hours
        Jobs             : 133 
      Veas:
        Available Balance: -1,631,658.9 core hours
        Charged          : 1,631,658.9 core hours
        Jobs             : 2,843 
      Vesta:
        Available Balance: 8,856,018.2 core hours
        Charged          : 17,712,679.6 core hours
        Jobs             : 14,353 
        
  • List all available fields for the sbank-list-allocations command
    > sbank-list-allocations  -f "?"
    available fields:
     id
     start_timestamp
     end_timestamp
     resource
     project_name
     jobs_count
     charged_sum
     available_balance_sum
     created_timestamp
     award_category
     award_type_name
     admin_name
     cbank_ref
     comment
        

sbank-list-users

top

  • List all charges for userx on mira on project Projectx
    > sbank-list-users -p projectx -r mira -u userx
     User             Jobs        Charged         
     ---------------  ----------  --------------- 
     userx                 1,814          9,884.5
    
    Totals:
      Rows: 1
      Resources: mira
      Charged: 9,884.5 core hours
      Jobs   : 1,814 
        
  • List charges for all users in Projectx on cooley.
    • This works for projet leads, since they can see everything in their own projects.
    > sbank-list-users -p projectx -r mira
     User             Jobs        Charged         
     ---------------  ----------  --------------- 
     user1                   120          4,243.7 
     user2                     0              0.0 
     user3                     0              0.0 
     user4                   181          1,195.5 
     user5                     0              0.0 
     user6                 2,560         10,868.7 
     user7                     0              0.0 
     user8                     0              0.0 
     user9                     0              0.0 
     user10                    7              3.5 
     user11                    0              0.0 
     user12                   74             13.5 
     user13                    0              0.0 
     user14                    0              0.0 
     user15                    0              0.0 
     user16                    9             11.8 
     user17                    0              0.0 
     user18                   30             30.1 
     user19                    0              0.0 
     user20                    0              0.0 
     user21                    0              0.0 
     user22                    0              0.0 
     user23                    0              0.0 
     user24                    9              0.7 
     user25                  353          2,548.1 
     user26                  305          7,670.1 
     user27                  147          2,791.6 
    
    Totals:
      Rows: 27
      Resources: mira
      Charged: 29,377.2 core hours
      Jobs   : 3,795 
        

sbank-list-jobs

top

  • list jobs for user "userx" for jobs that started in the range 2016-02-15<= started < 2016-02-29 and add the transactions related to the job
    • Note:
      • The job with the refund
      • transaction_ids_list field can be shorten all the way to "t" in the -f "+ t"
    shrubbery~ > sbank-list-jobs -u userx -f "+ t" -S "2016-02-15...2016-02-29"
     Id         Jobid      Resource   Project          Allocation  User       Duration   Charged          Transaction Ids 
     ---------  ---------  ---------  ---------------  ----------  ---------  ---------  ---------------  --------------- 
     1013857    730417     mira       Projectx         1740        userx      1:53:07           61,776.8  CHARGE-1011230  
     1013860    730558     mira       Projectx         1740        userx      1:53:07           61,776.8  CHARGE-1011233  
     1014168    730668     mira       Projectx         1740        userx      1:53:25           61,940.6  CHARGE-1011541  
     1014394    730779     mira       Projectx         1740        userx      1:53:09           61,795.0  CHARGE-1011767  
     1015662    731151     mira       Projectx         1740        userx      5:09:58          169,283.1  CHARGE-1013045  
     1015951    732097     mira       Projectx         1740        userx      5:09:56          169,264.9  CHARGE-1013334  
     1016349    732354     mira       Projectx         1740        userx      5:09:44          169,155.7  CHARGE-1013732  
     1017204    732715     mira       Projectx         1740        userx      4:43:22          154,756.0  CHARGE-1014587  
     1017377    733445     mira       Projectx         1740        userx      4:39:24          152,589.7  CHARGE-1014760  
     1017483    733591     mira       Projectx         1740        userx      2:54:06           95,081.8  CHARGE-1014866  
     1018451    734212     mira       Projectx         1740        userx      5:10:19          169,474.3  CHARGE-1015832  
     1019463    734442     mira       Projectx         1740        userx      4:56:17          161,810.2  CHARGE-1016844  
     1019672    734750     mira       Projectx         1740        userx      3:16:29          107,306.1  CHARGE-1017053  
     1019897    734869     mira       Projectx         1740        userx      5:09:27          169,001.0  CHARGE-1017278  
     1020105    735039     mira       Projectx         1740        userx      5:11:02          169,865.7  CHARGE-1017486  
     1022202    735235     mira       Projectx         1740        userx      5:09:18          168,919.0  CHARGE-1019588  
     1023111    736520     mira       Projectx         1740        userx      0:29:09           15,919.8  CHARGE-1020498  
     1026601    739320     mira       Projectx         1740        userx      13:35:15               0.1  CHARGE-1023990 REFUND-1027516 
     1026931    739738     mira       Projectx         1740        userx      0:26:42           14,581.8  CHARGE-1024320  
    
    Totals:
      Rows: 19
      Mira:
        Charged      : 2,134,298.3 core hours
        Duration     : 78:43:16 
    Date  filters (UTC): "2016-02-15 00:00:00" <= start < "2016-02-29 00:00:00",  
        
  • List the nodes used, runtime and start timestamp for Cooley job 744160
    • Note to display the date and time we increased the the number of characters of start_timestamp to 19
    catapult~ > sbank l j -r mira -j 50576 -f "jobid nodes_used runtime start_timestamp:19"
     Jobid      Nodes Used  Runtime    Start               
     ---------  ----------  ---------  ------------------- 
     50576      512         1:00:49    2013-01-16 21:49:30 
    
    Totals:
      Rows: 1
        

sbank-list-transactiosns

top

  • List of transactions that where at or after 2016-02-29 for Projectx add fields: job_duration, nodes_used and hosts
    • ## Note the following:
      • job_duration, nodes_used and hosts are shorten, but they are still uniquely identified
      • host has the left justified width of 20, specified as "h:-20"
    catapult~ > sbank-list-transactions -p projectx --at "ge 2016-02-29" -f "+ job_d nodes_u h:-20" -r mira
     Id         Resource   Project          Allocation  At          User             Transaction Type  Amount           Jobid      Job Duration  Nodes Used  Hosts                
     ---------  ---------  ---------------  ----------  ----------  ---------------  ----------------  ---------------  ---------  ------------  ----------  -------------------- 
     1025426    mira       Projectx         2147        2016-02-29  userx            CHARGE                   48,005.1  740587     1:27:54       2048        MIR-00800-33BF1-2048 
     1028046    mira       Projectx         2147        2016-03-01  userx            CHARGE                  147,647.1  742090     4:30:21       2048        MIR-40000-733F1-2048 
     1028755    mira       Projectx         2147        2016-03-02  userx            CHARGE                1,576,068.0  742126     6:00:44       16384       MIR-04000-77FF1-1638 
     1030130    mira       Projectx         2147        2016-03-03  userx            CHARGE                  107,761.2  743843     3:17:19       2048        MIR-40800-73BF1-2048 
     1030359    mira       Projectx         2147        2016-03-03  userx            CHARGE                1,575,922.3  743849     6:00:42       16384       MIR-08000-7BFF1-1638 
     1030363    mira       Projectx         2147        2016-03-03  userx            CHARGE                  148,921.5  743850     4:32:41       2048        MIR-00000-333F1-2048 
     1030966    mira       Projectx         2147        2016-03-03  userx            CHARGE                      905.7  745291     0:06:38       512         MIR-00080-333B1-512  
     1031548    mira       Projectx         2147        2016-03-03  userx            CHARGE                      512.0  745915     0:03:45       512         MIR-44C00-77F31-512  
     1031551    mira       Projectx         2147        2016-03-03  userx            CHARGE                      628.1  745918     0:04:36       512         MIR-448C0-77BF1-512  
     1032097    mira       Projectx         2147        2016-03-04  userx            CHARGE                  108,489.4  745312     3:18:39       2048        MIR-44000-773F1-2048 
     1032445    mira       Projectx         2147        2016-03-04  userx            CHARGE                  395,218.5  745316     3:00:55       8192        MIR-48000-7BFF1-8192 
     1032896    mira       Projectx         2147        2016-03-04  userx            CHARGE                    1,763.6  747100     0:12:55       512         MIR-40C00-73F31-512  
     1052999    mira       Projectx         2147        2016-03-17  usery            CHARGE                      316.3  766104     0:02:19       512         MIR-48C40-7BF71-512  
    
    Totals:
      Rows: 13
      Mira:
        Charges Amount: 4,112,158.7 core hours
        Job Duration  : 32:39:28 
    Date  filters (UTC) : at >= "2016-02-29 00:00:00",  
        

top