nextcloud / nextcloud/serverinfo

XML output returns memory related values in kilo-bytes and not bytes

Open
#143 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
130
Forks
64
Avg merge
1d 1h
Merged PRs (30d)
49

Description

Expected behavior

If you use the external monitor API, all values should be returned in bytes.

Current behavior

If you use the external monitor API, all memory related values are returned in kilo-bytes instead
of bytes, because the output of /proc/meminfo is used to get the information, which is by default
returning values in kB. Compared to the freespace information this inconsistent.

# cat /proc/meminfo | grep "^Mem"
MemTotal:        8183664 kB
MemFree:          339332 kB
MemAvailable:    5807060 kB

XML output:

20190220_nc_mem_stats

Environment

Server Configuration

OS: Linux 3.16.62
Web server: Apache2 2.4.37
Database: MariaDB 10.2.21
PHP version: 7.2.14
Nextcloud version: 15.0.4
Serverinfo app version: 1.5.0

Client Configuration

Browser: Mozilla Firefox 65.0.1
Operating system: Windows 10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the external monitor API entry point that reads /proc/meminfo and produces the XML output. Compare its memory-related values with the free-space values and verify that the completed output reports memory in bytes rather than the kB units shown by /proc/meminfo.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
api, observability
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.