Open file check

This commit is contained in:
Ben Allfree 2024-09-05 18:45:08 +00:00
parent 4972363aea
commit 78a57c2bd6

View File

@ -30,8 +30,6 @@ export const checkHealth = async () => {
.toString()
.split(`\n`)
const openFiles = _exec(`lsof -n | awk '$4 ~ /^[0-9]/ {print}'`)
type DockerPs = {
Command: 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([
`===================`,
`Server: SFO-1`,
@ -164,7 +164,7 @@ export const checkHealth = async () => {
`Free Storage /mnt/pockethost: ${
(await drive.info(`/mnt/pockethost`)).freeGb
}GB`,
`Open files: ${openFiles.length}`,
`Open files: ${openFiles}`,
`Containers: ${containers.length}`,
])