Skip to main content

Parse sysstat (sa/sar) output into Pandas Dataframes

Project description

python-sadf provides a simple way to create system utilisation reports using sysstat and the Pandas api.

Example

import sadf
from sadf import fieldgroups as fg

cmd = sadf.SadfCommand(start_time='09:00:00',
                       end_time='18:00:00')

cmd.field_groups = [
    fg.CPULoad(all_fields=True),
    fg.Queue(),
    fg.ProcessAndContextSwitch(),
    fg.IO(),
    fg.Memory(all_fields=True),
]

report = cmd.run()

memory_report = report.reports['memory']\
    .resample('30T').mean()

ldavg_report = report.reports['queue']\
    .resample('10T').rolling(window=3).mean()\
    .dropna()\
    .loc[:, ['ldavg-1', 'ldavg-5', 'ldavg-15']]

Author

Joshua Griffiths <jgriffiths@x86-64.io>

License

Apache - See LICENSE file

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

sadf-0.1.2.tar.gz (10.2 kB view hashes)

Uploaded Source

Built Distribution

sadf-0.1.2-py3-none-any.whl (9.5 kB view hashes)

Uploaded Python 3

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