Skip to content

Instantly share code, notes, and snippets.

@vanokg
vanokg / top_memory_use
Last active March 29, 2018 11:14
Кто жрет память
ps -eo size,pid,user,command | awk '{ hr=$1/1024 ; printf("%13.6f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' | sort -n | grep -v 0.000000
@vanokg
vanokg / Monitor DHCP
Last active March 2, 2020 16:31 — forked from mattm7n/gist:1405067
Monitor DHCP traffic with tcpdump
# Monitoring on interface eth0
tcpdump -i eth0 -n port 67 and port 68
@vanokg
vanokg / .bashrc
Last active August 29, 2015 14:20
.bashrc
# put timestamps in my bash history
export HISTTIMEFORMAT='%F %T '
# don't put duplicate commands into the history
export HISTCONTROL=ignoredups
# record only the most recent duplicated command (see above)
export HISTCONTROL=ignoreboth
# don't record these commands in the history; who cares about ls?