Friday, December 02, 2011

Here's a handy tidbit that will take the output of an strace and process it so you can figure out what are the likely errors:

sed -n '/= -1 E/s/.*= -1 \(.*\)/\1/p' strace.output | sort | awk 'BEGIN{last=""}{if (last=="")last=$1;if ($1==last)lines++; else {printf "%d %s\n",lines,last; lines=1;last=$1;}}END{printf "%d %s\n",lines,last}' | sort -n
1 ENXIO
1 EOPNOTSUPP
2 ECONNRESET
2 ENOTCONN
3 EIO
3 ENOTSOCK
4 ENODATA
5 EINPROGRESS
7 EINTR
8 ESRCH
16 EPERM
25 ECHILD
36 EACCES
46 ENOTDIR
59 ENOTTY
73 EEXIST
79 ECONNREFUSED
188 EINVAL
229 ESPIPE
913 EPIPE
1472 ETIMEDOUT
3078 EBADF
25369 ENOENT
692843 EAGAIN


Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?