This website is not maintained anymore. Please visit www.nerdgirl.dkinstead  
This page was last modified: July 27 2010 13:22:13   
Too Cool for Internet Explorer

Q&A

On this page you will find questions that I've asked and the answers I found.

Q: My *.sh files does not work anymore?

A: After a major update, I discovered that none of my *.sh files was working. It turnes out that they are disabled by default. To enable each service, you must add them to /etc/rc.conf. The comments at the top of each script, will tell you what must be added in rc.conf to enable it.

Q: How do I monitor CPU load?

A: The 'top' command will show you the current load on your servers CPU. With the help of cron and a small script, you can be notified when the load of the CPU reaches a certain limit. The scripts runs the 'top command and reports if the total CPU load reaches a certain percentage.

Copy the script from here and create it in a *.pl file at a suitable location on your server. Then get cron to run the script every 5 minutes or so.

Q: How do I un-suspend suspended jobs?

A: First use the 'jobs' command to list all suspended jobs, then use 'fg %2' to un-suspend job number 2.
A job is suspended by using [Ctrl]+[Z] on a running job. Below is an example:

Let's run a tail on a few files and then suspend the jobs

tail -f www.example.tld-error_log
^Z

Suspended

tail -f www.example.tld-access_log
^Z

Suspended

List all suspended jobs

jobs
[1] - Suspended tail -f www.example.tld-error_log
[2] + Suspended tail -f www.example.tld-access_log

Un-suspend and stop the jobs

fg %2
^C
fg %3
^C