What are tools/utilities that you should absolutely know while working as a Linux or Windows Sysadmin.
I'm thinking for example about GNU/screen that you'll need if you're working on Linux servers.
What are tools/utilities that you should absolutely know while working as a Linux or Windows Sysadmin.
I'm thinking for example about GNU/screen that you'll need if you're working on Linux servers.
As a Windows Sysadmin, you absolutely need to be familiar with SysInternals. Both for programming and for diagnosing what is going on with a machine, these are invaluable.
PuTTY: A great free SSH client for Windows. Just about everywhere I've worked has used this to connect to Unix servers from Windows.
vi - I know not everyone likes it, but its pretty much going to be on any *nix server you come across, and when everything else is broken you are going to need to edit config files. I would also suggest csh and sh for the same reasons
Don't forget a sysdamin needs to get physical with their computer boxes!
You need to make sure you've got at least one
Some dude also writes about the top 10 things he/she thinks everyone should have in their toolbox.
Scripting.
I learned that even Windows' standard command shell can be really useful. No need to install PowerShell or cygwin to get a decent scripting functionality, especially when the scripts are supposed to be deployed on client machines.
There are a ton of small unix/linux tools that are helpful
grep, strace, GNU Screen, locate, rsync, sed, awk, and tripwire is pretty interesting too.
The list really goes on and on, I'm sure forgot far more than list here. Also, learn about how to configure these tools the way you want, like configuring .*rc files. This will make them all so much more useful. For example, here is my .screenrc file, since you seem interested in screen.
1 startup_message off
2 hardstatus alwayslastline
3 hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]'
4
5 # Window numbering starts at 1, not 0.
6 bind c screen 1
7 bind 0 select 10
8
9 # Default screens
10 screen -t shell1 1
11 screen -t shell2 2
12 screen -t shell3 3
Windows Tools:
In recently debugging a multicast problem I was having, I found NMap to be incredibly useful for debugging the network traffic. Wireshark was helpful as well.
The perfect companion to PuTTY for Windows users administering remote *nix machines for me is WinSCP, a perfect, small simple and really usable FTP, SCP and SFTP client.
Powershell! Powershell is a fantastic command shell for windows, built on the .NET framework.
On any platform you should be familiar with the native, and popular backup tools. Nothing bugs me worse the a sysadmin who doesn't know how to make a good backup. A good backup will save you from almost any mistake you may make.
-ntbackup on windows, dd/tar on Linux -database dump commands -tftp to backup switches/routers/devices
The shell scripting tools: bash/sh, awk, grep, head, tail, less, cat, sort, uniq, wc (and others)
Awk lets you easily analyze log files or other files which is critical when you need to diagnose a problem. Some people use perl
for this. You don't need to know everything about either tool, but you should know something, so that you can check that access log or http log and figure out if something unusual is going on.
Combine awk with sort, uniq, tail, grep, and wc to make your life pretty easy.
Mix in some shell scripting. It's super handy to be able to do things like
for i in server1.example.com server2.example.com server3.example.com ; do
xterm -e "ssh ${i} tail -f /var/log/message | grep something ";
done;
this lets you grep the logs on three servers for something
. Tricks like this save you lots of time, and it's all due to the shell scripting tools.
tail
- Available on most Linux/Unix systems lets you view the last lines of a file (or the tail end). tail -f
allows you to view new lines added to the file as they appear.
For Windows I like BareTail.
This is probably not the answer you wanted, but I just wanted to share some thoughts. In general system administration is not only about the tools, but also about mental framework you use. In short - if you know what tasks you want to do, then finding a tool to do it is pretty simple.
Basically there are few questions sysadmin has to know about the system:
Now the personal choice of the tools is .. personal.
Btw, the answer about vi is great!
m
A good editor. Doesn't matter which one, I'm certainly not here to start a flame war. But you need to learn a good editor.
I use Emacs for just about everything. Vi(m) is another good one. Not sure about what would be best in Windows, but I'm guessing the Win32 variants of the 2 I mentionned would be good.
dmidecode - Excellent for getting all sorts of information about the machine it's running on
strace - for when you can't figure out why the command you're issuing doesn't work the way you wish it did
find - There are more options to this little command than you are probably aware of. Read the man page and be enlightened
xargs - Very, very handy when you need to deal with lists of things
rsync - Knowing rsync and its various options is vital to moving data securely and quickly around your network
telnet - the humble telnet command has probably assisted me in diagnosing more network connectivity problems though the years than any other command
nmap - except maybe nmap
nc - netcat is awesome for setting up quick servers to see what clients are trying to do, or even for "telnet" using udp. Read the tutorials to see how powerful it really is
openssl's s_client Telnet over a secure connection into https servers to diagnose weirdness.
I'm sure there are a ton more I'll remember eventually. Check back for updates ;-)
I'm becoming a huge fan of DTrace, though at this point it's not available for Windows.
A few I normally use:
ps: to see the processes currently running
wc: word count. Displays new lines, words, bytes.
grep: find pattern. Match or no match (inverse match)
> for redirecting output to new file or >> to add at the end of a file.
| to chain commands together. Output of first command used on the next one.
tee: writes the input it receives to a file and it also displays the text on screen.
most common chain i use:
ps ax | grep mysql
For Windows, let's not forget NET and NETSH, you'd be lost in networks without them.
Some tools are not mandatory but make the daily life easier:
moreutils
package (deb)It has to be SSH and Putty for me: it saves so much legwork & travel it's untrue, and there's no messing with graphical settings or waiting for screen refresh :-)
On unix, dmesg. It collects all the system diagnostic messages and displays them nicely on the screen.
And yeah it's been 'obsoleted' by syslogd, but I still havent figured out how to get the syslogd setup to display things as nicely as dmesg does.