So at MUG tonight, I presented the "command of the month". This month I chose to present the command "nice". Rather than doing things the conventional way (like I've been one for convention. ;) ) I decided to present a poem. Without further ado, here it is:
Twas the 'nice' before Christmas and all through the house
No keyboards were stirring, not even the mouse
J sat on the couch with DS in hand
While I read a book about Linux commandsThe Christmas tree sat in the corner aglow
Outside the window the fresh fallen snow
Hot cocoa steamed on the table so sweet
Thumb cookies half-eaten (a grand Christmas treat)When suddenly my machine made such a clatter
I ran to the den to see what was the matter
The fans we all loud like a dusty P3
I hopped on the console to see what it might beThe hard drive heads swirled around the platters
The CPU fans couldn't spin an faster
Heat poured from the box, the fans whirred and screamed
Had it been water cooled, I think there'd be steam.The machine reluctantly gave up a shell
It took 5 minutes, as near as I can tell
'top' flew from my fingers, not wasting a stroke
but my speedy machine was a thrashing slow-pokeTop finally showed the full process list
Now I could see why my machine was pissed
The offsite backup to some place in Atlanta
Competing with a process named /usr/bin/santa/usr/bin/santa was up, as I feared
That and his forked off 8 /usr/bin/reindeer
The CPU was pegged, the machine couldn't cope
Killing off processes was my last hope/usr/bin/santa couldn't make it's way through
I scrambled around. "What can I do"?
But I recalled from a previous MUG meeting
A command so useful that it bears repeatingI needed to give /usr/bin/santa a little authority
and modify his scheduling priority
He needed to have some more CPU time
and not interfere with my backups onlineSo reading the manpage, I got an idea
My backups could take up the CPU rear
I didn't care when they would complete
as long as santa and they didn't competeI ran some commands as quick as I could
To see what priority my machine understood
Both santa and backup were evenly paced
neither of them would soon win this raceNice takes a number from 0 to 20
or if you are root, from -19 to 0
The lower the number, the sooner to run
And that's how you tune for scheduling funIn this scenario, there is one issue
(no need to cry, hold off on the tissue)
With backups and santa, they're currently running
To change their niceness, we'll need some more cunningrenice to the rescue, my prayers are received
this command has many tricks up it's sleeve
there's only a few that I'll show on the screen
Trying to rhyme them would be quite obsceneThe backup reniced at 20 for good measure
and /usr/bin/santa finished at it's leisure
Gone Dasher! Gone, Dancer! Gone Prancer and Vixen!
Bye, Comet! Bye, Cupid! See-ya Donner and Blitzen!And as my machine, it's fans winding down
stepped back from making that horrible sound
I noticed a text file had suddenly arrived
I fired up vim, and laughed 'til I cried"Thank you for helping me finish my mission
Now Christmas is saved, thanks to your intuition
A token of thanks, some grand Christmas Cheer
lies waiting on your system. /usr/bin/beer"Fin