Daily Stupidity

Stupid #1:

Two bags of potato chips.  One full, the other empty.  I remove the bag clip from the empty bag, and transfer it to the new bag.  I then throw the new bag in the garbage and put the empty bag on the shelf.  I knew as I walked away that I had done something wrong but it took me almost a full minute to realize what I did.

Stupid #2:

tail -f (the “follow” option to the UNIX “tail” command) is used to print new lines to the screen as they are appended to the end of some file.  It’s tailor-made for watching logfiles.  The problem is that if tail -f is started without a TTY, it will act exactly like the regular “tail” command (i.e. just print the last 10 lines of the file and exit).  If I start it backgrounded (or foregrounded and then send SIGTSTP and background it), and then disown it, it runs fine.  If I start it with nohup from a shell, it runs fine.  If I start it with nohup from another script (say /etc/rc.local) or a launcher in GNOME, it just prints 10 lines and exits.  How can I pipe new log entries into another command to watch them?

Stupid #3:

dustpuppy, my RHEL 5.5 server, has a console problem.  Not the console-freezes-on-X-start problem (that’s still happening) but a different problem.  Even with syslogd and klogd both stopped, the kernel still prints all printk() messages to the console.  Not only that, but it prints them to ALL EIGHT virtual terminals on the console.  To the point that I can’t use the keyboard / monitor for normal computing.  I was trying to look up some manpages earlier while eating lunch and in the middle of the manpages, I would get NETFILTER messages and shit.  I had to keep doing Control-Z, clear, fg every few seconds.

Advertisements
  1. #1 by Andrew D. on May 26, 2010 - 3:08 PM

    #1 – LOL.

    #2 – At work we open a second virtual terminal and tail -f our file there, switching back and forth between the terminals to either do actions or watch the output.

    #3 – Try adding “CONSOLE=/dev/tty1” to your bootloader options (replacing “tty1” with your preferred kernel logging tty). That should force the kernel to only use the console you select as its dumping grounds.

    • #2 by Joshua on May 26, 2010 - 3:50 PM

      Seriously useful advice. Thanks, man!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: