Skip to content

Instantly share code, notes, and snippets.

@derwolfe
Last active December 19, 2015 04:28
Show Gist options
  • Save derwolfe/5897087 to your computer and use it in GitHub Desktop.
Save derwolfe/5897087 to your computer and use it in GitHub Desktop.
Armin - This looks to be part of a way. Strace can show all file operations (syscalls).
~ $ strace -e write python test.py
write(3, "0 seconds\n1 seconds\n2 seconds\n3 "..., 144) = 144
+++ exited with 0 +++
import time
def main():
with open('test_output.txt', 'w') as f:
for i in xrange(14):
time.sleep(1)
f.write("%s seconds\n" %i)
if __name__ == '__main__':
main()
@derwolfe
Copy link
Author

derwolfe commented Jul 1, 2013

This also talks about seeing more or less of the write information

https://blogs.oracle.com/ksplice/entry/strace_the_sysadmin_s_microscope

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment