OSCusage

Introduction

OSCusage is command developed at OSC for use on OSC's systems.  It allows for a user to see information on their project's usage, including different users and their jobs.

Availability

ruby owens PITZER
X X X

 

Usage

OSCusage takes the following options and parameters.

$ OSCusage --help
usage: OSCusage.py [-h] [-u USER]
                   [-s {opt,pitzer,glenn,bale,oak,oakley,owens,ruby}] [-A]
                   [-P PROJECT] [-q] [-r] [-n] [-v]
                   [start_date] [end_date]

positional arguments:
  start_date            start date (default: 2020-06-29)
  end_date              end date (default: 2020-06-30)

optional arguments:
  -h, --help            show this help message and exit
  -u USER, --user USER  username to run as. Be sure to include -P or -A.
                        (default: amarcum)
  -s {opt,pitzer,glenn,bale,oak,oakley,owens,ruby}, --system {opt,pitzer,glenn,bale,oak,oakley,owens,ruby}
  -A                    Show all
  -P PROJECT, --project PROJECT
                        project to query (default: PZS0712)
  -q                    show user data
  -r                    show raw
  -n                    show job ID
  -v                    do not summarize

Usage Examples:

    Specify start time:
        OSCusage 2018-01-24

    Specify start and end time:
        OSCusage 2018-01-24 2018-01-25

Today's Usage

Running OSCusage with no options or parameters specified will provide usage information in core-hours for the current day.

$ OSCusage       
----  ------------------------------------
      Usage Statistics for project PZS0712
Time  2020-06-29 to 2020-06-30
PI    Brian Guilfoos <guilfoos@osc.edu>
----  ------------------------------------

User          Jobs    core-hours    Status
------------  ------  ------------  --------
amarcum       0       0.0           ACTIVE
amarcumtest   0       0.0           ACTIVE
amarcumtest2  0       0.0           ACTIVE
guilfoos      0       0.0           ACTIVE
hhamblin      0       0.0           ACTIVE
kcahill       0       0.0           ACTIVE
wouma         0       0.0           ACTIVE
xwang         0       0.0           ACTIVE
--            --      --
TOTAL         0       0.0

Usage in Timeframe

If you specify a timeframe you can get utilization information specifically for jobs that completed within that period.

OSCusage 2018-01-01 2018-10-24
----  ------------------------------------
      Usage Statistics for project PZS0712
Time  2018-01-01 to 2018-10-24
PI    Brian Guilfoos <guilfoos@osc.edu>
----  ------------------------------------

User          Jobs    core-hours    Status
------------  ------  ------------  --------
amarcum       0       0.0           ACTIVE
amarcumtest   0       0.0           ACTIVE
amarcumtest2  0       0.0           ACTIVE
dheisterberg  406     12704.005     -
guilfoos      0       0.0           ACTIVE
hhamblin      0       0.0           ACTIVE
kcahill       2       15.9677       ACTIVE
wouma         0       0.0           ACTIVE
xwang         109     1227.0457     ACTIVE
--            --      --
TOTAL         517     13947.0184

Show only a single user's usage

Specify -q to show only the current user's usage. This stacks with -u to specify which user you want to see.

OSCusage -u xwang -q 2018-01-01 2018-10-24
----  -------------------------------
      Usage Statistics for user xwang
Time  2018-01-01 to 2018-10-24
----  -------------------------------

User    Jobs    core-hours    Status
------  ------  ------------  --------
xwang   1201    4520.0874     -
--      --      --
TOTAL   1201    4520.0874

Show a particular project

By default, the tool shows your default (first) project. You can use -P to specify which charge code to report on.

$ OSCusage -P PZS0200
----  ------------------------------------
      Usage Statistics for project PZS0200
Time  2020-06-29 to 2020-06-30
PI    David Hudak <dhudak@osc.edu>
----  ------------------------------------

User        Jobs    core-hours    Status
----------  ------  ------------  ----------
adraghi     0       0.0           ARCHIVED
airani      0       0.0           ARCHIVED
alingg      0       0.0           ARCHIVED
arhazzal    0       0.0           ARCHIVED
barnold     0       0.0           ARCHIVED
bart        0       0.0           ARCHIVED
blackaby    0       0.0           ARCHIVED
bridgley    0       0.0           ARCHIVED
bwelding    0       0.0           ARCHIVED
chaves      0       0.0           ARCHIVED
cspiker     0       0.0           ACTIVE
dredard     0       0.0           ARCHIVED
echong      0       0.0           ARCHIVED
emolina     0       0.0           ARCHIVED
guilfoos    0       0.0           ACTIVE
hjiang      0       0.0           RESTRICTED
icraib      0       0.0           ARCHIVED
jaffourtit  0       0.0           RESTRICTED
jberry      0       0.0           ARCHIVED
jmccance    0       0.0           RESTRICTED
jordan      0       0.0           ARCHIVED
jpu         0       0.0           ARCHIVED
jspencer    0       0.0           ARCHIVED
justinw     0       0.0           ARCHIVED
mfaerman    0       0.0           RESTRICTED
michael     0       0.0           ARCHIVED
msheng      0       0.0           ARCHIVED
mudronja    0       0.0           ARCHIVED
nehrbass    0       0.0           ARCHIVED
ngagnet     0       0.0           ARCHIVED
njustice    0       0.0           ARCHIVED
osc0507     0       0.0           ARCHIVED
osc0772     0       0.0           ARCHIVED
rahmed      0       0.0           ARCHIVED
rmarshal    0       0.0           ARCHIVED
rmonroe     0       0.0           ARCHIVED
sengupta    0       0.0           ARCHIVED
spape       0       0.0           ARCHIVED
tngo        0       0.0           ARCHIVED
watts       0       0.0           ARCHIVED
wroberts    0       0.0           ARCHIVED
--          --      --
TOTAL       0       0.0

You can show all of your charge codes / projects at once, by using -A .

Select a particular cluster

By default, all charges are shown in the output. However, you can filter to show a particular system with -s .

$ OSCusage -s ruby 2018-01-01 2018-10-24
----  ------------------------------------
      Usage Statistics for project PZS0712
Time  2018-01-01 to 2018-10-24
PI    Brian Guilfoos <guilfoos@osc.edu>
----  ------------------------------------

User          Jobs    core-hours    Status
------------  ------  ------------  --------
amarcum       0       0.0           ACTIVE
amarcumtest   0       0.0           ACTIVE
amarcumtest2  0       0.0           ACTIVE
dheisterberg  4       76.161        -
guilfoos      0       0.0           ACTIVE
hhamblin      0       0.0           ACTIVE
kcahill       0       0.0           ACTIVE
wouma         0       0.0           ACTIVE
xwang         2       36.9632       ACTIVE
--            --      --
TOTAL         6       113.1242

Changing the units reported

The report shows usage in core-hours. You can elect to get usage in raw. Please note that converting from raw to corehours may not be a consistent formula when looking at the aggregate data, since the calculation depends on the specific resources used in a job.

raw refers to usage in core-seconds instead of hours.

$ OSCusage -r 2018-01-01 2018-10-24
----  ------------------------------------
      Usage Statistics for project PZS0712
Time  2018-01-01 to 2018-10-24
PI    Brian Guilfoos <guilfoos@osc.edu>
----  ------------------------------------

User          Jobs    raw_used     Status
------------  ------  -----------  --------
amarcum       0       0.0          ACTIVE
amarcumtest   0       0.0          ACTIVE
amarcumtest2  0       0.0          ACTIVE
dheisterberg  406     45734418.76  -
guilfoos      0       0.0          ACTIVE
hhamblin      0       0.0          ACTIVE
kcahill       2       57483.72     ACTIVE
wouma         0       0.0          ACTIVE
xwang         109     4417364.52   ACTIVE
--            --      --
TOTAL         517     50209267.0

Detailed Charges Breakdown

Specify -v to get detailed information on what job's incurred what charges.

You can add the -n option to the -v option to add the job ID to the report output. OSCHelp will need the job ID to answer any questions about a particular job record.

Please contact OSC Help with questions. 

Supercomputer: 
Service: