mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Run resource metrics inside container.
This will provide a real RAM metric of the container, and not of the full system. For disk usage that won't change anything.
This commit is contained in:
parent
aaca713790
commit
b97296eb77
1 changed files with 2 additions and 2 deletions
|
@ -226,11 +226,11 @@ stop_timer () {
|
||||||
# is done via a shared memory.
|
# is done via a shared memory.
|
||||||
|
|
||||||
get_ram_usage() {
|
get_ram_usage() {
|
||||||
free -m | grep Mem | awk '{print $3}'
|
RUN_INSIDE_LXC free -m | grep Mem | awk '{print $3}'
|
||||||
}
|
}
|
||||||
|
|
||||||
get_disk_usage() {
|
get_disk_usage() {
|
||||||
LANG= df --output="used" --total -k -l | tail -n 1
|
RUN_INSIDE_LXC df --output="used" --total -k -l | tail -n 1
|
||||||
}
|
}
|
||||||
|
|
||||||
metrics_background_thread() {
|
metrics_background_thread() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue