H-Sphere uses cron utility on Unix servers to schedule the automatic launch of the
H-Sphere scripts for updating system information, collecting traffic, analyzing logs,
etc.
To view the list of cron jobs on a server, type the following command under root on this server:
# crontab -l
Crontab enables to set the sequence and regularity of launching the scripts. To edit crontab list,
type the following command under root:
# crontab -u root -e
For more details on editing cron, read man 5 crontab.
Control Panel Server
30 5 * * * su -l cpanel -c "java psoft.hsphere.TrafficLoader"
0 4 * * * su -l cpanel -c "java psoft.hsphere.UsageLoader"
Here,
- TrafficLoader is the H-Sphere Java utility to collect the traffic
statistics from the traffic logs to the H-Sphere database.
- UsageLoader is the H-Sphere Java utility to collect disk usage statistics
into the H-Sphere database.
Web Server
*/5 * * * * nice -15 /hsphere/shared/scripts/cron/apache-restart.pl
0 1 * * * nice -15 /hsphere/shared/scripts/cron/cron_analyze.pl
0 2 * * * nice -15 /hsphere/shared/scripts/cron/cron_rotate.pl
0 3 * * * nice -15 /hsphere/shared/scripts/cron/ftp_anlz.pl
0 4 * * * nice -15 /hsphere/shared/scripts/cron/ftp_anlz_user.pl
0 6 * * * nice -15 /hsphere/shared/scripts/cron/mnogosearch_index.pl
Here,
- apache-restart.pl is the H-Sphere script to restart Apache web server; Apache is
restarted only if the /hsphere/shared/scripts/apache-reconfig script has been launched by
H-Sphere beforehand.
- cron_analyze.pl is the H-Sphere Perl script to calculate the traffic.
- cron_rotate.pl is the H-Sphere Perl script to collect and rotate user traffic
for external traffic calculation programs like Modlogan, Webalizer or Urchin.
- ftp_anlz.pl is the H-Sphere script to analyze virtual FTP traffic and
write it to the H-Sphere statistics directory.
- ftp_anlz_user.pl is the H-Sphere script to analyze FTP traffic and
write it to the H-Sphere statistics directory.
- mnogosearch_index.pl is the H-Sphere Perl script to update the
MnoGoSearch index.
DNS Server
*/1 * * * * [ "x`ps -ax |grep -v grep|grep named`" = "x" ] &&
/hsphere/shared/scripts/cron/dns_check
dns_check is the H-Sphere shell script to check DNS settings.
Mail Server
30 * * * * /hsphere/local/var/vpopmail/bin/clearopensmtp
*/20 * * * * /hsphere/local/sqwebmail/share/sqwebmail/cleancache.pl
0 3 * * * nice -15 /hsphere/shared/scripts/cron/mail_overlimit.pl
30 3 * * * nice -15 /hsphere/shared/scripts/cron/mail_anlz.sh
0 * * * * /hsphere/shared/bin/freshclam --quiet
Here,
- clearopensmtp is the vpopmail utility to clean smtp logs.
- cleancache.pl is the sqwebmail utility to clean the webmail cache.
- mail_overlimit.pl is the H-Sphere Perl script to check overlimits on
the mail boxes.
- mail_anlz.sh (mail_anlz.pl in HS 2.4.3 and lower)
is the H-Sphere Perl script to analyze qmail traffic and
place it into the H-Shere statistics directory.
- freshclam is the script to update ClamAV virus patterns.
PostgreSQL/MySQL Server
10 3 * * * nice -15 /hsphere/shared/scripts/cron/db_usage.pl
db_usage.pl is the H-Sphere Perl script to collect statistics on the
database usage for PostgreSQL and MySQL servers.
|