This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# top | |
top - 14:31:20 up 35 min, 4 users, load average: 2.25, 1.74, 1.68 | |
Tasks: 71 total, 1 running, 70 sleeping, 0 stopped, 0 zombie | |
Cpu(s): 2.3%us, 1.7%sy, 0.0%ni, 0.0%id, 96.0%wa, 0.0%hi, 0.0%si, 0.0%st | |
Mem: 245440k total, 241004k used, 4436k free, 496k buffers | |
Swap: 409596k total, 5436k used, 404160k free, 182812k cached |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ iostat -x 2 5 | |
avg-cpu: %user %nice %system %iowait %steal %idle | |
3.66 0.00 47.64 48.69 0.00 0.00 | |
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util | |
sda 44.50 39.27 117.28 29.32 11220.94 13126.70 332.17 65.77 462.79 9.80 2274.71 7.60 111.41 | |
dm-0 0.00 0.00 83.25 9.95 10515.18 4295.29 317.84 57.01 648.54 16.73 5935.79 11.48 107.02 | |
dm-1 0.00 0.00 57.07 40.84 228.27 163.35 8.00 93.84 979.61 13.94 2329.08 10.93 107.02 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# iotop | |
Total DISK READ: 8.00 M/s | Total DISK WRITE: 20.36 M/s | |
TID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND | |
15758 be/4 root 7.99 M/s 8.01 M/s 0.00 % 61.97 % bonnie++ -n 0 -u 0 -r 239 -s 478 -f -b -d /tmp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for x in `seq 1 1 10`; do ps -eo state,pid,cmd | grep "^D"; echo "----"; sleep 5; done | |
D 248 [jbd2/dm-0-8] | |
D 16528 bonnie++ -n 0 -u 0 -r 239 -s 478 -f -b -d /tmp | |
---- | |
D 22 [kswapd0] | |
D 16528 bonnie++ -n 0 -u 0 -r 239 -s 478 -f -b -d /tmp | |
---- | |
D 22 [kswapd0] | |
D 16528 bonnie++ -n 0 -u 0 -r 239 -s 478 -f -b -d /tmp | |
---- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cat /proc/16528/io | |
rchar: 48752567 | |
wchar: 549961789 | |
syscr: 5967 | |
syscw: 67138 | |
read_bytes: 49020928 | |
write_bytes: 549961728 | |
cancelled_write_bytes: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lsof -p 16528 | |
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME | |
bonnie++ 16528 root cwd DIR 252,0 4096 130597 /tmp | |
<truncated> | |
bonnie++ 16528 root 8u REG 252,0 501219328 131869 /tmp/Bonnie.16528 | |
bonnie++ 16528 root 9u REG 252,0 501219328 131869 /tmp/Bonnie.16528 | |
bonnie++ 16528 root 10u REG 252,0 501219328 131869 /tmp/Bonnie.16528 | |
bonnie++ 16528 root 11u REG 252,0 501219328 131869 /tmp/Bonnie.16528 | |
bonnie++ 16528 root 12u REG 252,0 501219328 131869 /tmp/Bonnie.16528 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# df /tmp | |
Filesystem 1K-blocks Used Available Use% Mounted on | |
/dev/mapper/workstation-root 7667140 2628608 4653920 37% / |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pvdisplay | |
--- Physical volume --- | |
PV Name /dev/sda5 | |
VG Name workstation | |
PV Size 7.76 GiB / not usable 2.00 MiB | |
Allocatable yes | |
PE Size 4.00 MiB | |
Total PE 1986 | |
Free PE 8 | |
Allocated PE 1978 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
// Initiate a simple logger | |
log := logrus.New() | |
// Setup Config | |
cfg := viper.New() | |
// Set Default Configs | |
cfg.SetDefault("enable_tls", true) | |
cfg.SetDefault("listen_addr", "0.0.0.0:8443") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func TestRunningServer(t *testing.T) { | |
cfg := viper.New() | |
cfg.Set("disable_logging", true) | |
cfg.Set("listen_addr", "localhost:9000") | |
cfg.Set("kvstore_type", "redis") | |
cfg.Set("redis_server", "redis:6379") | |
cfg.Set("enable_kvstore", true) | |
cfg.Set("debug", true) | |
cfg.Set("trace", true) | |
go func() { |