Hot answers tagged

6

You should check sadf manpage to know exactly what option will show seconds since epoch time, There is a difference between versions of sysstat. With my Ubuntu 12.04.4 LTS: $ sadf -V sysstat version 10.0.3 (C) Sebastien Godard (sysstat <at> orange.fr) With this version, option to show epoch time is -T: -T Display timestamp (UTC - Coordinated ...


3

You can use psutil in python and create your customized json. psutil (python system and process utilities) is a cross-platform library for retrieving information on running processes and system utilization (CPU, memory, disks, network, sensors) in Python. It is useful mainly for system monitoring, profiling, limiting process resources and the management ...


3

I believe atop does what your are looking for. It logs process resource utilization at intervals of your choice, and you can go back in time to see what happened at a specific time (atop -r logfile -b time then use t and T).


3

The sa1 command collects and stores binary data in system activity data file. The command is a kind of shell wrapper of sadc command and it accepts all its parameters. So check the sadc man page for details. The first line above is correct as XALL means to collect all available system activities. The collection will run for 1 hour (10 * 360s = 3600s = 1h) ...


2

I think your entry is awesome. It collects over the full interval vs. 1 second I see everywhere else. Because, as I (Charles Stepp) have commented on the "10 Useful Sar (Sysstat) Examples for UNIX / Linux Performance Monitoring" article on the web site "The Geek Stuff": In the crontab entry, you should not be limiting the interval to 1 second. Sar ...


2

Many tools are available on Solaris 11.2 by default like: vmstat prstat iostat mpstat You can also use top, I don't remember if it is installed by default, but the package is called: pkg:/diagnostic/top EDIT: To enable sar you can install the package pkg:/system/accounting/legacy-accounting and configure the crontab for the sys account: crontab -l sys #...


1

These commands are, indeed, part of the sysstat package. It's intended for performance monitoring; and specifically, sar is the system activity report: a Unix System V-derived system monitor command used to report on various system loads, including CPU activity, memory/paging, interrupts, device load, network and swap space utilization. Sar uses /proc ...


1

Do this with JSON parser jq as below if you are not able to tweak the original command (sar or sadf) to produce the JSON as you expect jq '.sysstat.hosts[] |= { nodename, statistics : [ { timestamp : .statistics[].timestamp | { date, time }, "cpu-load": .statistics[]."cpu-load"[] | [{ idle }], "memory": .statistics[].memory | { memfree, avail, "...


1

I think jq is the tool of choice. jq is like sed for JSON data - you can use it to slice and filter and map and transform structured data with the same ease that sed, awk, grep and friends let you play with text. A brilliant tutorial on jq can be found at Github https://stedolan.github.io/jq/tutorial/ and a nice one here: https://programminghistorian....


1

Grafana can visualize data from different databases. So, you can try save data from sar to the database like InfluxDB or another time-series database.


1

Based on your comment to @Lambert's answer, what you are looking for is called GUDS. This tool that is available for customer with support and it will gather all the stats that you specify for a time period. You can define the interval, for how long and start and stop time. Otherwise, you need to do it manually with the tools Lambert mentioned.


1

Run . /etc/sysstat/sysstat within your script. That will result in environment variable $SA_DIR being set appropriately.


1

The sysstat logs themselves are in a binary format which doesn't allow concatenation. What you can do is to use sadf to convert them into e.g. CSV, which allows for concatenation.


Only top voted, non community-wiki answers of a minimum length are eligible