[LINUX] I want to grep the execution result of strace

You can grep by redirecting the standard error output to the standard output as shown below.

strace <Command you want to execute> 2>&1 | grep <keyword>

Execution example:

$ strace -ff -s 15000 date 2>&1 | grep AT_FDCWD
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = 3

Recommended Posts

I want to grep the execution result of strace
I want to customize the appearance of zabbix
I want to batch convert the result of "string" .split () in Python
I want to fully understand the basics of Bokeh
I want to increase the security of ssh connections
I want to store the result of% time, %% time, etc. in an object (variable)
I want to use only the normalization process of SudachiPy
I want to get the operation information of yahoo route
I want to judge the authenticity of the elements of numpy array
I want to know the features of Python and pip
Keras I want to get the output of any layer !!
I want to know the legend of the IT technology world
I want to pin Spyder to the taskbar
I want to get the name of the function / method being executed
I want to output to the console coolly
I want to manually assign the training parameters of the [Pytorch] model
I want to handle the rhyme part1
I want to read the html version of "OpenCV-Python Tutorials" OpenCV 3.1 version
I want to handle the rhyme part3
I want to output the beginning of the next month with Python
When you want to save the result of the callback function somewhere
I want to display the progress bar
I want to check the position of my face with OpenCV!
I want to know the population of each country in the world.
I want to handle the rhyme part2
I want to handle the rhyme part5
I want to handle the rhyme part4
[Note] I want to completely preprocess the data of the Titanic issue-Age version-
I don't want to admit it ... The dynamical representation of Neural Networks
(Python Selenium) I want to check the settings of the download destination of WebDriver
I want to explain the abstract class (ABCmeta) of Python in detail.
I want to sort a list in the order of other lists
I want to express my feelings with the lyrics of Mr. Children
I want to analyze the emotions of people who want to meet and tremble
I want to use the Qore SDK to predict the success of NBA players
I want to leave an arbitrary command in the command history of Shell
I want to stop the automatic deletion of the tmp area with RHEL7
I tried to verify the result of A / B test by chi-square test
Python: I want to measure the processing time of a function neatly
Setting to output the log of cron execution
I want to handle the rhyme part7 (BOW)
I tried to touch the API of ebay
I tried to correct the keystone of the image
I want to get League of Legends data ③
I want to get League of Legends data ②
I want to get League of Legends data ①
From the introduction of pyethapp to the execution of contract
I want to use the activation function Mish
I want to display the progress in Python!
I tried to predict the price of ETF
I tried to vectorize the lyrics of Hinatazaka46!
I made a tool to estimate the execution time of cron (+ PyPI debut)
How to pass the execution result of a shell command in a list in Python
I want to get the path of the directory where the running file is stored.
The story of IPv6 address that I want to keep at a minimum
I want to use Python in the environment of pyenv + pipenv on Windows 10
I want to use PyTorch to generate something like the lyrics of Japari Park
I want to set a life cycle in the task definition of ECS
I want to add silence to the beginning of a wav file for 1 second
I want to see a list of WebDAV files in the Requests module
I want to crop the image along the contour instead of the rectangle [python OpenCV]