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?

1 Answer 1

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.

5
  • If only one day range, I am sad that's not statistics Commented Mar 15, 2019 at 0:25
  • what's the meaning of -R 3 of atopsar -R 3 -c |head ? Commented Mar 15, 2019 at 0:43
  • Hi @kittygirl . You started with -R 3 in your question. It means: Summarize 3 samples into one sample. Please consult the man pages or linux.die.net/man/1/atopsar for more details. Commented Mar 15, 2019 at 12:20
  • seemed something wrong with your answer 2 days ago # atopsar -r y Commented Mar 16, 2019 at 2:57
  • Have a look at https://superuser.com/questions/599464/graphing-atop-logs/708127?noredirect=1#comment2135038_708127 Commented Mar 16, 2019 at 11:36

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.