![udevadm은 타임스탬프 구문 분석 출력을 모니터링합니다.](https://linux55.com/image/219722/udevadm%EC%9D%80%20%ED%83%80%EC%9E%84%EC%8A%A4%ED%83%AC%ED%94%84%20%EA%B5%AC%EB%AC%B8%20%EB%B6%84%EC%84%9D%20%EC%B6%9C%EB%A0%A5%EC%9D%84%20%EB%AA%A8%EB%8B%88%ED%84%B0%EB%A7%81%ED%95%A9%EB%8B%88%EB%8B%A4..png)
출력을 기록 중이며 udevadm monitor
이벤트 날짜/시간을 인쇄하고 싶습니다.
이것은 해당 로그의 한 줄입니다.
UDEV [529296.231213] remove /devices/virtual/input/input46 (input)
udevadm 매뉴얼 페이지에서:
udevadm monitor [options]
Listens to the kernel uevents and events sent out by a udev rule and prints the devpath of the event to the console. It can be used to analyze the event timing, by comparing the timestamps of the kernel uevent and the udev event.
이 타임스탬프 529296.231213을 실제 날짜 시간으로 변환하는 방법. Python으로 구문 분석합니다.
timestamp = 529296.231213
dt = datetime.datetime.fromtimestamp(timestamp)
제작일자 1986-06-12 11:51:36.231213
는 2023년 4월 27일 늦은 오후입니다.