Skip to main content

Wrapper for getting process information.

Project description

pagurus

Used for getting the information from a running job based on its pid using psutil.

Install

Availible on PyPi and easily installed in your enviroment.

pip install pagurus

Options

usage: pagurus [-h] [-t TAG] [-o OUTFILE] [-p PATH] [-d] [-r RATE] [-u USER] [-noh] [-mv]

optional arguments:
  -h, --help            show this help message and exit
  -o OUTFILE, --outfile OUTFILE
                        File name for csv.
  -p PATH, --path PATH  Path to put csv file.
  -d, --debug           Run with debugging info.
  -r RATE, --rate RATE  Polling rate for process.
  -u USER, --user USER  Username to get stats for.
  -noh, --no-header     Turn off writting the header.
  -mv, --move           Moves file from 'running' to 'complete'

Running pagurus as a wrapper for a single user

# Start running wrapper in the background for username
pagurus -u username -mv -p /path/to/output/dir -o test.csv
# Get the previous running PID of pagurus
export PID=$!
# Sleep for a few seconds to let everything start running
sleep 10 

###########################

# Run your desired program as normal
./a.out

# Works with containers
shifter --image=tylern4/memoryhog:latest alloc 2

# and with wrapper scripts
shifter --image=jfroula/aligner-bbmap:2.0.2 bbmap.sh Xmx12g in=sample.fastq.bz2 ref=sample.fasta out=test.sam

###########################

# Kill the pagurus process
kill $PID

# Sleep for a few seconds to let results finish writing
sleep 10

Plotting results example

There is an example notebook which will shows how to get memory usage and cpu usage from the output files.

Project details


Download files

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

Source Distribution

pagurus-1.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

pagurus-1.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file pagurus-1.1.tar.gz.

File metadata

  • Download URL: pagurus-1.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for pagurus-1.1.tar.gz
Algorithm Hash digest
SHA256 9327242d98a5e87433f54333448db1cd3848b40b7befb475b962d9a02178d50a
MD5 714994b0dcf62ae01d173f1840df112c
BLAKE2b-256 8e559f4eee492b4b654cc39d0f4178b9d681c4823bafc8e54e3dcf171287ab6c

See more details on using hashes here.

File details

Details for the file pagurus-1.1-py3-none-any.whl.

File metadata

  • Download URL: pagurus-1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for pagurus-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 98ba198435bc6cb61496fdfaa008ec7e1222a7e309bb5398b6f278560e3ec1ab
MD5 589449edb106f6986e09b193760a2f6b
BLAKE2b-256 6417444e524d639d7b26a50eac4c4ce2f9492fa43ce75d1c6bcf9bdbb57d3f4d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page