mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1078274 - [mozdevice] Add memtotal to getInfo with implementation in DeviceManagerADB. r=wlach
This commit is contained in:
parent
1ba2333d39
commit
80ab08fc64
@ -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