unix

TwitterFacebook
Get flash to fully experience Pearltrees
sed

My favorite Linux tool in DB work is ‘iostat -x’ (and I really really want to see whenever I’m doing any kind of performance analysis), yet I had to learn its limitations and properties. For example, I took 1s snapshot from a slightly overloaded 16-disk database box: avg-cpu: %user %nice %system %iowait %steal %idle 8.12 0.00 2.57 21.65 0.00 67.66 Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s \ sda 7684.00 19.00 2420.00 498.00 81848.00 5287.00 \ avgrq-sz avgqu-sz await svctm %util 29.86 32.99 11.17 0.34 100.00 I pasted this somewhere on IRC, and got “doesn’t look too healthy” and that it is disk-bound. Now, to understand if it really is, one has to understand what iostat tells here.

iostat -x

http://dom.as/2009/03/11/iostat/
http://www.ibm.com/developerworks/aix/library/au-spunix_pipeviewer/index.html?ca=dgr-twtrPipeVeiwerdth-A&S_TACT=105AGY83&S_CMP=TWDW One of the cleverest and most powerful innovations in UNIX is the shell. It's more efficient than a GUI, and you can write scripts to automate many tasks. Better yet, the pipe operator assembles ad hoc programs right at the command line. The pipe chains commands in sequence, where the output of an earlier command becomes the input of a subsequent command.

Speaking UNIX: Peering into pipes

Tip #672: Concatenate pairs of lines

NR in awk is the current line number; % is the modulo operator, and 2 is the argument to it. Thus, if the current line number is modulo 2, the ORS is ",", and if the line number is not modulo 2, ORS is "\n". http://www.shell-fu.org/lister.php?id=672
http://www.vasudevaservice.com/documentation/how-to/converting_dos_and_unix_text_files

How to Convert DOS and UNIX text files

This site contains help pages for users of sites maintained by Vasudeva Server You can find out more about Vasudeva Server at our website http://www.vasudevaserver.org . Some pages from this site have also been moved over there - if you were directed here, perhaps you will find what you are looking for there
Introduction When you use a system often, you tend to fall into set usage patterns. Sometimes, you do not start the habit of doing things in the best possible way. http://www.ibm.com/developerworks/aix/library/au-badunixhabits.html

Learn 10 good UNIX usage habits

UNIX tips: Learn 10 more good UNIX usage habits

http://www.ibm.com/developerworks/aix/library/au-unixtips/index.html?ca=dgr-twtr10-UNIX-Wizarddth-a&S_TACT=105AGY83&S_CMP=TWDW/ Let's face it: Bad habits are hard to break. But habits that you've just become comfortable with can be even more difficult to overcome. Sometimes, a fresh look at things may provide you with an "A-ha, I didn't know you could do that!" moment.
http://utcc.utoronto.ca/~cks/space/blog/unix/UsrShareOrigin A modern Unix system carries around with it all sorts of historical relics . One of them is /usr/share , which was a relic of another era until recently (when multi-architecture machines started appearing). Once, by now long ago, disk space was a lot more limited and heavily NFS dependent networks were much more common . Because disk space was so scarce, you didn't put big locally-built programs like TeX or Emacs or the latest X Windows on every machine's disk; generally you put them in one place and NFS mounted them on everything. Also, it wasn't uncommon to be running machines of multiple architectures, so you'd need to build these programs for several architectures. A lot of programs have a bunch of files that are the same across all architectures.

Chris's Wiki :: blog/unix/UsrShareOrigin

Command-line Fu < The best UNIX commands on the web

commandlinefu.com is the place to record those command-line gems that you return to again and again. Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down. http://www.commandlinefu.com/commands/browse
http://www.athabascau.ca/html/depts/compserv/webunit/HOWTO/find.htm

Some examples of using Unix find command.

We're sorry, but the page you are looking for cannot be found. It may have been removed, had its name changed, or is temporarily unavailable.
02/28/2001 In last week's article , we viewed a PC's BIOS partition table and its Unix partition table using the fdisk and disklabel utilities. Let's continue this week by looking at the newfs utility and inode tables. http://onlamp.com/pub/a/bsd/2001/02/28/FreeBSD_Basics.html?CMP=AFC-ak_article&ATT=Understanding+Unix+Filesystems

Understanding Unix Filesystems

Find: Part Two

03/14/2002 In the last article , I introduced the Unix find command. This week, I'd like to continue by demonstrating some more of the switches that are available with this handy command. As a recap, this command was looking for any files in the current directory and its subdirectories (represented by . ) that have not been accessed for more than 7 days ( -atime +7 ) or ( -o ) that were greater than a certain size ( -size + ). I used the expr command to calculate the size for me.