mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1078274 - [mozdevice] Add memtotal to getInfo with implementation in DeviceManagerADB. r=wlach
This commit is contained in:
parent
09460e99ab
commit
61900f7977
@ -112,6 +112,7 @@ class DeviceManager(object):
|
||||
- `systime` - system time of the device
|
||||
- `screen` - screen resolution
|
||||
- `memory` - memory stats
|
||||
- `memtotal` - total memory available on the device, for example 927208 kB
|
||||
- `process` - list of running processes (same as ps)
|
||||
- `disk` - total, free, available bytes on disk
|
||||
- `power` - power status (charge, battery temp)
|
||||
|
@ -514,6 +514,12 @@ class DeviceManagerADB(DeviceManager):
|
||||
ret["process"] = self.shellCheckOutput(["ps"])
|
||||
if directive == "systime" or directive == "all":
|
||||
ret["systime"] = self.shellCheckOutput(["date"])
|
||||
if directive == "memtotal" or directive == "all":
|
||||
meminfo = {}
|
||||
for line in self.pullFile("/proc/meminfo").splitlines():
|
||||
key, value = line.split(":")
|
||||
meminfo[key] = value.strip()
|
||||
ret["memtotal"] = meminfo["MemTotal"]
|
||||
self._logger.info(ret)
|
||||
return ret
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user