Skip to main content

A simple system monitoring tool for CoreDotCloud

Project description

coredotcloud 코어닷클라우드 - 시스템 모니터링 클라이언트

coredotcloud는 CPU, 메모리, 디스크, 네트워크, GPU 사용량 등의 시스템 정보를 정기적으로 수집하여 RESTful API로 전송하는 Python 패키지입니다. 다중 CPU 및 GPU를 지원하며, 가벼운 JSON 형식의 데이터를 효율적으로 전송할 수 있도록 설계되었습니다.

CoreDotCloud is a lightweight system monitoring tool that collects CPU, memory, disk, and network usage data and sends it to a predefined RESTful API.

🚀 특징

  • CPU, 메모리, 디스크, 네트워크 속도 모니터링
  • 다중 CPU & 다중 GPU 장비 지원
  • 설정 파일 (~/.coredotcloud.json)을 통해 API 정보 관리
  • 30초마다 자동으로 데이터 수집 및 전송
  • 가볍고 빠른 리스트 기반 JSON 데이터 구조
  • Python 3.7 이상 지원

📥 설치 방법

COREDOTCLOUD는 PyPI에 등록된 Python 패키지입니다.

pip install coredotcloud

설치가 완료되면 coredotcloud 명령어를 실행할 수 있습니다.


⚙️ 설정 파일 생성

설정 파일은 사용자의 홈 디렉토리 (~/.coredotcloud.json) 에 위치합니다. 최초 실행 시 자동으로 생성되며, API 키를 입력한 후 사용하면 됩니다.

설정 파일 위치

  • Linux/macOS: ~/.coredotcloud.json
  • Windows: C:\Users\사용자이름\.coredotcloud.json

설정 파일 예시 (~/.coredotcloud.json)

{
    "API_URL": "https://mon.core.today/sentinel",
    "API_KEY": "DKWs8wl"
}
항목 설명
API_URL 데이터를 전송할 API 엔드포인트
API_KEY API 인증을 위한 키

사용 방법

1️⃣ 설정 파일 확인

API 키와 URL을 설정했는지 확인하세요.

nano ~/.coredotcloud.json

2️⃣ 모니터링 시작

coredotcloud
  • 30초마다 시스템 데이터를 수집하여 API로 전송합니다.
  • 중지하려면 Ctrl + C 를 누르세요.

📡 전송되는 데이터 형식

COREDOTCLOUD는 불필요한 데이터 크기를 줄이기 위해 리스트(JSON 배열) 형태로 데이터를 전송합니다. 백엔드에서 인덱스를 기반으로 데이터 항목을 해석할 수 있습니다.

API 요청 예시

{
    "apikey": "DKWs8wl",
    "data": [
        14.8,  # 전체 CPU 사용률 (%)
        128.0, #  메모리 (GB)
        57.78, # 사용 중인 메모리 (GB)
        46.0,  # 메모리 사용률 (%)
        3721.87, #  디스크 크기 (GB)
        10.39,   # 사용 중인 디스크 (GB)
        1.5,     # 디스크 사용률 (%)
        277.0,   # 네트워크 수신 속도 (KB/s)
        8.0,     # 네트워크 송신 속도 (KB/s)
        4,       # CPU 개수
        13.2,    # CPU 0 사용률 (%)
        14.0,    # CPU 1 사용률 (%)
        15.5,    # CPU 2 사용률 (%)
        16.8,    # CPU 3 사용률 (%)
        2,       # GPU 개수
        32.5,    # GPU 0 사용률 (%)
        8192,    # GPU 0  VRAM (MB)
        2048,    # GPU 0 사용  VRAM (MB)
        45.0,    # GPU 1 사용률 (%)
        4096,    # GPU 1  VRAM (MB)
        1024     # GPU 1 사용  VRAM (MB)
    ]
}

🖥️ 수집하는 시스템 정보

항목 설명
CPU 사용률 전체 CPU 사용률 (%)
개별 CPU 사용률 각 CPU 코어별 사용률 (%)
메모리 용량 총 메모리 (GB)
메모리 사용량 사용 중인 메모리 (GB)
메모리 사용률 메모리 사용률 (%)
디스크 용량 총 디스크 크기 (GB)
디스크 사용량 사용 중인 디스크 (GB)
디스크 사용률 디스크 사용률 (%)
네트워크 속도 최근 1초간 송/수신 속도 (KB/s)
GPU 사용률 GPU 사용률 (%) (GPU가 있으면 추가)
GPU 메모리 총 VRAM (MB) & 사용 중인 VRAM (MB)

🛠️ 에러 해결

1️⃣ 설정 파일이 없을 경우

[INFO] 설정 파일이 생성되었습니다. ~/.coredotcloud.json  수정해주세요.

해결 방법: 설정 파일을 수정하고 다시 실행하세요.

nano ~/.coredotcloud.json

2️⃣ API 전송 실패

[ERROR] 데이터 전송 실패: 요청 시간 초과

해결 방법:

  • 인터넷 연결 확인
  • API_URL이 올바른지 확인

3️⃣ GPUtil 오류 (GPU 정보가 안 나올 경우)

ModuleNotFoundError: No module named 'GPUtil'

해결 방법: gputil을 설치하세요.

pip install gputil

📜 라이선스

이 프로젝트는 MIT 라이선스를 따릅니다.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coredotcloud-0.2.0.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coredotcloud-0.2.0-py2.py3-none-any.whl (10.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file coredotcloud-0.2.0.tar.gz.

File metadata

  • Download URL: coredotcloud-0.2.0.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for coredotcloud-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f5b7e042dfb151f4b95d241d1390d57a753121e2b05b3e9602f32be7dfd48a6b
MD5 ad1de9d1ded6de8baa13e3bd7dd1bdf0
BLAKE2b-256 0a99b1693ac4a98ccf9515561f935917c25ad9b5dbeaf6d048104af10741e0b8

See more details on using hashes here.

File details

Details for the file coredotcloud-0.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: coredotcloud-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for coredotcloud-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 cdb4619627556f6ee242cea8d95e07623892be0184f2e45df1774d6d5eb80fd9
MD5 e11ab8b1a938cfbe5cffa15142aac0cd
BLAKE2b-256 1e4dcb635b6d87857d6718901c5c597496c6a9c2e45dee502332ed631d077deb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page