mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 16:37:52 +01:00
add ram size
This commit is contained in:
parent
7afbbd03f8
commit
66308a4283
1 changed files with 3 additions and 2 deletions
|
@ -217,7 +217,8 @@ app.use("/sb/i/:v/:imagePath/:img", async function (req, res) {
|
||||||
.then((txt) => getJson(txt));
|
.then((txt) => getJson(txt));
|
||||||
|
|
||||||
const cpus = os.cpus();
|
const cpus = os.cpus();
|
||||||
const totalMemory = os.totalmem();
|
const totalMemory = os.totalmem() / (1024 * 1024 * 1024);
|
||||||
|
const roundedMemory = totalMemory.toFixed(2);
|
||||||
|
|
||||||
const response = {
|
const response = {
|
||||||
pt_version: {
|
pt_version: {
|
||||||
|
@ -231,7 +232,7 @@ app.use("/sb/i/:v/:imagePath/:img", async function (req, res) {
|
||||||
codename,
|
codename,
|
||||||
config:cnf,
|
config:cnf,
|
||||||
system:{
|
system:{
|
||||||
ram:`${totalMemory / (1024 * 1024 * 1024)} GB`,
|
ram:`${roundedMemory} GB`,
|
||||||
cpu:cpus[0].model,
|
cpu:cpus[0].model,
|
||||||
},
|
},
|
||||||
packages: {
|
packages: {
|
||||||
|
|
Loading…
Reference in a new issue