Skip to content

Instantly share code, notes, and snippets.

View jamesfarrugia's full-sized avatar

James Farrugia jamesfarrugia

View GitHub Profile
@jamesfarrugia
jamesfarrugia / sar.sh
Created December 3, 2015 22:02
Show iface usage
#!/bin/bash
sar -n DEV 1
@jamesfarrugia
jamesfarrugia / iostat.sh
Created December 3, 2015 22:01
Show disk IO stats
#!/bin/bash
iostat -xz 1
@jamesfarrugia
jamesfarrugia / mpstat.sh
Created December 3, 2015 22:00
Show multiprocessor stats
#!/bin/bash
mpstat -P ALL 1
@jamesfarrugia
jamesfarrugia / free.sh
Created December 3, 2015 21:59
Show memory usage
#!/bin/bash
free -m
@jamesfarrugia
jamesfarrugia / pidstat.sh
Created December 3, 2015 21:58
Shiw process stats
#!/bin/bash
pidstat 1
@jamesfarrugia
jamesfarrugia / dmesg.sh
Created December 3, 2015 21:56
Show recent kernel messages
#!/bin/bash
dmesg | tail
@jamesfarrugia
jamesfarrugia / top.sh
Created December 3, 2015 21:55
Start the top process monitor
#!/bin/bash
top
#!/bin/bash
ls -la /var/log/ | grep apt
@jamesfarrugia
jamesfarrugia / jstat.sh
Last active December 3, 2015 20:18
Short command for displaying system metrics
#!/bin/bash
dstat -cdnpmgs --top-bio --top-cpu --top-mem
for (int count = 0; count < 10; count ++) /* For (<initialisation>; <looping condition>; <operation after loop>) */
{
/* do something 10 times */
}