Получение имени файла на основе номера дескриптора файла

Я использую strace -p 1234 -o strace.out на система, в которой процесс подозревается, что процесс 1234 работает плохо. Я вижу эти чтения , выполнение которых занимает почти минуту:

read(11, "\0\335\0\0\6\0\0\0\0\0\20\27m\3708\341\246\247\365\374\334\0274-X#\21!xs\10\25"..., 2064) = 221

Я надеялся выяснить имя файла связан с дескриптором файла 11 .

ОБНОВЛЕНИЕ

$ sudo strace -yp 3549 -o strace.out.2
strace: invalid option -- y
usage: strace [-dffhiqrtttTvVxx] [-a column] [-e expr] ... [-o file]
              [-p pid] ... [-s strsize] [-u username] [-E var=val] ...
              [command [arg ...]]
   or: strace -c [-e expr] ... [-O overhead] [-S sortby] [-E var=val] ...
              [command [arg ...]]
-c -- count time, calls, and errors for each syscall and report summary
-f -- follow forks, -ff -- with output into separate files
-F -- attempt to follow vforks, -h -- print help message
-i -- print instruction pointer at time of syscall
-q -- suppress messages about attaching, detaching, etc.
-r -- print relative timestamp, -t -- absolute timestamp, -tt -- with usecs
-T -- print time spent in each syscall, -V -- print version
-v -- verbose mode: print unabbreviated argv, stat, termio[s], etc. args
-x -- print non-ascii strings in hex, -xx -- print all strings in hex
-a column -- alignment COLUMN for printing syscall results (default 40)
-e expr -- a qualifying expression: option=[!]all or option=[!]val1[,val2]...
   options: trace, abbrev, verbose, raw, signal, read, or write
-o file -- send trace output to FILE instead of stderr
-O overhead -- set overhead for tracing syscalls to OVERHEAD usecs
-p pid -- trace process with process id PID, may be repeated
-s strsize -- limit length of print strings to STRSIZE chars (default 32)
-S sortby -- sort syscall counts by: time, calls, name, nothing (default time)
-u username -- run command as username handling setuid and/or setgid
-E var=val -- put var=val in the environment for command
-E var -- remove var from the environment for command
-1
14.10.2015, 00:12
0 ответов

Теги

Похожие вопросы