Ubuntu: How to check if FSTrim was succesful in the last run


I recently installed an SSD and AFAIK Ubuntu makes a weekly FSTrim on SSD's that support it.

Is there a log file of this trims?


No, there is no special log file and the command fstrim has usually no output without the -v switch if there is no error.

/sbin/fstrim --all is started via cron and the only thing you can see are the messages that cron writes into /var/log/syslog.

You could change the configuration in /etc/cron.weekly/fstrim.

  • Open the file in your editor:

    sudo nano /etc/cron.weekly/fstrim  
  • Add the -v switch

    /sbin/fstrim -v --all || true  

    and you will have an output like this

    /: 182,2 MiB (191000576 bytes) trimmed  

    in your syslog

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »