web site hosting

Occasionally you will have to troubleshoot server errors and problems. Many of these occur when a quota has been exceeded, log files have accumulated to fill a quota, or processes have hung.

Checking the Quota

Remember, when the quota hard limit is met, nothing can write to the disk. E-mail is not accepted, logs are not written, installs do not complete, and guestbooks and forms do not save to file. The quota has a soft limit (which you may temporarily exceed) and a hard limit (which you may never exceed), so you have time to fix the problem.

Note: If you edit files while you are over quota, you run the risk of deleting your passwd file.

Checking the Log Files

When users report problems, first check the quota, and then check the appropriate log files. Many times the error the end user is reporting is an obscure client error. Log files will give more details on the error.

It is helpful to use the tail command on a particular log file while the user duplicates the error.

(Errors that users get while they are browsing your Web site are recorded in the /www/logs/error_log file.)

Checking Processes

If you are getting errors, use the top and ps commands to check current processes. It is not uncommon to have a CGI not closing properly, thereby using all of the VPS v2 Virtual Server's capacity. Occasionally the popper (mail) process may hang when a user's connection is terminated improperly. When checking top, look at the time a process has been running. If it is idle and has been running for a long time, it may be hung and causing you some problems. For example, an FTP process can hang if the connection to your server disconnects improperly.

Contact Technical Support if all else fails. Technical Support can give the details of what was done to solve the problem, and you can keep that information for future use. Also check Enetrics Communications's Web site. The Web site features a rich support library with hundreds of pages devoted to supporting the VPS v2 Virtual Server.

Important Commands, Directories, and Files

The following table describes directories, files, and commands used to maintain your

 VPS v2 Virtual Server.

Name

Type

Description

cat /dev/null > var/log/
maillog

command

A command you can use to clear /var/log/maillog

cat /dev/null > var/log/
messages

command

A command you can use to clear /var/log/messages

cron

daemon

Daemon to execute scheduled commands

crontab –l

crontab –e

crontab -r

cron
commands

Displays cron’s copy in memory

Edit cron

Remove cron

du

command

Displays disk usage statistics; displays the file system block usage for each file argument and for each directory in the file hierarchy rooted in each directory argument. If no file is specified, the block usage of the hierarchy rooted in the current directory is displayed.

getback (filename)

command

Restores a file.

ps

command

Displays a header line followed by lines containing information about your processes that have controlling terminals. This information is sorted by controlling terminal, then by process ID. Process status

ps –ax | grep pop

sample command

Displays processes that are running POP

ps –ax | grep imap

sample command

Displays processes that are running IMAP

kill (PID number)

command

Kills a process

rotatelogs

commands

Rotates Apache (Web) logs without having to kill the Web server

vinstall savelogs

utility

Deletes Apache (Web) logs

/usr/local/etc/savelogs-nuke.conf

file

A configuration file for savelogs that you can create, after which you run the savelogs command like this:

/etc/syslog.conf

file

Determines what kinds of log messages go where. Each message has a "facility" and a "priority" or "level” Controls which log files are rotated and when

savelogs –-config=/usr/local/etc/savelogs-nuke.conf

command

Deletes Apache (Web) logs

tail -f

command

Prints the last 10 lines of a file. –f enables you to follow the file as it grows.

top

n

k

command

Displays server load, both the cumulative totals of the physical machine, and totals of the VPS v2 Virtual Server: load average, number of processes and their PIDs, CPU use in percentage, etc.

number of process

kill process

/var/log/
messages

file

Contains log of ftp and other transactions

/var/log/
maillog

file

Contains log of e-mail messages

/www/logs/
access_log

file

Contains log of Web accesses

/www/logs/
error_log

file

Contains log of Web access errors


For More Information

For more information about the topics discussed in this chapter, see the following pages on Our Web site.

Log Analysis - analog
Log Analysis - http-analyze
Log Analysis - The Webalizer
Log Analysis - awstats
Log Analysis - Urchin
Log Analysis - Webtrends

Hosting  ::  Web Design  :: Server Administration  ::  Tech Support  ::  Contacts
Data Centers  ::  Tier I Global IP Network  ::  SLA/Contracts  ::  Search  ::  Account Login