[nycbug-talk] Advanced UNIX Basics Management

Isaac Levy isaac at diversaform.com
Mon Sep 28 16:19:41 EDT 2009


Word,

On Sep 24, 2009, at 8:03 AM, Bjorn Nelson wrote:

> Isaac Levy wrote:
>>     + top(1) (briefly, everyone knows top...)
>>
> parallel to sar post event investigation, just dump top at 1 minute  
> intervals to a file and copy it to nfs.  Very useful/worth that  
> minimal perf impact.
>>   - management tools
>>     + kill(1), killall(1) (flags!)
>>
> stop using kill -9 first

Flags :)

Yeah- just showing folks that kill has a 7 fabby signals may change  
all sorts of behavior around here.

>> - Memory
>>   - stats/info facilities
>>     + ps(1) (flags and some handy awk parsing)
>>     + top(1) (briefly, everyone knows top...)
>>     + swapinfo(8)
>>   - management tools
>>     - swapon(8), swapoff(8)
>>
> linux just trust free + buffers + cache.  Get the devs started early  
> on understanding linux never reclaims cache.

Well, if we were writing C apps, yes- requisite- but this may not be  
so necessary in our java-heavy shop- unless you could enlighten me?  I  
could be missing a big point, from my vantage point in userland...

>
> vmstat for overall perfs and gdb for core debugging (maybe they are  
> already familiar with gdb).

Yeah, again, may not be so helpful in this java-centric shop, but I'll  
put it in the advanced section.

Thanks Bjorn-

Best,
.ike

##############################
- Userland/Kernel Structure Basics (2 minute spiel)
- man(1) is your friend, so is dmesg(8)

- Processes
   - stats/info facilities
     + using procfs(5)
     + ps(1) (flags and some handy awk(1) parsing)
     + top(1) (briefly, everyone knows top...)
     + systat(1)
   - management tools
     + kill(1), killall(1) (flags!)
     + nice(1), renice(8)

- Memory
   - stats/info facilities
     + ps(1) (flags and some handy awk parsing)
     + top(1) (briefly, everyone knows top...)
     + swapinfo(8)
   - management tools
     - swapon(8), swapoff(8)


- Disk
   - stats/info facilities
     + iostat(8)
     + df(1) and du(1)
     + lsof(8) (non-stock on many UNIX systems, but worth mention?)
     + top(1) disk i/o tricks
   - management tools
     + disk mount(8) basics
     + nfs, living with it basics
   - advanced but very useful for developers:
     + memory filesystems (creating, using)
       - disk-backed memory filesystems

--
Bonus Networking section, perhaps,

- Network
   - UNIX stats/info facilities
     + ifconfig(8)
     + netstat(1)
     + tcpdump(1)
   - UNIX management tools
     + ifconfig(8)
     + netstat(1)

- Kernel Based Advanced Profiling Tools
   + dtrace(1m), (FreeBSD, Solaris, MacOSX)
   + oprofile(1), valgrind(1) (Linux, not part of stock CentOS/Ubuntu
Install!)
   + truss(1)/strace(1) and friends
- Debuggers
   + GDB


##############################




More information about the talk mailing list