SYNC(8) BSD System Manager's Manual SYNC(8)NAME
sync -- force completion of pending disk writes (flush cache)
SYNOPSIS
sync
DESCRIPTION
The sync utility can be called to ensure that all disk writes have been completed before the processor is halted in a way not suitably done
by shutdown(8). Generally, it is preferable to use shutdown(8) to shut down the system, as they may perform additional actions such as
resynchronizing the hardware clock and flushing internal caches before performing a final sync.
The sync utility utilizes the sync(2) function call.
SEE ALSO fsync(2), sync(2), shutdown(8)HISTORY
A sync utility appeared in Version 4 AT&T UNIX.
BSD May 31, 1993 BSD
Check Out this Related Man Page
SYNC(8) System Manager's Manual SYNC(8)NAME
sync - synchronize data on disk with memory
SYNOPSYS
sync [--help] [--version]
DESCRIPTION
sync writes any data buffered in memory out to disk. This can include (but is not limited to) modified superblocks, modified inodes, and
delayed reads and writes. This must be implemented by the kernel; The sync program does nothing but exercise the sync(2) system call.
The kernel keeps data in memory to avoid doing (relatively slow) disk reads and writes. This improves performance, but if the computer
crashes, data may be lost or the filesystem corrupted as a result. sync ensures that everything in memory is written to disk.
sync should be called before the processor is halted in an unusual manner (e.g., before causing a kernel panic when debugging new kernel
code). In general, the processor should be halted using the shutdown(8) or reboot(8) or halt(8) commands, which will attempt to put the
system in a quiescent state before calling sync(2). (Various implementations of these commands exist; consult your documentation; on some
systems one should not call reboot(8) and halt(8) directly.)
GNU STANDARD OPTIONS --help Print a usage message on standard output and exit successfully.
--version
Print version information on standard output, then exit successfully.
-- Terminate option list.
ENVIRONMENT
The variables LANG, LC_ALL, LC_CTYPE, and LC_MESSAGES have the usual meaning.
CONFORMING TO
POSIX 1003.2
NOTES
On Linux, sync is only guaranteed to schedule the dirty blocks for writing; it can actually take a short time before all the blocks are
finally written. The reboot(8) and halt(8) commands take this into account by sleeping for a few seconds after calling sync(2).
This page describes sync as found in the fileutils-4.0 package; other versions may differ slightly. Mail corrections and additions to
aeb@cwi.nl. Report bugs in the program to fileutils-bugs@gnu.ai.mit.edu.
SEE ALSO sync(2), halt(8), reboot(8), update(8)GNU fileutils 4.0 1998-11 SYNC(8)
Hi Linux Admin Guys
My onsite server is always 15 min slow and seems like NTPD (Network Time Protocol (NTP) daemon) not running properly. can anyone suggest me how to rectify this problem? we can't seem to get NTP to properly sync the clock.
Any help is resolving the issue will be helpful.... (12 Replies)
Hello
I have a box with aix 5.3
if I type lsvg -l rootvg all my filesystems are sync except one
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 2 2 closed/syncd N/A
hd6 paging 32 64 ... (16 Replies)
hi guys
I have multiples linux servers Centos 5.3
the idea is to create a mechanism that when users change his password that new password will change on all linux boxes....
do you have any experience on this?
I know there are scripts to change password for a user but mine is whenever a... (11 Replies)
Dear Guy’s
By using dd command or any strong command, I’d like to copy huge data from file system to another file system
Sours File system: /sfsapp
File system has 250 GB of data
Target File system: /tgtapp
I’d like to copy all these files and directories from /sfsapp to /tgtapp as... (28 Replies)
Hello,
I recently patched my Solaris 10 box and found out that few of the apps are not working. Fortunately, I had detached the mirroring prior to patching, so I just booted into my secondary disk and found that my apps are working....
The problem is this was way back in last month....see... (14 Replies)
Good morning,
My first post and first visit, so hello. I have been asked to see if one of our Linux boxes can have it's time sync automatically because the person who built the system has told our staff it cannot be done. To me that raised some flags because although I am no Linux expert, I just... (12 Replies)
I installed a new kernel 3.0.22 on ubuntu server 11.04 32 bit.
when I select the kenel from boot loader it stops when
Code:
loading initial ramdisk...
I added all_generic_ide at the end of linux line and also added dev/sda1 to linux line: root=UUID=dev/sda1
now it says that
... (12 Replies)
I wanted to know which should be the best way to sync time for a linux machine. We have an application server and a database server, both using RHEL 5.8 as the OS. It is important that the time on both these servers match together and also sync with a common time source. As per my knowledge, these... (11 Replies)
hi all,
i attach a link with what im trying to do automatically via script but i have some questions i need answering please, bear in mind i am really new to bash scripting, the only thing i know how to do is commands in scripts like cd rm tar rsync cp stuff like that
i have mutiple project... (48 Replies)
I am facing an issue of large offset coming from my GPS clock.
I am syncing RHEL 6.3 server by GPS clock through ntpd service. I have too servers of same type and both are syncing independently to the GPS Clock.
>ntpstat of server 1 gives,
Synchronised to unspecified at stratum 15
time... (12 Replies)
Sometimes when I boot, my system goes into emergency mode.
I then use Clonezilla to restore an image.
Usually the image is older than the current date.
This is part of a backup script that runs as a startup program.
cd /home/andy/bin/
zip -u -q Ubuntu_Scripts.zip *.sh *.rb *.c *.py... (22 Replies)
I'm basically looking for the ksh equivalent of bash's PROMPT_COMMAND="history -r", where simply redrawing the command prompt in a terminal will cause ksh to reload the history file.
At the risk of sounding incredibly lazy (in which case I would be guilty as charged), I've noticed that if I have... (13 Replies)
Hello,
I am running a bash script to do an rsync back on a computer running MacOS High Sierra. This is the script I am using,
#!/bin/bash
# main backup location, trailing slash included
backup_loc="/Volumes/Archive_Volume/00_macos_backup/"
# generic backup function
function backup {... (12 Replies)
Someone, please help on this issue:-
Note : for security reason i didn't mention hostnames and ips.
==============================================================================
# ntpstat
unsynchronised
polling server every 1024 s
Ntpstat showing unsynchronised.
... (29 Replies)
Hi,
This is Solaris 9, which is service as NTP server for many unix clients. At backend, it it synching time with three GPS clocks. From past few days, I am noticing time reset to 1 second. Is this a problem ?
I was assuming that if it is a network issue or GPS clock connectivity issue, it... (14 Replies)