Sync: Difference between revisions
From Leo's Notes
This page was last edited on 30 December 2021, at 01:31.
Created page with "The sync system call writes dirty buffers to the file system or disk. The progress of {{code|sync}} can be viewed indirectly by: {{highlight|lang=terminal|code= # grep -e Dir..." |
m Updated categories |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
The sync system call writes dirty buffers to the file system or disk. | The sync system call writes dirty buffers to the file system or disk. The call will block until all dirty buffers are written. | ||
The progress of {{code|sync}} can be viewed indirectly by: | The progress of {{code|sync}} can be viewed indirectly by: | ||
| Line 5: | Line 5: | ||
# grep -e Dirty: -e Writeback: /proc/meminfo | # grep -e Dirty: -e Writeback: /proc/meminfo | ||
}} | }} | ||
If something is wonky with your disk or network share, {{code|sync}} may hang. If a reboot is issued, the reboot will also hang when attempting to call {{code|sync}}. In such circumstances, it might be desirable to do a force reboot ({{code|reboot -f -f}}) or by rebooting using [[Sysrq#Rebooting|Sysrq]] both of which foregoes syncing. | |||
{{Navbox Linux}} | |||
[[Category:Linux]] | |||
[[Category:LinuxUtilities]] | |||
Latest revision as of 01:31, 30 December 2021
The sync system call writes dirty buffers to the file system or disk. The call will block until all dirty buffers are written.
The progress of sync can be viewed indirectly by:
# grep -e Dirty: -e Writeback: /proc/meminfo
If something is wonky with your disk or network share, sync may hang. If a reboot is issued, the reboot will also hang when attempting to call sync. In such circumstances, it might be desirable to do a force reboot (reboot -f -f) or by rebooting using Sysrq both of which foregoes syncing.