Last active
December 19, 2015 04:28
-
-
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).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ $ strace -e write python test.py | |
write(3, "0 seconds\n1 seconds\n2 seconds\n3 "..., 144) = 144 | |
+++ exited with 0 +++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This also talks about seeing more or less of the write information
https://blogs.oracle.com/ksplice/entry/strace_the_sysadmin_s_microscope