Skip to main content

Client tools for accessing various client APIs of IT4I portals

Project description

it4i-portal-clients provides simple user-friendly shell interface to call IT4I API requests and display their respond.

Python 2.7 is required.

Limits are placed on the number of requests you may make to IT4I API. Rate limit can be changed without any warning at any time, but the default is 6 requests per minute. Exceeding the limit will lead to your ip address being temporarily blocked from making further requests. The block will automatically be lifted by waiting an hour.

List of available utilities

  • it4icheckaccess - Shows if IT4I account and/or related project has the access to specified queue.
  • it4idedicatedtime - Shows IT4I dedicated time.
  • it4ifree - Shows some basic information from IT4I PBS accounting.
  • it4ifsusage - Shows user filesystem usage of IT4I cluster storage systems.
  • it4imotd - Shows IT4I messages of the day into formatted text or HTML page (using TAL / Zope Page Template).

Installation / upgrading

pip install --upgrade it4i.portal.clients

Sample config file main.cfg


api_url =
it4ifreetoken = <your_token>

Username is taken from OS, therefore the script has to be run under the same user login name as you use to log into clusters.

  • System-wide config file path: /usr/local/etc/it4i-portal-clients/main.cfg
  • Local user’s config file path: ~/.it4ifree



$ it4icheckaccess -h
usage: it4icheckaccess [-h] -l LOGIN -q QUEUE [-p PROJECT]

The command shows if IT4I account and/or related project has the access to
specified queue. \ Return exit code 99 if access is not granted.

optional arguments:
  -h, --help            show this help message and exit
  -l LOGIN, --login LOGIN
                        user login
  -q QUEUE, --queue QUEUE
  -p PROJECT, --project PROJECT
                        project id, not required if querying projectless queue


$ it4icheckaccess -l XXX -q qexp
OK Access granted for projectless queue.



$ it4idedicatedtime -h
usage: it4idedicatedtime [-h] [-m {active,planned}]
                         [-c {anselm,salomon,barbora}]

The command shows IT4I dedicated time. By default all planned and active
outages of all clusters are displayed. Return exit code 99 if there is no
outage, otherwise return 0.

optional arguments:
  -h, --help            show this help message and exit
  -m {active,planned}, --message {active,planned}
                        select type of dedicated time. Planned contains also
  -c {anselm,salomon,barbora}, --cluster {anselm,salomon,barbora}
                        select cluster


$ it4idedicatedtime
Cluster    Start                End                  Last update
---------  -------------------  -------------------  -------------------
anselm     2019-03-19 08:00:00  2019-03-19 09:30:00  2019-03-08 08:24:33
salomon    2019-03-19 08:00:00  2019-03-19 09:30:00  2019-03-08 08:23:40


Help of IT4IFREE

$ it4ifree -h
usage: it4ifree [-h] [-p]

The command shows some basic information from IT4I PBS accounting. The
data is related to the current user and to all projects in which user

optional arguments:
  -h, --help     show this help message and exit
  -p, --percent  show values in percentage. Projects with unlimited resources are not displayed

Columns of "Projects I am participating in":
         PID: Project ID/account string.
   Days left: Days till the given project expires.
       Total: Core-hours allocated to the given project.
        Used: Sum of core-hours used by all project members. me: Core-hours used by the current user only.
        Free: Core-hours that haven't yet been utilized.

Columns of "Projects I am Primarily Investigating" (if present):
         PID: Project ID/account string.
       Login: Project member's login name.
        Used: Project member's used core-hours.

Example of IT4IFREE

$ it4ifree

Projects I am participating in
PID         Days left      Total    Used WCHs    Used NCHs    WCHs by me    NCHs by me     Free
----------  -----------  -------  -----------  -----------  ------------  ------------  -------
OPEN-XX-XX  323                0      5169947      5169947         50001         50001  1292555

Projects I am Primarily Investigating
PID        Login         Used WCHs    Used NCHs
---------- ----------  -----------  -----------
OPEN-XX-XX user1            376670       376670
           user2           4793277      4793277

WCH   =    Wall-clock Core Hour
NCH   =    Normalized Core Hour



$ it4ifsusage -h
usage: it4ifsusage [-h] [-c {all,anselm,salomon,barbora}]

The command shows user filesystem usage of IT4I cluster storage systems

optional arguments:
  -h, --help            show this help message and exit
  -c {all,anselm,salomon,barbora}, --cluster {all,anselm,salomon,barbora}
                        select cluster

Example of IT4IFSUSAGE

$ it4ifsusage
Cluster    File System    Space used    Space limit      Entries used  Entries limit    Last update
---------  -------------  ------------  -------------  --------------  ---------------  -------------------
anselm     /home          1.1 MiB       238.4 GiB                  22  500,000          2020-02-18 12:55:19
barbora    /home          40.0 KiB      23.8 GiB                   10  500,000          2020-02-18 12:50:12
salomon    /home          1.6 GiB       238.4 GiB                 170  500,000          2020-02-18 12:50:06
anselm     /scratch       0 Bytes       93.1 TiB                    0  10,000,000       2020-02-18 12:55:37
barbora    /scratch       0 Bytes       9.3 TiB                     0  10,000,000       2020-02-18 12:50:26
salomon    /scratch       16.0 KiB      93.1 TiB                    2  10,000,000       2020-02-18 12:50:39
salomon    /scratch/work  16.0 KiB      N/A                         2                   2020-02-18 12:50:44


Help of IT4IMOTD

$ it4imotd -h
usage: it4imotd [-h] [-t TEMPLATE] [-w WIDTH] [-c]

The command shows IT4I messages of the day into formatted text or HTML page.

optional arguments:
  -h, --help            show this help message and exit
  -t TEMPLATE, --template TEMPLATE
                        path to TAL / Zope Page Template, output will be
                        formatted into HTML page
  -w WIDTH, --width WIDTH
                        maximum line width (intended for text rendering,
                        default of 78 columns)
  -c, --cron            sleep from 10 up to 60 seconds prior to any actions
  -m {important,notice}, --message {important,notice}
                        select type of messages

Example of IT4IMOTD

$ it4imotd

                       Message of the Day (DD/MM/YYYY)
                            (YYYY-MM-DD hh:mm:ss)

More on https://...


0.8.1 (2020-03-25)


  • Add python safety to CI. [Marek Chrastina]

0.8.0 (2020-02-18)


  • Add Barbora cluster and IT4I API url. [Marek Chrastina]

0.7.8 (2019-03-22)


  • Add it4ifsusage command. [Marek Chrastina]

0.7.7 (2019-03-11)


  • Add it4icheckaccess command. [Marek Chrastina]
  • Add it4idedicatedtime command. [Marek Chrastina]

0.7.6 (2019-03-06)


  • Add options to select type of motd messages. [Marek Chrastina]

0.7.5 (2019-03-06)


  • Extract json related code to separated library. [Marek Chrastina]
  • It4ifreetoken configuration option will be mandatory just for it4ifree command. [Marek Chrastina]
  • Remove functionaless options. [Marek Chrastina]
  • Rename motd_rss to it4imotd. [Marek Chrastina]

0.7.4 (2019-03-05)


  • Add option to show values in percentage for it4ifree. [Marek Chrastina]
  • Replace argument parser library in it4ifree. [Marek Chrastina]
  • New api url in config. [Marek Chrastina]

0.7.3 (2019-03-04)


  • Update documentation. [Marek Chrastina]
  • Fix help bug. [Marek Chrastina]

0.7.2 (2019-03-01)


  • Update documentation. [Marek Chrastina]
  • Do not allow CI failure. [Marek Chrastina]
  • Fix pylint complaints. [Marek Chrastina]
  • Install required pip packages before run pylint. [Marek Chrastina]
  • Fix pylint complaints. [Marek Chrastina]
  • Fix shellcheck complaints. [Marek Chrastina]
  • Change automatic upload to manual. [Marek Chrastina]

0.7.1 (2019-02-28)


  • Exclude merge commits from changelog. [Marek Chrastina]
  • Add CI deploy. [Marek Chrastina]
  • Add CI pylint. [Marek Chrastina]
  • Add CI shellcheck. [Marek Chrastina]
  • Fix mdl complaints. [Marek Chrastina]
  • Add CI mdcheck. [Marek Chrastina]

0.6.7 (2017-09-08)


  • Core hour => core-hour. [David Hrbáč]
  • Standard CH => Normalized CH. [David Hrbáč]

0.6.6 (2017-09-08)


  • Code lint. [David Hrbáč]
  • Clean-up unused imports. [David Hrbáč]

0.6.5 (2017-09-05)


  • Core Hours to Wall-clock Core Hours; Fixes it4i-admins/it4i-portal-clients#4. [David Hrbáč]

0.6.4 (2017-09-05)


  • Core Hours to Wall-clock Core Hours; Fixes it4i-admins/it4i-portal-clients#4. [David Hrbáč]

0.6.3 (2017-08-08)


  • Beutify format. [Jan Krupa]
  • Fixed Standart -> Standard. [Jan Krupa]
  • Fixed labels. [kru0096]
  • Display normalized core hours. [kru0096]

0.6.2 (2017-07-25)


  • Use the JSON for HTML render. [David Hrbáč]

0.6.1 (2017-07-25)


  • Use the JSON. [David Hrbáč]

0.5.12 (2017-07-25)


  • Require dateutil. [David Hrbáč]

0.5.11 (2017-07-25)


  • Use 24 hours. [David Hrbáč]

0.5.10 (2017-07-25)


  • Use the JSON. [David Hrbáč]

0.5.9 (2017-07-21)


  • Release 0.5.9. [David Hrbáč]
  • Typo. [David Hrbáč]

0.5.8 (2017-07-21)


  • Move to HTTPS channel. [David Hrbáč]
  • Convert it4ifree to SCS, motd deprecated. [David Hrbáč]

0.5.7 (2017-02-06)


  • Handle long titles. [David Hrbáč]

0.5.6 (2017-02-03)


  • Corrections to README. [David Hrbáč]
  • Test commit. [Jan Krupa]

0.5.5 (2017-02-02)


  • Enable to display timerange for events. [David Hrbáč]

0.5.2 (2016-10-10)


  • Format text. [Jan Krupa]

0.5.1 (2016-10-10)


  • Pypandoc version pinned. [Filip Valder]

0.5 (2016-10-10)


  • License changed. [Jan Krupa]

0.4.9 (2016-06-24)


  • A helpful script for testing installs. [Filip Valder]

0.4.8 (2016-06-24)


  • A more advanced solution for [Filip Valder]
  • Without the dot. [Filip Valder]
  • A more advanced solution for [Filip Valder]

0.4.7 (2016-06-24)


  • Handle KeyError: ‘IT4I_FACTORY_PREBUILD’ [Filip Valder]

0.4.6 (2016-06-24)


  • Setup_requires depends on the evironment: IT4I factory versus end-user. [Filip Valder]

0.4.5 (2016-06-24)


  • Get python interpreter from the environment. [Filip Valder]

0.4.4 (2016-06-24)


  • Setup deps. [Filip Valder]

0.4.3 (2016-06-24)


  • Some ignores added. [Filip Valder]

0.4.2 (2016-06-23)


  • The other way round. [Filip Valder]
  • Exclude git-related stuff from [Filip Valder]
  • Additional requirements for setup. [Filip Valder]
  • Some gitchangelog rc file. [Filip Valder]
  • Mising comma. [Filip Valder]
  • Auto-versioning accto git tags. [Filip Valder]
  • See the hint in [Filip Valder]
  • White space. [Filip Valder]
  • Instructions re-ordered. [Filip Valder]

0.4.1 (2016-06-01)


  • Keywords added. [Filip Valder]
  • Important functional improvements & introduced README. [Filip Valder]

0.4 (2016-06-01)


  • Config module introduced. [Filip Valder]
  • Sample config file. [Filip Valder]
  • README.txt -> due to GL (the change will also appear in [Filip Valder]
  • Init & use module name ; not filename. [Filip Valder]
  • Get ready for 0.4 release. [Filip Valder]
  • Use module name ; not filename. [Filip Valder]
  • Bug fixes. [Filip Valder]
  • Support for sorting. [Filip Valder]
  • Support for published date/time. [Filip Valder]
  • CStringIO for full module usage support. [Filip Valder]

0.3.4 (2016-05-19)


  • Support for stdin and various feed sources. [Filip Valder]
  • Logging goes to separate file. [Filip Valder]
  • Write to stderr instead of stdout. [Filip Valder]
  • Egg-info for 0.3.3.post2. [Filip Valder]
  • Repository moved, project IT4I-ized… [Filip Valder]
  • 0.3.3.post1 released: setuptools is already dep of PIP, it may mess things up during install. [Filip Valder]

0.3.3 (2016-02-25)


  • Egg-info files for 0.3.3. [Filip Valder]
  • 0.3.3 released. [Filip Valder]
  • Support for verbose and width opts; short opt for cron changed. [Filip Valder]
  • Default template fixes. [Filip Valder]
  • Sync with [Filip Valder]
  • Remove dist from repository. [Filip Valder]
  • 0.3.2 stable with unicode encoding fixed. [Filip Valder]
  • Add README. [Filip Valder]

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for it4i.portal.clients, version 0.8.1
Filename, size File type Python version Upload date Hashes
Filename, size it4i.portal.clients-0.8.1.tar.gz (19.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page