X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=x4%2Fsanity_check;h=125369aa71dd3b32389c2ef6035f856f0dd154d0;hb=5bbff27d4c4195e47400c42f5c324632e7f4936a;hp=7ed1ca0f4575326a9e5640639a0031817809e24b;hpb=1fd28945d92907f2c228e3a39ae7f7c649cce6b0;p=khatus.git diff --git a/x4/sanity_check b/x4/sanity_check index 7ed1ca0..125369a 100755 --- a/x4/sanity_check +++ b/x4/sanity_check @@ -12,13 +12,17 @@ sensors_kill_all() { kill -9 $(cat $pid_file) || true rm $pid_file done - pkill khatus_x4 + pkill khatus_x4_sensor || true } sensors_fork_all() { ./bin/khatus_x4_sensor_datetime & + ./bin/khatus_x4_sensor_bluetooth& ./bin/khatus_x4_sensor_mpd & ./bin/khatus_x4_sensor_energy & + ./bin/khatus_x4_sensor_memory & + ./bin/khatus_x4_sensor_loadavg & + ./bin/khatus_x4_sensor_temp -i 1 -- -z 0 & } sensor_read_one() { @@ -35,9 +39,14 @@ sensors_read_all() { do battery_state="$(sensor_read_one ${dir}/khatus_x4_sensor_energy/out/battery_state)" battery_percentage="$(sensor_read_one ${dir}/khatus_x4_sensor_energy/out/battery_percentage)" + bluetooth_controllers="$(sensor_read_one ${dir}/khatus_x4_sensor_bluetooth/out/count_powered_controllers)" + bluetooth_devices="$(sensor_read_one ${dir}/khatus_x4_sensor_bluetooth/out/count_connected_devices)" datetime="$(sensor_read_one ${dir}/khatus_x4_sensor_datetime/out/datetime)" mpd="$(sensor_read_one ${dir}/khatus_x4_sensor_mpd/out/status)" - echo "E[${battery_state} ${battery_percentage}] [${mpd}] ${datetime}" + mem="$(sensor_read_one ${dir}/khatus_x4_sensor_memory/out/percent_used)" + load="$(sensor_read_one ${dir}/khatus_x4_sensor_loadavg/out/load_avg_1min)" + temp="$(sensor_read_one ${dir}/khatus_x4_sensor_temp/out/thermal_zone0)" + echo "E[${battery_state} ${battery_percentage}] M:${mem}% L:${load} T:${temp}°C [${mpd}] [$bluetooth_controllers $bluetooth_devices] ${datetime}" sleep 1 done }