[solved] fstrim for SSD

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
sango
Level 1
Level 1
Posts: 18
Joined: Fri Oct 12, 2018 12:40 am

[solved] fstrim for SSD

Post by sango »

Hi

I have installed a new SSD on my machine
fstrim runs by default
but when i do a status on it. I get following output

Code: Select all

fstrim.service - Discard unused blocks
   Loaded: loaded (/lib/systemd/system/fstrim.service; static; vendor preset: enabled)
   Active: inactive (dead) since Mon 2018-10-22 10:26:49 IST; 2min 23s ago
  Process: 2874 ExecStart=/sbin/fstrim -av (code=exited, status=0/SUCCESS)
 Main PID: 2874 (code=exited, status=0/SUCCESS)

Oct 22 10:26:49 Aspire-A515-51G systemd[1]: Starting Discard unused blocks...
Oct 22 10:26:49 Aspire-A515-51G fstrim[2874]: /home: 132 MiB (138416128 bytes) trimmed
Oct 22 10:26:49 Aspire-A515-51G fstrim[2874]: /: 373.3 MiB (391434240 bytes) trimmed
Oct 22 10:26:49 Aspire-A515-51G systemd[1]: Started Discard unused blocks.
As can be seen from output

Code: Select all

Active: inactive (dead) since Mon 2018-10-22 10:26:49 IST; 2min 23s ago
Is this normal? I suppose Active should have been Active

PS: - I already did restarting the service fstrim
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: fstrim for SSD

Post by smurphos »

Are you on 19? That output is normal.

Run journalctl | grep fstrim in a terminal to check for it's log entries - it's a weekly job run on on a timer by default.

Code: Select all

$ systemctl status fstrim.timer
● fstrim.timer - Discard unused blocks once a week
   Loaded: loaded (/lib/systemd/system/fstrim.timer; enabled; vendor preset: enabled)
   Active: active (waiting) since Mon 2018-10-22 02:59:38 BST; 3h 25min ago
  Trigger: Mon 2018-10-29 00:00:00 GMT; 6 days left
     Docs: man:fstrim

Oct 22 02:59:38 steve-HP-Pavilion-g6-Notebook-PC systemd[1]: Started Discard unused blocks once a week.

Code: Select all

$ systemctl status fstrim.service
● fstrim.service - Discard unused blocks
   Loaded: loaded (/lib/systemd/system/fstrim.service; static; vendor preset: enabled)
   Active: inactive (dead)
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
sango
Level 1
Level 1
Posts: 18
Joined: Fri Oct 12, 2018 12:40 am

Re: fstrim for SSD

Post by sango »

yes I am on LM 19

output from journalctl | grep fstrim

Code: Select all

Jul 21 20:03:07 Aspire-A515-51G fstrim[795]: /home: 848.9 GiB (911481155584 bytes) trimmed
Jul 21 20:03:07 Aspire-A515-51G fstrim[795]: /: 38.6 GiB (41393135616 bytes) trimmed
Jul 24 14:38:32 Aspire-A515-51G fstrim[792]: /home: 848.4 GiB (911001419776 bytes) trimmed
Jul 24 14:38:32 Aspire-A515-51G fstrim[792]: /: 38.1 GiB (40876687360 bytes) trimmed
Aug 01 20:03:58 Aspire-A515-51G fstrim[809]: /home: 847.6 GiB (910100393984 bytes) trimmed
Aug 01 20:03:58 Aspire-A515-51G fstrim[809]: /: 37.7 GiB (40492072960 bytes) trimmed
Aug 08 20:05:28 Aspire-A515-51G fstrim[813]: /home: 847.4 GiB (909840863232 bytes) trimmed
Aug 08 20:05:28 Aspire-A515-51G fstrim[813]: /: 37.5 GiB (40202473472 bytes) trimmed
Aug 25 20:26:11 Aspire-A515-51G fstrim[802]: /home: 847.4 GiB (909853093888 bytes) trimmed
Aug 25 20:26:11 Aspire-A515-51G fstrim[802]: /: 38.2 GiB (40960688128 bytes) trimmed
Aug 28 20:04:40 Aspire-A515-51G fstrim[814]: /home: 845.4 GiB (907698831360 bytes) trimmed
Aug 28 20:04:40 Aspire-A515-51G fstrim[814]: /: 38.3 GiB (41107574784 bytes) trimmed
Sep 03 21:21:34 Aspire-A515-51G fstrim[784]: /home: 841.2 GiB (903179268096 bytes) trimmed
Sep 03 21:21:34 Aspire-A515-51G fstrim[784]: /: 37.5 GiB (40230002688 bytes) trimmed
Sep 10 14:22:07 Aspire-A515-51G fstrim[789]: /home: 809.3 GiB (868960329728 bytes) trimmed
Sep 10 14:22:07 Aspire-A515-51G fstrim[789]: /: 37.4 GiB (40121151488 bytes) trimmed
Sep 17 20:39:47 Aspire-A515-51G fstrim[771]: /home: 809.1 GiB (868732227584 bytes) trimmed
Sep 17 20:39:47 Aspire-A515-51G fstrim[771]: /: 37.1 GiB (39866458112 bytes) trimmed
Sep 27 20:45:09 Aspire-A515-51G fstrim[813]: /home: 809.1 GiB (868725915648 bytes) trimmed
Sep 27 20:45:09 Aspire-A515-51G fstrim[813]: /: 37 GiB (39780007936 bytes) trimmed
Oct 01 20:41:08 Aspire-A515-51G fstrim[820]: /home: 840.9 GiB (902853169152 bytes) trimmed
Oct 01 20:41:08 Aspire-A515-51G fstrim[820]: /: 36.9 GiB (39635202048 bytes) trimmed
Oct 11 22:57:27 Aspire-A515-51G fstrim[801]: /home: 840.4 GiB (902406799360 bytes) trimmed
Oct 11 22:57:27 Aspire-A515-51G fstrim[801]: /: 36.9 GiB (39616151552 bytes) trimmed
Oct 16 14:02:17 Aspire-A515-51G fstrim[808]: /home: 840.4 GiB (902387888128 bytes) trimmed
Oct 16 14:02:17 Aspire-A515-51G fstrim[808]: /: 37.3 GiB (40065679360 bytes) trimmed
Oct 22 10:21:46 Aspire-A515-51G fstrim[875]: /home: 887.5 GiB (952942510080 bytes) trimmed
Oct 22 10:21:46 Aspire-A515-51G fstrim[875]: /: 99.4 GiB (106679418880 bytes) trimmed
Oct 22 10:22:49 Aspire-A515-51G sudo[2201]:  sangram : TTY=pts/0 ; PWD=/home/sangram ; USER=root ; COMMAND=/bin/systemctl status fstrim.service
Oct 22 10:23:12 Aspire-A515-51G sudo[2204]:  sangram : TTY=pts/0 ; PWD=/home/sangram ; USER=root ; COMMAND=/bin/systemctl status fstrim.service
Oct 22 10:23:33 Aspire-A515-51G sudo[2207]:  sangram : TTY=pts/0 ; PWD=/home/sangram ; USER=root ; COMMAND=/bin/systemctl status fstrim.time
Oct 22 10:23:37 Aspire-A515-51G sudo[2210]:  sangram : TTY=pts/0 ; PWD=/home/sangram ; USER=root ; COMMAND=/bin/systemctl status fstrim
Oct 22 10:23:52 Aspire-A515-51G sudo[2213]:  sangram : TTY=pts/0 ; PWD=/home/sangram ; USER=root ; COMMAND=/bin/systemctl start fstrim
Oct 22 10:23:53 Aspire-A515-51G fstrim[2216]: /home: 590.2 MiB (618860544 bytes) trimmed
Oct 22 10:23:53 Aspire-A515-51G fstrim[2216]: /: 0 B (0 bytes) trimmed
Oct 22 10:23:59 Aspire-A515-51G sudo[2217]:  sangram : TTY=pts/0 ; PWD=/home/sangram ; USER=root ; COMMAND=/bin/systemctl status fstrim
Oct 22 10:24:17 Aspire-A515-51G sudo[2221]:  sangram : TTY=pts/0 ; PWD=/home/sangram ; USER=root ; COMMAND=/bin/systemctl stop fstrim
Oct 22 10:24:34 Aspire-A515-51G sudo[2224]:  sangram : TTY=pts/0 ; PWD=/home/sangram ; USER=root ; COMMAND=/bin/systemctl start fstrim.timer
Oct 22 10:24:40 Aspire-A515-51G sudo[2227]:  sangram : TTY=pts/0 ; PWD=/home/sangram ; USER=root ; COMMAND=/bin/systemctl status fstrim
Oct 22 10:26:26 Aspire-A515-51G sudo[2866]:  sangram : TTY=pts/0 ; PWD=/home/sangram ; USER=root ; COMMAND=/bin/systemctl status fstrim
Oct 22 10:26:49 Aspire-A515-51G sudo[2871]:  sangram : TTY=pts/0 ; PWD=/home/sangram ; USER=root ; COMMAND=/bin/systemctl start fstrim
Oct 22 10:26:49 Aspire-A515-51G fstrim[2874]: /home: 132 MiB (138416128 bytes) trimmed
Oct 22 10:26:49 Aspire-A515-51G fstrim[2874]: /: 373.3 MiB (391434240 bytes) trimmed
Oct 22 10:27:07 Aspire-A515-51G sudo[2877]:  sangram : TTY=pts/0 ; PWD=/home/sangram ; USER=root ; COMMAND=/usr/sbin/service fstrim.timer status
Oct 22 10:27:15 Aspire-A515-51G sudo[2883]:  sangram : TTY=pts/0 ; PWD=/home/sangram ; USER=root ; COMMAND=/usr/sbin/service fstrim status
Oct 22 10:28:22 Aspire-A515-51G sudo[3019]:  sangram : TTY=pts/0 ; PWD=/home/sangram ; USER=root ; COMMAND=/usr/sbin/service fstrim status
Oct 22 10:29:13 Aspire-A515-51G sudo[3028]:  sangram : TTY=pts/0 ; PWD=/home/sangram ; USER=root ; COMMAND=/usr/sbin/service fstrim status
So this is normal right?
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: fstrim for SSD

Post by catweazel »

sango wrote: Mon Oct 22, 2018 3:21 am So this is normal right?
Right.

Code: Select all

boot@AX370:~$ systemctl status fstrim
● fstrim.service - Discard unused blocks
   Loaded: loaded (/lib/systemd/system/fstrim.service; static; vendor preset: enabled)
   Active: inactive (dead) since Mon 2018-10-22 15:20:17 AEDT; 3h 4min ago
 Main PID: 1151 (code=exited, status=0/SUCCESS)

Oct 22 15:19:58 AX370 systemd[1]: Starting Discard unused blocks...
Oct 22 15:20:17 AX370 fstrim[1151]: /boot: 1.7 GiB (1834852352 bytes) trimmed
Oct 22 15:20:17 AX370 fstrim[1151]: /: 307 GiB (329671561216 bytes) trimmed
Oct 22 15:20:17 AX370 systemd[1]: Started Discard unused blocks.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
sango
Level 1
Level 1
Posts: 18
Joined: Fri Oct 12, 2018 12:40 am

Re: fstrim for SSD

Post by sango »

Thanks :-)

Cheers to awesome community.
Locked

Return to “Hardware Support”