Keresés

Új hozzászólás Aktív témák

  • Fifi

    őstag

    válasz soldi3r #58477 üzenetére

    Nincs semmi varázslat, így működik.

    Az aksi gyártója: cat /sys/devices/platform/smapi/BAT0/manufacturer
    Az aksi típusa: cat /sys/devices/platform/smapi/BAT0/model
    Első használatba vétel időpontja: cat /sys/devices/platform/smapi/BAT0/first_use_date
    Névleges kapacitása: cat /sys/devices/platform/smapi/BAT0/design_capacity
    Utoljára feltöltve teljes kapacitása: cat /sys/devices/platform/smapi/BAT0/last_full_capacity
    Feltöltési ciklusok száma: cat /sys/devices/platform/smapi/BAT0/cycle_count
    Aktuális állapot: cat /sys/devices/platform/smapi/BAT0/state
    Jelenlegi töltöttség százalékban: cat /sys/devices/platform/smapi/BAT0/remaining_percent
    Hátralévő idő a teljes töltöttséghez: cat /sys/devices/platform/smapi/BAT0/remaining_charging_time

    20% alatt kezdjen tölteni:
    sudo echo 20 > /sys/devices/platform/smapi/BAT0/start_charge_thresh

    50%-nál fejezze be a töltést.
    sudo echo 50 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh

    Ha ezt egy file-ba lemented és lefuttatod

    #!/bin/bash

    manufacturer="$(cat /sys/devices/platform/smapi/BAT0/manufacturer)"
    model="$(cat /sys/devices/platform/smapi/BAT0/model)"
    first_use_date="$(cat /sys/devices/platform/smapi/BAT0/first_use_date)"
    design_capacity="$(cat /sys/devices/platform/smapi/BAT0/design_capacity)"
    last_full_capacity="$(cat /sys/devices/platform/smapi/BAT0/last_full_capacity)"
    capacity="$(echo "scale=2; ${last_full_capacity} * 100 / ${design_capacity}" | bc)"
    cycles="$(cat /sys/devices/platform/smapi/BAT0/cycle_count)"
    state="$(cat /sys/devices/platform/smapi/BAT0/state)"

    percent="$(cat /sys/devices/platform/smapi/BAT0/remaining_percent)"
    charging_start="$(cat /sys/devices/platform/smapi/BAT0/start_charge_thresh)"
    charging_stop="$(cat /sys/devices/platform/smapi/BAT0/stop_charge_thresh)"
    remaining_charging_time="$(cat /sys/devices/platform/smapi/BAT0/remaining_charging_time)"

    clear
    echo "The $manufacturer $model battery has been using since $first_use_date: ${state}"
    echo " - current status: ${percent}%"
    echo " - charging start: ${charging_start}%"
    echo " - charging stop: ${charging_stop}%"
    if [ "${remaining_charging_time}" != "not_charging" ]
    then echo " - remaining charging time: ${remaining_charging_time} minute"
    fi
    echo "After ${cycles} cycles the battery has ${capacity}% of design capacity."

    , akkor az alábbi kimenetet kapod:
    The Panasonic 42T4833 battery has been using since 2010-04-20: charging
    - current status: 52%
    - charging start: 80%
    - charging stop: 84%
    - remaining charging time: 465 minute
    After 46 cycles the battery has 95.26% of design capacity.

    Bye, Fifi

  • chab7

    addikt

    válasz soldi3r #58477 üzenetére

    Szuper! Köszi.
    Ez alapján találtam is az arch wikin nekem szóló írást. Kíváncsi leszek beválik-e.

Új hozzászólás Aktív témák