mirror of
https://github.com/pockethost/pockethost.git
synced 2025-07-06 12:52:30 +00:00
Open file check
This commit is contained in:
parent
4972363aea
commit
78a57c2bd6
@ -30,8 +30,6 @@ export const checkHealth = async () => {
|
|||||||
.toString()
|
.toString()
|
||||||
.split(`\n`)
|
.split(`\n`)
|
||||||
|
|
||||||
const openFiles = _exec(`lsof -n | awk '$4 ~ /^[0-9]/ {print}'`)
|
|
||||||
|
|
||||||
type DockerPs = {
|
type DockerPs = {
|
||||||
Command: string
|
Command: string
|
||||||
CreatedAt: string
|
CreatedAt: string
|
||||||
@ -153,6 +151,8 @@ export const checkHealth = async () => {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const openFiles = _exec(`cat /proc/sys/fs/file-nr`)[0]?.trim() || `Unknown`
|
||||||
|
|
||||||
await send([
|
await send([
|
||||||
`===================`,
|
`===================`,
|
||||||
`Server: SFO-1`,
|
`Server: SFO-1`,
|
||||||
@ -164,7 +164,7 @@ export const checkHealth = async () => {
|
|||||||
`Free Storage /mnt/pockethost: ${
|
`Free Storage /mnt/pockethost: ${
|
||||||
(await drive.info(`/mnt/pockethost`)).freeGb
|
(await drive.info(`/mnt/pockethost`)).freeGb
|
||||||
}GB`,
|
}GB`,
|
||||||
`Open files: ${openFiles.length}`,
|
`Open files: ${openFiles}`,
|
||||||
`Containers: ${containers.length}`,
|
`Containers: ${containers.length}`,
|
||||||
])
|
])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user