Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Coming soon.

Step 1: Current location of the cost script: This section will guide you through the process of generating a savings and migration report using the provided cost calculation script.

Prerequisites:

  • pandas

  • xlsxwriter

Running the Scanning Script:

Step 1: Check whether you have the prerequisite installed. if not:

Code Block
pip3 install pandas xlsxwriter

Step 2: Navigate to the script location:

Code Block
cd /xcompute/slurm/aws/cost_calculation

Step 2: Usage3: Run the script:

General Usage:

Code Block
python3 scan.py -l /xcompute/logs/0001-2024-05-23T13:47:22Z-ip-10-0-31-103/var/log/xspot/0001-2024-05-23-13:48:42-ip-10-0-31-103

...

 [options]

Options:

  • -l, --logs: Location of log files to parse: must be a directory. (default: /var/log/xspot/latest)

  • -w, --worker: Number of worker processes for scanning. (default: number of CPUs minus one)

  • -s, --start: Start day in UTC (in date format: 2022-03-17). (default: 30 days ago)

  • -e, --end: End day in UTC (in date format: 2022-03-17). (default: tomorrow)

  • -n, --num_days: Number of days: start with today or number of days since, and end with end of day today, overriding any -s or -e entry (default is this parameter is not used)

  • -o, --output: Output file name. (default: ./out.xlsx)

Examples:

Code Block
python3 scan.py -l logs/
python3 scan.py -l /var/log/logs/ -s 2024-01-01 -e 2024-02-01
python3 scan.py -l /var/log/logs/ -n 60