0

I have a centos server which are running MySQL, kafka, and other services, I have separate LVM disks mounted to each of these services.

How do I get the trend of disk utilization for these services? Is there any specific command in Linux through which I can check?

I want to make sure I will not be out of disk space in the coming days.

Thanks.

Abhishek Anvekar
  • 338
  • 1
  • 5
  • 18
  • maybe you can check `du` command... and you can write a script to check the disk utilization of any directories by scheduling it through your available scheduling tool(cron, autosys etc...) – User123 Jun 04 '21 at 08:13
  • Thanks for your response @User123, now my data is already filled at 90% I want to know the trend of last 1 month, weekwise, is there any option to check that? – Abhishek Anvekar Jun 04 '21 at 16:04

1 Answers1

1

The df command will output the info you desire. you may create a periodic script that checks on it.

Efi Weiss
  • 638
  • 6
  • 12
  • Thanks for your response @Efraim Weiss, now my data is already filled at 90% I want to know the trend of last 1 month, weekwise, is there any option to check that? – Abhishek Anvekar Jun 04 '21 at 16:04
  • As far as I know - there is no standard linux method of accessing the 'writing trend' of the past, you would have to implement some method of keeping track going forward. Yet still - if your filesystem is perchance `ext[234]` then you may look at the 'Lifetime writes` field in the superblock, `dumpe2fs -h /dev/` | grep -i 'lifetime'` and divide that by the timeframe since the filesystem was created. – Efi Weiss Jun 06 '21 at 19:04