diff options
author | Simon Rettberg | 2018-07-13 16:56:33 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-07-13 16:56:33 +0200 |
commit | 7e9a8d8c26055d9ba775a20b3983009ccc17719d (patch) | |
tree | 7f5ea1784431cc8afc179999ec54a964b26c03ed /core/modules/hardware-stats/data/opt/openslx/scripts | |
parent | [debug-report-bwlp] Include list of config.tgz files (diff) | |
download | mltk-7e9a8d8c26055d9ba775a20b3983009ccc17719d.tar.gz mltk-7e9a8d8c26055d9ba775a20b3983009ccc17719d.tar.xz mltk-7e9a8d8c26055d9ba775a20b3983009ccc17719d.zip |
[hardware-stats] Report current client runmode too
Diffstat (limited to 'core/modules/hardware-stats/data/opt/openslx/scripts')
-rwxr-xr-x | core/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update b/core/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update index 563f68b0..cb1d3e5b 100755 --- a/core/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update +++ b/core/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update @@ -29,10 +29,15 @@ TMP=$(df -P /tmp | grep -m1 ' /tmp$') TMP_SIZE=$(echo $TMP | awk '{print $2}') TMP_FREE=$(echo $TMP | awk '{print $4}') SWAP_FREE=$(grep -m1 ^SwapFree: /proc/meminfo | awk '{print $2}') +if [ -n "$SLX_EXAM" ]; then + # This isn't an actual runmode, but in case exam mode is active on a client you definitely want + # to know about it, more than other runmodes actually + SLX_RUNMODE_MODULE="exams" +fi curl -s --data-urlencode "type=~runstate" --data-urlencode "uuid=$UUID" --data-urlencode "used=$USED" \ --data-urlencode "user=$Name" --data-urlencode "tmpsize=$TMP_SIZE" --data-urlencode "tmpfree=$TMP_FREE" \ - --data-urlencode "swapfree=$SWAP_FREE" "$SLX_REMOTE_LOG" > /dev/null 2>&1 + --data-urlencode "swapfree=$SWAP_FREE" --data-urlencode "runmode=$SLX_RUNMODE_MODULE" "$SLX_REMOTE_LOG" > /dev/null 2>&1 # Warn user if tmp or swap usage is high; system might crash soon |