Skip to content

Conversation

@stargieg
Copy link
Contributor

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

Reference to Existing Issue

Alert Settings: Disk usage
Is healthy: False

"resources":
{
    "memory":{"total":124080128,"shared":491520,"free":59867136,"cached":25333760,"available":48177152,"buffered":0},
    "cpus":1,
    "disk":[
        {"filesystem":"\/dev\/root","available_bytes":0,"mount_point":"\/rom","used_percent":100,"size_bytes":4980736,"used_bytes":4980736},
        {"filesystem":"\/dev\/mtdblock6","available_bytes":356352,"mount_point":"\/overlay","used_percent":40,"size_bytes":589824,"used_bytes":233472}
    ],
    "load":[0,0.02,0],"swap":{"free":0,"total":0}
},

ubus call system board

{
	"kernel": "6.6.73",
	"hostname": "bmu-ap-ac1580",
	"system": "Qualcomm Atheros QCA9558 ver 1 rev 0",
	"model": "OpenMesh A60",
	"board_name": "openmesh,a60",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "24.10.0",
		"revision": "r28427-6df0e3d02a",
		"target": "ath79/generic",
		"description": "OpenWrt 24.10.0 r28427-6df0e3d02a",
		"builddate": "1738624177"
	}
}

Description of Changes

disk_usage exclude mountpoint /rom

```
"resources":
{
    "memory":{"total":124080128,"shared":491520,"free":59867136,"cached":25333760,"available":48177152,"buffered":0},
    "cpus":1,
    "disk":[
        {"filesystem":"\/dev\/root","available_bytes":0,"mount_point":"\/rom","used_percent":100,"size_bytes":4980736,"used_bytes":4980736},
        {"filesystem":"\/dev\/mtdblock6","available_bytes":356352,"mount_point":"\/overlay","used_percent":40,"size_bytes":589824,"used_bytes":233472}
    ],
    "load":[0,0.02,0],"swap":{"free":0,"total":0}
},

```
ubus call system board
```
{
	"kernel": "6.6.73",
	"hostname": "bmu-ap-ac1580",
	"system": "Qualcomm Atheros QCA9558 ver 1 rev 0",
	"model": "OpenMesh A60",
	"board_name": "openmesh,a60",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "24.10.0",
		"revision": "r28427-6df0e3d02a",
		"target": "ath79/generic",
		"description": "OpenWrt 24.10.0 r28427-6df0e3d02a",
		"builddate": "1738624177"
	}
}
```
@pandafy pandafy requested a review from nemesifier February 11, 2025 12:19
Copy link
Member

@devkapilbansal devkapilbansal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @stargieg
Looks good, we shouldn't add rom in disk usage. But can you please add in the description to why this change is made?

@AdUser
Copy link

AdUser commented May 21, 2025

I've made similar patch for my access points (see description in #156):

if filesystem ~= 'tmpfs' and not (string.match(filesystem, 'overlayfs') or string.match(location, '/rom')) then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

3 participants