|ATOPCAT(1)||General Commands Manual||ATOPCAT(1)|
atopcat - concatenate raw log files to stdout
atopcat [-dv] rawfile [rawfile]...
The program atopcat can be used to concatenate several raw log files into one stream (stdout). In this way, raw log files can be merged into one larger file by redirecting stdout to a file. Alternatively, merged data from several raw log files can be transferred directly into atop or atopsar via a pipe.
Concatenate the raw log files of five contiguous working days, write it into a new raw log file for that week and view that week interactively:
- atopcat /var/log/atop/atop_2020021[0-4] > week_2020_7
- atop -r week_2020_7
Concatenate the raw log files of a week and view that week interactively (since atop reads from a pipe, previous intervals can not be retrieved while viewing):
- atopcat /var/log/atop/atop_2020021[0-6] | atop -r -
Concatenate all raw log files of January 2020 and generate parsable output about the CPU utilization:
- atopcat /var/log/atop/atop_202001?? | atop -r - -PCPU
Concatenate the daily raw log files of February 3 and 4, and generate a report about memory utilization from 14:00h on the first day till 11:00h on the second day:
- atopcat /var/log/atop/atop_2020020 |
- atopsar -m -r - -b 202002031400 -e 202002041100
Repair a raw log file from which the last interval has not been completely written (e.g. if you intend to expand the file with new samples):
- atopcat /var/log/atop/atop_20200303 > /tmp/repaired
In the latter case, atopcat reports that the input file is incomplete and stops after the last consistent sample.
Gerlof Langeveld (firstname.lastname@example.org)