Skip to content

Commit

Permalink
Update system.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese authored Nov 26, 2024
1 parent 80422ba commit a69135f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/modules/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export async function getDiskUsage(
// Returns a list of all processes and their memory usage
async function getProcessesMemory() {
// Get a snapshot of system CPU and memory usage
const ps = await $`docker exec --privileged -it ${os.hostname()} ps -Ao pid,pss --no-header`
const ps = await $`docker exec --privileged ${os.hostname()} ps -Ao pid,pss --no-header`

// Format snapshot data
const processes = ps.stdout.split('\n').map((line) => {
Expand Down Expand Up @@ -188,7 +188,7 @@ export async function getMemoryUsage(umbreld: Umbreld): Promise<{
// Returns a list of all processes and their cpu usage
async function getProcessesCpu() {
// Get a snapshot of system CPU and memory usage
const top = await $`docker exec --privileged -it ${os.hostname()} top --batch-mode --iterations 1`
const top = await $`docker exec --privileged ${os.hostname()} top --batch-mode --iterations 1`

// Get lines
const lines = top.stdout.split('\n').map((line) => line.trim().split(/\s+/))
Expand Down

0 comments on commit a69135f

Please sign in to comment.