mirror of
https://github.com/nushell/nushell
synced 2024-11-10 23:24:14 +00:00
fix sys info mem usage (#6607)
This commit is contained in:
parent
2e23d4d734
commit
d323ac3edc
1 changed files with 7 additions and 7 deletions
|
@ -276,43 +276,43 @@ pub fn mem(sys: &mut System, span: Span) -> Option<Value> {
|
|||
|
||||
cols.push("total".into());
|
||||
vals.push(Value::Filesize {
|
||||
val: total_mem as i64 * 1000,
|
||||
val: total_mem as i64,
|
||||
span,
|
||||
});
|
||||
|
||||
cols.push("free".into());
|
||||
vals.push(Value::Filesize {
|
||||
val: free_mem as i64 * 1000,
|
||||
val: free_mem as i64,
|
||||
span,
|
||||
});
|
||||
|
||||
cols.push("used".into());
|
||||
vals.push(Value::Filesize {
|
||||
val: used_mem as i64 * 1000,
|
||||
val: used_mem as i64,
|
||||
span,
|
||||
});
|
||||
|
||||
cols.push("available".into());
|
||||
vals.push(Value::Filesize {
|
||||
val: avail_mem as i64 * 1000,
|
||||
val: avail_mem as i64,
|
||||
span,
|
||||
});
|
||||
|
||||
cols.push("swap total".into());
|
||||
vals.push(Value::Filesize {
|
||||
val: total_swap as i64 * 1000,
|
||||
val: total_swap as i64,
|
||||
span,
|
||||
});
|
||||
|
||||
cols.push("swap free".into());
|
||||
vals.push(Value::Filesize {
|
||||
val: free_swap as i64 * 1000,
|
||||
val: free_swap as i64,
|
||||
span,
|
||||
});
|
||||
|
||||
cols.push("swap used".into());
|
||||
vals.push(Value::Filesize {
|
||||
val: used_swap as i64 * 1000,
|
||||
val: used_swap as i64,
|
||||
span,
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue