You can use strace on a specific pid to figure out what a specific process is doing, e.g.:
strace -fp <pid>
You might see something like:
select(9, [3 5 8], [], [], {0, 999999}) = 0 (Timeout)
| #!/usr/bin/env python3 | |
| import requests # for getting URL | |
| import json # for parsing json | |
| from datetime import datetime # datetime parsing | |
| import pytz # timezone adjusting | |
| import csv # for making csv files | |
| import os | |
| ################################################################# |
| -- Check the total size of each database | |
| SELECT | |
| tables.TABLE_SCHEMA AS database_name, | |
| ROUND(SUM(tables.DATA_LENGTH + tables.INDEX_LENGTH) / POWER(2, 30), 3) AS database_size_in_gb | |
| FROM information_schema.TABLES AS tables | |
| GROUP BY tables.TABLE_SCHEMA | |
| ORDER BY database_size_in_gb DESC; | |
| -- List all tables larger than 1 GB | |
| SELECT |
| # Install Xcode from the Mac App Store | |
| open /Applications/Install\ Xcode.app # complete the installation | |
| # Install homebrew | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)" | |
| # Install RVM | |
| bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) | |
| # Install some libraries to link ruby and gems against |