========================================================================
README for Python PQoS Library Wrapper examples

April 2019
========================================================================


Contents
========

- Overview
- List of examples
- Legal Disclaimer


Overview
========

This folder contains examples how to use Python Wrapper for PQoS Library.
Examples are simple scripts presenting usage of allocation, capabilities,
CPU information, L2/L3 cache allocation and memory bandwidth allocation
as well as cache and memory bandwidth monitoring.

To run the examples it is needed to install virtual environment first (if not
created):

        make env

It will create Python 3 virtual environment with PQoS Library Python wrapper
in env/.

Then the example may be run by executing the script using installed Python
environment (please note they require root privileges, so it might be needed
to run them as root or with sudo). To display help message, -h flag can
be used:

        ./env/bin/python <PATH_TO_SCRIPT> -h

or

        source env/bin/activate
        python <PATH_TO_SCRIPT> -h

For example:

        ./env/bin/python monitoring.py -h

or

        source env/bin/activate
        python monitoring.py -h


List of examples
================

1) association.py
   The aim of this script is to configure/show association of class of service
   (COS) to cores.

2) l2ca.py
   The example of setting bit masks for L2 CAT classes of service and displaying
   associated bit masks.

3) l3ca.py
   It presents how to set bit masks for L3 CAT classes of service and display
   configured bit masks.

4) mba.py
   This script allows to set MBA rate values for classes of service and display
   their configuration.

5) monitoring.py
   The example of monitoring cache and memory bandwidth per core or per process.

6) reset_allocation.py
   It allows to reset all COSes to system default bit masks (CAT) and rate
   values (MBA).


Legal Disclaimer
================

THIS SOFTWARE IS PROVIDED BY INTEL"AS IS". NO LICENSE, EXPRESS OR
IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS
ARE GRANTED THROUGH USE. EXCEPT AS PROVIDED IN INTEL'S TERMS AND
CONDITIONS OF SALE, INTEL ASSUMES NO LIABILITY WHATSOEVER AND INTEL
DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR
USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO
FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT
OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
