Yondata
728x90
반응형
SMALL

watches 설정 수정

[root@yon ~]# sysctl fs.inotify.max_user_watches
1024

[root@yon ~]# vi /etc/sysctl.conf
fs.inotify.max_user_watches = 1048576

[root@yon ~]# sysctl -p
fs.inotify.max_user_watches = 1048576


[root@yon ~]# sysctl fs.inotify.max_user_watches
1048576

 

 

losf 처리

[lsof] 는 List Open Files 의 약자로 시스템에서 열려있는 파일에 대한 정보를 출력해주는 명령어

 

 

[root@yon]# lsof -c tail |grep log


tail      419 tomcat_was    3r      REG  253,2    595553 134363266 /home/tomcat_was/yonm/logs/nohup/yonm.out.2023-07-22
tail      538 tomcat_was    3r      REG  253,2    680947 134627090 /home/tomcat_was/yonm/logs/nohup/yonm.out.2023-06-12
tail      733 tomcat_was    3r      REG  253,2    680947 134627071 /home/tomcat_was/yonm/logs/nohup/yonm.out.2023-06-09
tail      800 tomcat_was    3r      REG  253,2    164741 138330068 /home/tomcat_was/yonm/logs/nohup/yonm.out.2023-08-03


[root@yon]# kill -9 419

#PID 추출
[root@yon]# lsof -c tail |grep log | awk '{print $2}'

#추출한 PID 리스트 kill
[root@yon]#kill -9 $(lsof -c tail |grep log  | awk '{print $2}')

 

관련 프로세스 pid로 kill 하거나 관련 로그파일 삭제하면 됨

728x90
반응형
LIST

'서버' 카테고리의 다른 글

[리눅스]리눅스 하드디스크 용량 사용량 남은용량  (0) 2023.04.04
profile

Yondata

@Yondata

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!