[defaults]
timeout = 1
[hostinfo]
commands = ["uptime", "dmesg"]
[[profile]]
name = "default"
commands = ["uptime", "mpstat", "pidstat", "free", "vmstat", "iostat", "sar_dev", "sar_tcp"]
description = "Gives a general overview of the system"
[[profile]]
name = "mem"
commands = ["uptime", "pidstat", "free", "vmstat", "meminfo", "slabinfo"]
description = "Inspects virtual memory resources"
[[profile]]
name = "net"
commands = ["uptime", "pidstat", "vmstat", "sar_tcp", "netstat_all_tcp", "socket_stat", "tcp_mem"]
description = "Inspects network related resources"
[[command]]
name = "dmesg"
title = "Last kernel messages"
command = '''/bin/sh -c "dmesg -T | tail -20"'''
links = [
{ name = "man", url = "http://man7.org/linux/man-pages/man1/dmesg.1.html" },
]
[[command]]
name = "uptime"
title = "Current Load"
description = "Current load and uptime"
command = "/usr/bin/uptime"
links = [
{ name = "man", url = "http://man7.org/linux/man-pages/man1/uptime.1.html" },
]
# Ubunut: apt-get install sysstat
[[command]]
name = "mpstat"
title = "CPU statistics"
description = "Shows total and per CPU usage statistics "
command = "/usr/bin/mpstat -P ALL 1 5"
timeout = 6
links = [
{ name = "man", url = "http://man7.org/linux/man-pages/man1/mpstat.1.html" },
]
[[command]]
name = "pidstat"
title = "Task / process CPU statistics"
description = "Show CPU statistics per running task / process"
command = "/usr/bin/pidstat -l 1 5"
timeout = 6
links = [
{ name = "man", url = "http://man7.org/linux/man-pages/man1/pidstat.1.html" },
]
[[command]]
name = "vmstat"
title = "Virtual Memory statistics"
description = "Current memory usage and statistics in pages"
command = "/usr/bin/vmstat 1 5"
timeout = 5
links = [
{ name = "man", url = "http://man7.org/linux/man-pages/man8/vmstat.8.html" },
]
[[command]]
name = "free"
title = "Virtual memory usage"
description = "Shows virutal memory usage"
command = "/usr/bin/free -m"
timeout = 1
links = [
{ name = "man", url = "http://man7.org/linux/man-pages/man1/free.1.html" },
]
[[command]]
name = "iostat"
title = "Block device I/O statistics"
description = "Current I/O statistics per block device in KB"
command = "/usr/bin/iostat -x 1 5"
timeout = 5
links = [
{ name = "man", url = "http://man7.org/linux/man-pages/man1/iostat.1.html" },
]
[[command]]
name = "sar_dev"
title = "Network device I/O statistics"
description = "Current I/O statistics per network device in KB"
command = "/usr/bin/sar -n DEV 1 5"
timeout = 6
links = [
{ name = "man", url = "http://man7.org/linux/man-pages/man1/sar.1.html" },
]
[[command]]
name = "sar_tcp"
title = "TCP traffic and TCP error statistics"
description = "Current statistics for TCP traffic and errors"
command = "/usr/bin/sar -n TCP,ETCP 1 5"
timeout = 6
links = [
{ name = "man", url = "http://man7.org/linux/man-pages/man1/sar.1.html" },
]
[[command]]
name = "netstat_all_tcp"
title = "Show all TCP connections"
description = '''TCP connections
Recv-Q: The count of bytes not copied by the user program connected to this socket
Send-Q: The count of bytes not acknowledged by the remote host'''
command = "/bin/netstat -antp"
timeout = 1
links = [
{ name = "man", url = "http://man7.org/linux/man-pages/man8/netstat.8.html" },
]
[[command]]
name = "meminfo"
title = "Virtual memory details"
command = "/bin/cat /proc/meminfo"
[[command]]
name = "slabinfo"
title = "Kernel slab memory details"
description = "(required root privileges)"
command = "/bin/cat /proc/slabinfo"
[[command]]
name = "socket_stat"
title = "Show network socket statistics"
description = '''sockets: total sockets in-use
TCP: sockets for which TCP connection establishing failed (orphan), sockets in state time-wait, waiting for enough time to pass to be sure the remote TCP received the acknowledgment of its connection termination request, (tw) as well as memory usage (mem) in pages (usually 4 KB)
UDP: sockets used for UDP and memory usage (mem) in pages (usually 4 KB)
UDPLITE: sockets used for UDPlite -- cf. man1
RAW: raw sockets currently used
FRAG: currently unclear
'''
command = "/bin/cat /proc/net/sockstat"
links = [
{ name = "ref1", url = "https://unix.stackexchange.com/questions/419518/how-to-tell-how-much-memory-tcp-buffers-are-actually-using" },
{ name = "rfc793 - TCP, time-wait", url = "https://tools.ietf.org/html/rfc793#page-21" },
{ name = "man1", url = "http://man7.org/linux/man-pages/man7/udplite.7.html" },
]
[[command]]
name = "tcp_mem"
title = "TCP stack memory limits"
description = """vector of 3 integers: [low, pressure, high] in pages (usually 4 KB)
low: TCP doesn't regulate its memory allocation when the number of pages it has allocated globally is below this number
pressure: When the amount of memory allocated by TCP exceeds this number of pages, TCP moderates its memory consumption
high: The maximum number of pages, globally, that TCP will allocate.
vector is shown for total, read, and write buffers"""
command = '''/bin/sh -c "/bin/grep . /proc/sys/net/ipv4/tcp*mem"'''
links = [
{ name = "man", url = "http://man7.org/linux/man-pages/man8/tcp.7.html" },
]
# vim: set ft=toml: