1This is an example of the errinfo program, which prints details on syscall 2failures. 3 4By default it "snoops" syscall failures and prints their details, 5 6 # ./errinfo 7 EXEC SYSCALL ERR DESC 8 wnck-applet read 11 Resource temporarily unavailable 9 Xorg read 11 Resource temporarily unavailable 10 nautilus read 11 Resource temporarily unavailable 11 Xorg read 11 Resource temporarily unavailable 12 dsdm read 11 Resource temporarily unavailable 13 Xorg read 11 Resource temporarily unavailable 14 Xorg pollsys 4 interrupted system call 15 mozilla-bin lwp_park 62 timer expired 16 gnome-netstatus- ioctl 12 Not enough core 17 mozilla-bin lwp_park 62 timer expired 18 Xorg read 11 Resource temporarily unavailable 19 mozilla-bin lwp_park 62 timer expired 20 [...] 21 22which is useful to see these events live, but can scroll off the screen 23somewhat rapidly.. so, 24 25 26 27The "-c" option will count the number of errors. Hit Ctrl-C to stop the 28sample. For example, 29 30# ./errinfo -c 31Tracing... Hit Ctrl-C to end. 32^C 33 EXEC SYSCALL ERR COUNT DESC 34 nscd fcntl 22 1 Invalid argument 35 xscreensaver read 11 1 Resource temporarily unavailable 36 inetd lwp_park 62 1 timer expired 37 svc.startd lwp_park 62 1 timer expired 38 svc.configd lwp_park 62 1 timer expired 39 ttymon ioctl 25 1 Inappropriate ioctl for device 40gnome-netstatus- ioctl 12 2 Not enough core 41 mozilla-bin lwp_kill 3 2 No such process 42 mozilla-bin connect 150 5 operation now in progress 43 svc.startd portfs 62 8 timer expired 44 java_vm lwp_cond_wait 62 8 timer expired 45 soffice.bin read 11 9 Resource temporarily unavailable 46 gnome-terminal read 11 23 Resource temporarily unavailable 47 mozilla-bin recv 11 26 Resource temporarily unavailable 48 nautilus read 11 26 Resource temporarily unavailable 49gnome-settings-d read 11 26 Resource temporarily unavailable 50 gnome-smproxy read 11 34 Resource temporarily unavailable 51 gnome-panel read 11 42 Resource temporarily unavailable 52 dsdm read 11 112 Resource temporarily unavailable 53 metacity read 11 128 Resource temporarily unavailable 54 mozilla-bin lwp_park 62 133 timer expired 55 Xorg pollsys 4 147 interrupted system call 56 wnck-applet read 11 179 Resource temporarily unavailable 57 mozilla-bin read 11 258 Resource temporarily unavailable 58 Xorg read 11 1707 Resource temporarily unavailable 59 60Ok, so Xorg has received 1707 of the same type of error for the syscall read(). 61 62 63 64The "-n" option lets us match on one type of process only. In the following 65we match processes that have the name "mozilla-bin", 66 67# ./errinfo -c -n mozilla-bin 68Tracing... Hit Ctrl-C to end. 69^C 70 EXEC SYSCALL ERR COUNT DESC 71 mozilla-bin getpeername 134 1 Socket is not connected 72 mozilla-bin recv 11 2 Resource temporarily unavailable 73 mozilla-bin lwp_kill 3 2 No such process 74 mozilla-bin connect 150 5 operation now in progress 75 mozilla-bin lwp_park 62 207 timer expired 76 mozilla-bin read 11 396 Resource temporarily unavailable 77 78 79 80The "-p" option lets us examine one PID only. The following example examines 81PID 1119, 82 83# ./errinfo -c -p 1119 84Tracing... Hit Ctrl-C to end. 85^C 86 EXEC SYSCALL ERR COUNT DESC 87 Xorg pollsys 4 47 interrupted system call 88 Xorg read 11 669 Resource temporarily unavailable 89 90 91