Okay, I'll admit it. I don't actually know what devops is. I know what developers do and what sysadmins do. Is devops just a buzzword for one person who can do both? Or does it mean something other than that?
Devops/Sysadmin Cheatsheet
21–30 of 110 posts
Re: Devops/Sysadmin Cheatsheet
#22Okay, I'll admit it. I don't actually know what devops is. I know what developers do and what sysadmins do. Is devops just a buzzword for one person who can do both? Or does it mean something other than that?
Wikipedia: http://en.wikipedia.org/wiki/Devops
In small companies it usually always exists by accident. I think the "hype" is more around large companies that have huge barriers and sometimes friction between development and IT or sustaining Operations.
Re: Devops/Sysadmin Cheatsheet
#23I would warn anyone that read this to understand what each command does before actually running anything on a machine. Things like "sudo !!" are INCREDIBLY dangerous, and I would never put that on a cheat sheet.
I suppose if you type it at any random point it might be. It's useful more when typed something that you forgot to sudo.
If you have lots of jitter and lag, i suggest using Mosh which I've found to be amazingly awesome when using it on Amtrak's spotty free wifi (3G uplink).
Re: Devops/Sysadmin Cheatsheet
#24Small nitpick/question: why put the commands in inputs? Do you edit them on that page? Or is it just to format them?
I tried to do a copy/paste on the page contents to my personal offline notebook but the most important bits, the commands, didn't paste.
Re: Devops/Sysadmin Cheatsheet
#25Quick mysql "why is my database under so much load suddenly" that doesn't rely on the slow query log:
pt-query-digest --processlist h= --interval=0.01 --print > /tmp/queries.out
pt-query-digest /tmp/queries.out
Tracking down what files exactly are filling up the disk. Go to /, and follow the big numbers: du -smc *
Combine strace (for the file handle no), lsof (for the file handle to ip/port) and netstat (to find the process on the remote host) to track RPC calls that are hung.For 'ps auxww', throw on an f to get a visual representation of child processes.
And finally, ssh tunnels (which can be chained together) to get past bastion servers easily:
Host
HostName
ProxyCommand ssh -q "nc -w 3600 %h %p"Re: Devops/Sysadmin Cheatsheet
#26 wget cachefly.cachefly.net/100mb.test -O /dev/null
check the write speed of the disk. Mostly used to check what kind of a write speed you get on the machine. dd if=/dev/zero of=iotest bs=64k count=16k conv=fdatasync && rm -rf iotestRe: Devops/Sysadmin Cheatsheet
#27> ps aux | head -1 && ps aux | sort
Is a wasteful construct and doesn't even do what is claimed "List the top 10 memory hogs". Depending on what you consider "memory" something like this is shorter and correct.
ps aux --sort=-resident|head -11
Other errors: They list same command "du -hs" for twice. I believe they meant "df -h" for "overview of all disks". Although, it's correctly overview of mounted file systems.
Re: Devops/Sysadmin Cheatsheet
#28I would warn anyone that read this to understand what each command does before actually running anything on a machine. Things like "sudo !!" are INCREDIBLY dangerous, and I would never put that on a cheat sheet.
So, what's wrong with sudo !! then?
If and only if you meant to do that, you're fine.
Re: Devops/Sysadmin Cheatsheet
#29Earlier quoted context omitted.
I suppose if you type it at any random point it might be. It's useful more when typed something that you forgot to sudo.
If you are running sudo, the long-term payoff is probably higher if you never use sudo !!. The very small chance of a huge disaster is still a lot higher than up arrow. Unless you are on a laggy connection and up arrow delays and you push it twice and end up running the wrong command! If you have lots of jitter and lag, i suggest using Mosh which I've found to be amazingly awesome when using it on Amtrak's spotty fre…
$ rm -rf /root
rm: cannot remove `root': Permission denied
$ sudo !! # Does not run this, but returns the line below.
$ sudo rm -rf /root # Then you say, "Wait I dont want to do this."Re: Devops/Sysadmin Cheatsheet
#30A little gotcha: "iptables -L" doesn't list the NAT table rules; do "iptables -L; iptables -t nat -L" instead.