Talks
Sergio Guillen Mantilla
@donkeysharp
Warning
Warning
This could be boring
Warning
This could be boring
Let's try to make it
not that boring :)
When there is an unexpected behavior in your application that's already been deployed... what's the first thing you do?
... and then?
... and then?
maybe a settings file?
xtime.override.properties
... and then?
maybe a settings file?
xtime.override.properties
check OS's settings?
Let's use a profiling tool
for...
Let's use a profiling tool
for...
JVM
Perl
Ruby
.NET
Python
PHP
Erlang
NodeJS
Go
But remember...
But remember...
this talk is about
the crazy way!
In all of this, there is a key component in common
The Operating System
Free BSD
Linux
OSX
Solaris
UNIX
File Descriptors
All I/O related tasks on a Unix-like OS are represented with file descriptors.
A file descriptor is an integer id per process that can represent an open file, a pipe, a socket listening for connections, a connection to a socket, etc.
DEMO
POSIX
Portable Operating System Interface
Which means...
A common set of syscalls
Something that may differ is the way they are implemented
Cool, but what is a syscall?
Cool, but what is a syscall?
It's the programmatic way that we can ask the kernel to do something for us
e.g. open a file, allocate memory, create a process, etc.
Cool, but what is a syscall?
It's basically a function that can be called from assembly, C/C++, or any other programming language
Nice theory lesson but...
Nice theory lesson but...
how can this help me solve my Jira ticket?
strace is a tool that attach to a process (new or in execution) with the purpose of tracing all the system calls the process does during its execution
strace is a tool that attach to a process (new or in execution) with the purpose of tracing all the system calls the process does during its execution
$ strace command
$ strace -p <PID>
Is it only strace?
Ask Julia Evans
ptrace