코딩정보




● HA작업)VSCode 애드온으로 파일 수정만 하면 cpu + 메모리 swap 증가로 사용중지 문제 해결 swap 시스템 모니터링

♨ 카랜더 일정 : 2023년12월15일
  • 링크

  • 첨부

  • 컨텐츠 정보

    본문

    ● HA작업)VSCode 애드온으로 파일 수정만 하면  cpu + 메모리 swap 증가로 사용중지 문제 해결 swap 시스템 모니터링

    VSCode 애드온을 열기 전 시스템 수준 CPU 사용량은 2%, 메모리 사용량은 30%였습니다.

    애드온을 열면 CPU 사용량이 30%로 급증하고 swap및 메모리 사용량은 100%에 도달할 때까지

    천천히 증가하여 시스템이 정지됩니다.

     현제 사용조건 은  아래조건에도 이전에 문제 발생 하였는데

    지금은 최신버전 업데이트후 안정적으로 사용조건입니다

    문제발생시 조치 > vscode 애드온 제거 또는 중지

    현제의 문제유무> 현제는 haos가 업데이트 되어  vscode 사용해도 문제 없습니다


    애드온 모니터링 >

    3232235521_1702619959.4597.png

    sensor.yaml 적용후 카드 추가 모니터링

    3232235521_1702626229.3976.png

    vscode 구성조건

    3232235521_1702619973.5505.png

    packages:
      - mariadb-client
    init_commands:
      - cd /config
      - ls -l
    log_level: info
    config_path: /config/StudioCodeServer

    =============

    swap use 관찰 재부팅 합니다,

    요즘은 정상적으로 사용 0.2% 유지 됩니다

    3232235521_1702620400.7622.png


    swap file 자동화 구성 모니터링 50% 이상시 재부팅 설정

    3232235521_1702626097.8228.png


    alias: Rebooting_swap file문제 50%로  HAOS 가 재부팅이 5초후 진행 합니다.
    description: 시스템이 swap file문제로  HAOS 가 재부팅이 5초후 진행 합니다.
    trigger:
      - platform: numeric_state
        entity_id:
          - sensor.swap_use_percent
        above: 0.5
    condition: []
    action:
      - service: tts.google_say
        data:
          entity_id: media_player.speaker_2
          language: ko
          message: HAOS의 swap file문제로  재부팅이 5초후 rebooting 진행 합니다.
      - delay:
          hours: 0
          minutes: 0
          seconds: 5
          milliseconds: 0
      - service: hassio.host_reboot
        data: {}
    mode: single


    3232235521_1702626014.7221.png

    sensor.swap_use_percent 의 사용조건
    https://www.home-assistant.io/integrations/systemmonitor/#disk-usage


    3232235521_1702626342.1831.png

    # # 20230704_0156_43
    # /config/configuration.yaml
    # sensor: !include sensor.yaml
    # 대치함
    # sensor:
    - platform: systemmonitor
      resources:
        - type: disk_use_percent
          arg: /config
        - type: disk_use
        - type: disk_free
        - type: memory_use_percent
        - type: memory_use
        - type: memory_free
        - type: swap_use_percent
        - type: swap_use
        - type: swap_free
        # - type: load_1m
        # - type: load_5m
        # - type: load_15m
        - type: network_in
          arg: eth0
        - type: network_out
          arg: eth0
        - type: throughput_network_in
          arg: eth0
        - type: throughput_network_out
          arg: eth0
        - type: packets_in
          arg: eth0
        - type: packets_out
          arg: eth0
        - type: ipv4_address
          arg: eth0
        - type: ipv6_address
          arg: eth0
        - type: processor_use
        # - type: processor_temperature
        - type: last_boot
        - type: disk_use
          arg: /dev
        # - type: disk_use
        #   arg: /dev/shm
        - type: disk_use
          arg: /dev/sda8
      # https://www.home-assistant.io/integrations/systemmonitor/#disk-usage

    ☞ https://11q.kr 에 등록된 자료 입니다. ♠ 정보찾아 공유 드리며 출처는 링크 참조 바랍니다♠1.png

    [ 추가 정보 ... 더보기) ]
    뷰PDF 1,2



    office view

    관련자료

    댓글목록

    등록된 댓글이 없습니다.




    ♥간단_메모글♥


    최근글


    새댓글



    PHP 안에 HTML ☞ 홈페이지 화면갱신 시간은 ♨
    ▶ 2024-05-02 09:21:23

    오늘의 홈 현황


    • 현재 접속자♨ 265 명
    • 오늘 가입자※ 0 명
    • 어제 가입자※ 4 명
    • 주간 가입자※ 16 명
    • 오늘 방문자 1,168 명
    • 어제 방문자 1,557 명
    • 최대 방문자 13,042 명
    • 전체 방문자 4,299,056 명
    • 전체 게시물※ 8,548 개
    • 전체 댓글수※ 24,546 개
    • 전체 회원수 10,944 명

    QR코드


    ☞ QR코드 스캔은 kakao앱 자체 QR코드

    알림 0








    최신글↑