SunFounder Pironman
5.3 3. Modify Configuration from Terminal
You can also view data related to the battery, fan, etc., from the Terminal.
1. The spc program runs in a python3 virtual environment. Use the following command to enter the virtual envi-
ronment:
source /opt/spc/venv/bin/activate
2. Once entered, use the following command to view the available instructions.
spc -h
usage: spc [-h] [-m] [-a] [-f [speed percentage]] [-F [{auto,quiet,normal,
˓→performance}]] [-b] [-e] [-o] [-p] [-c] [-j]
[-st [battery percentage]]
options:
-h, --help show this help message and exit
-m, --monitor open a monitor
-a, --all print all the data of spc
-f [speed percentage], --fan [speed percentage]
get/set the speed of fan
-F [{auto,quiet,normal,performance}], --fan-mode [{auto,quiet,normal,
˓→performance}]
get/set the mode of fan
-b, --battery battery voltage, current, percentage
-e, --external_input external input
-o, --raspberry_pi_power
raspberry pi voltage, current
-p, --powered power source
-c, --charge is charging
-j, --json output json format
-st [battery percentage], --shutdown-strategy [battery percentage]
get/set battery percentage for Shutdown Strategy
• For most commands, simply use spc -x to print the relevant data. For example, you can use the
following command to get the battery voltage, current, and percentage.
spc -b
• For -f, -F, -st, you can use them without parameters to get the current data. For example, use
the command below to get the current fan speed.
spc -f
• You can also use them with parameters to set values.
spc -f 40
3. View log files.
• First, enter the log directory.
5.3. 3. Modify Configuration from Terminal 35