Sorry, forgot to hit 'send' on this one....

 strace -f -e trace=file vim some-text-file 2>/dev/pts/23

Thanks, this is a brilliant new tool to have!   I added -t for
timestamps.... this is what happens...  (Note the 20 second delay in the
middle of the log)....

***  SAVE FILE START

14:20:09 getcwd("/usr/local/www/pages/booking", 1024) = 29
14:20:09 stat("management.phtml", {st_mode=S_IFREG|0644, st_size=11631,
...}) = 0
14:20:09 access("management.phtml", W_OK) = 0
14:20:09 getxattr("management.phtml", "system.posix_acl_access",
0x7fbfffe8a0, 132) = -1 EOPNOTSUPP (Operation not supported)
14:20:09 lstat("management.phtml", {st_mode=S_IFREG|0644, st_size=11631,
...}) = 0
14:20:09 stat("4913", 0x7fbfffed90)     = -1 ENOENT (No such file or
directory)
14:20:09 open("4913", O_WRONLY|O_CREAT|O_EXCL, 0100644) = 3
14:20:09 chown("4913", 1017, 0)         = 0
14:20:09 chmod("4913", 0100644)         = 0
14:20:09 stat("4913", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
14:20:09 unlink("4913")                 = 0
14:20:09 stat("management.phtml~", 0x7fbfffe960) = -1 ENOENT (No such file
or directory)
14:20:09 stat("management.phtml", {st_mode=S_IFREG|0644, st_size=11631,
...}) = 0
14:20:09 unlink("management.phtml~")    = -1 ENOENT (No such file or
directory)
14:20:09 rename("management.phtml", "management.phtml~") = 0
14:20:09 open("management.phtml", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3

** NOTE THE 20 SECOND DELAY HERE ****

14:20:29 chmod("management.phtml", 0100644) = 0
14:20:29 open("/proc/filesystems", O_RDONLY) = 3
14:20:29 stat("management.phtml", {st_mode=S_IFREG|0644, st_size=11633,
...}) = 0
14:20:29 chown("management.phtml", 1017, 0) = 0
14:20:29 chmod("management.phtml", 0100644) = 0
14:20:29 stat("management.phtml", {st_mode=S_IFREG|0644, st_size=11633,
...}) = 0
14:20:29 stat("/usr/local/www/pages/booking/management.phtml",
{st_mode=S_IFREG|0644, st_size=11633, ...}) = 0
14:20:29 unlink("management.phtml~")    = 0
14:20:29 getcwd("/usr/local/www/pages/booking", 1024) = 29
14:20:29 open("/root/.viminfo", O_RDONLY) = 3
14:20:29 stat("/root/.viminfo", {st_mode=S_IFREG|0600, st_size=5570, ...}) =
0
14:20:29 stat("/root/.viminfo.tmp", 0x7fbffff000) = -1 ENOENT (No such file
or directory)
14:20:29 open("/root/.viminfo.tmp", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 5
14:20:29 chmod("/root/.viminfo.tmp", 0600) = 0
14:20:29 chown("/root/.viminfo.tmp", 0, 0) = 0
14:20:29 stat("/root/.viminfo.tmp", {st_mode=S_IFREG|0600, st_size=5574,
...}) = 0
14:20:29 unlink("/root/.viminfo")       = 0
14:20:29 rename("/root/.viminfo.tmp", "/root/.viminfo") = 0
14:20:29 unlink("/usr/local/www/pages/booking/.management.phtml.swp") = 0
Process 25901 detached

*** SAVE FILE END

Is it having trouble opening the file for writing?

regards,
Keith

Reply via email to