1

My system is centos 7.4 with atop-2.3.0-8.el7.x86_64.
I already have 3 days log in var/log/atop, such as atop_20190312 atop_20190313 atop_20190314.

I want to find out the peak period of CPU consumption in those 3 days.
Based on this post,I tried:

atopsar -r /var/log/atop/ -A -R 3 -c |head

but failed.

How to read several days atop log into one?

kittygirl
  • 111
  • 1
  • 4

1 Answers1

1

I am sorry to say that as I know, atopsar is not able to combine several days.

Selection the date:

You can use -r to directly read one atop-log file. If you need to check yesterday or the day before, you can use -r y. If you add y you can select even older days: -r yy would be the day before yesterday.

Selection the right report

You can either select all reports with -A or select for example CPU only with -c. Selecting both doesn't make sense.

Conclusion

Since you want to see the cpu utilization for 3 days, you can see them:

Today: 
# atopsar  -R 3 -c |head

Yesterday:
# atopsar -r y -R 3 -c |head

2 Days ago:
# atopsar -r y -R 3 -c |head

Hope that helps.

Daniel Andersen
  • 408
  • 3
  • 8