2021-11-13 14:46:06 -08:00
|
|
|
---
|
|
|
|
id: sysinfo
|
2022-01-22 10:46:56 -08:00
|
|
|
title: System Info
|
|
|
|
sidebar_label: System Info
|
2021-11-13 14:46:06 -08:00
|
|
|
---
|
|
|
|
|
|
|
|
## SysInfo
|
|
|
|
|
|
|
|
Display SysInfo.
|
|
|
|
|
|
|
|
## Sample Configuration
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"type":"sysinfo",
|
2022-02-06 04:52:10 -08:00
|
|
|
"powerline_symbol": "\ue0b0",
|
2021-11-13 14:46:06 -08:00
|
|
|
"foreground": "#ffffff",
|
|
|
|
"background": "#8f43f3",
|
2022-03-27 01:12:47 -07:00
|
|
|
"template":" \uf85a {{ round .PhysicalPercentUsed .Precision }}% ",
|
2021-11-13 14:46:06 -08:00
|
|
|
"properties": {
|
2022-03-27 01:12:47 -07:00
|
|
|
"precision": 2
|
2021-11-13 14:46:06 -08:00
|
|
|
},
|
|
|
|
"style":"powerline"
|
|
|
|
},
|
|
|
|
```
|
|
|
|
|
|
|
|
## Properties
|
|
|
|
|
|
|
|
- Precision: `int` - The precision used for any float values - defaults to 2
|
|
|
|
|
2022-02-01 03:10:46 -08:00
|
|
|
## Template ([info][templates])
|
|
|
|
|
|
|
|
:::note default template
|
|
|
|
|
|
|
|
``` template
|
|
|
|
{{ round .PhysicalPercentUsed .Precision }}
|
|
|
|
```
|
|
|
|
|
|
|
|
:::
|
|
|
|
|
|
|
|
### Properties
|
2021-11-13 14:46:06 -08:00
|
|
|
|
|
|
|
- `.PhysicalTotalMemory`: `int` - is the total of used physical memory
|
2022-05-02 04:18:50 -07:00
|
|
|
- `.PhysicalAvailableMemory`: `int` - is the total available physical memory (i.e. the amount immediately available to processes)
|
|
|
|
- `.PhysicalFreeMemory`: `int` - is the total of free physical memory (i.e. considers memory used by the system for any reason
|
|
|
|
[e.g. caching] as occupied)
|
2021-11-13 14:46:06 -08:00
|
|
|
- `.PhysicalPercentUsed`: `float64` - is the percentage of physical memory in usage
|
|
|
|
- `.SwapTotalMemory`: `int` - is the total of used swap memory
|
2022-02-19 05:24:54 -08:00
|
|
|
- `.SwapFreeMemory`: `int` - is the total of free swap memory
|
|
|
|
- `.SwapPercentUsed`: `float64` - is the percentage of swap memory in usage
|
2021-11-13 14:46:06 -08:00
|
|
|
- `.Load1`: `float64` - is the current load1 (can be empty on windows)
|
|
|
|
- `.Load5`: `float64` - is the current load5 (can be empty on windows)
|
|
|
|
- `.Load15`: `float64` - is the current load15 (can be empty on windows)
|
|
|
|
- `.CPU`: `[]struct` - an array of [InfoStat][cpuinfo] object, you can use any property it has e.g. `(index .CPU 0).Cores`
|
2022-02-06 04:52:10 -08:00
|
|
|
- `.Disks`: `[]struct` - an array of [IOCountersStat][ioinfo] object, you can use any property it has e.g. `.Disks.disk0.IoTime`
|
2021-11-13 14:46:06 -08:00
|
|
|
|
|
|
|
[cpuinfo]: https://github.com/shirou/gopsutil/blob/78065a7ce2021f6a78c8d6f586a2683ba501dcec/cpu/cpu.go#L32
|
2022-02-06 04:52:10 -08:00
|
|
|
[ioinfo]: https://github.com/shirou/gopsutil/blob/e0ec1b9cda4470db704a862282a396986d7e930c/disk/disk.go#L32
|
2022-04-20 09:43:59 -07:00
|
|
|
[templates]: /docs/configuration/templates
|