/
STRACE
Search
Notion
STRACE
strace, ltrace, iotop, iostat (sysstat)
Run 60 sec. strace, sorted by CPU time percent:
(export PID=27852; timeout 60 strace -fc -S time -o /tmp/$PID.`date '+%Y%m%d_%H%M'`.strace -p $PID) cat /tmp/27852.20201124_1651.strace % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 33.12 0.201717 7 28828 write 31.33 0.190796 63599 3 unlink 28.98 0.176509 12 15252 225 read 6.56 0.039973 13324 3 munmap 0.00 0.000023 0 1161 464 stat 0.00 0.000020 0 464 lseek 0.00 0.000000 0 7 open 0.00 0.000000 0 7 close 0.00 0.000000 0 9 fstat 0.00 0.000000 0 906 poll 0.00 0.000000 0 3 mmap 0.00 0.000000 0 243 11 ioctl 0.00 0.000000 0 6 select 0.00 0.000000 0 2 getdents 0.00 0.000000 0 2 rename 0.00 0.000000 0 1 getrandom ------ ----------- ----------- --------- --------- ---------------- 100.00 0.609038 46897 700 total
Bash