Compute

Admission failure filtering from vmkernel.log

haewon83 2023. 8. 9. 16:13

 

# grep "Admission failure in path" * | awk '{split($NF, a, "."); print a[1]}' | sort | uniq -c
     84 host/system/visorfs/ramdisks/root:root
  62592 host/vim/vmvisor/amsd:amsd
  24756 host/vim/vmvisor/plugins/smx:sfcb-ProviderMa
     50 host/vim/vmvisor/plugins/smx:sfcb-sfcb

 

# split(string, array, separator) : 문자열을 separator 기준으로 분할하여 array에 전달
# $NF는 awk에서 각 라인의 맨 끝을 의미
# awk '{split($NF, a, "."); print a[1]}'는 아래 예제에서
host/vim/vmvisor/amsd:amsd.83502906:uw.83502906를 떼어낸 후,
host/vim/vmvisor/amsd:amsd, 83502906:uw, 83502906를 a 라는 이름의 array에 전달하고 첫 번째 인덱스를 출력

 

vmkernel.log

2023-07-26T14:52:18.527Z cpu0:2105833)Admission failure in path: host/vim/vmvisor/amsd:amsd.83502906:uw.83502906