Plesk Professional Service - How to perform Health check on Linux


2016-12-12 03:44:44 UTC


2017-08-08 13:43:55 UTC


Was this article helpful?

Have more questions?

Submit a request

Plesk Professional Service - How to perform Health check on Linux

Applicable to:

  • Plesk 12.5 for Linux

Before performing Health Check fix already known issues that customer have reported.

Health Check Service Steps

  1. Plesk core
  2. check Plesk services status and logs for errors related to Plesk services

        # grep -i ERR /usr/local/psa/admin/logs/panel.log
    # grep -i ERR /tmp/autoinstaller3.log
  3. run native repair tools to verify Plesk functionality (Plesk repair)

        # plesk repair all -n -treat-warnings-as-errors
  4. run consistency check of Plesk database and do related fixes

        # plesk repair db -n -verbose
    # plesk repair mysql -n -verbose

Warning! Do not use plesk repair tool blindly. Check if there is actual inconsistency and missing records are really unnecessary. Compare it with test installation.

  • make sure that this is possible to create objects via Plesk web interface (subscriptions, customers, domains, etc.)
  • check that scheduled tasks do work on the server (statistics per domain are up to date, scheduled backups are being created in time)

  • Web Server

  • list websites with error status codes, fix those of them which are used

Websites can be scanned for errors using below commands:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow`  mysql -uadmin psa -sN -e"select name from domains where webspace_status=0 and htype='vrt_hst'" > /root/list

# while read i; do echo "=====$i=====" >>statuses.txt;curl -k -sL -w "%{http_code}\\\

" --connect-timeout 3 "$i" -o sites/$i >> statuses.txt 2>&1;done < list- check that scripting engines shipped with Plesk are working

  1. FTP Server
  2. Create test FTP account and check if FTP users accounts can establish ftp connection
  3. check if it is possible to upload/download data via FTP

  4. Database Server

  5. check MySQL logs for errors
  6. check that database users can connect to databases
  7. check MySQL database health: mysqlcheck for MyISAM or mysqldump for InnoDB engine

        # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqlcheck -u admin -A
    • check that SQL admin software shipped with Plesk is working
  8. Mail Server

  9. check mail server logs for errors
  10. check mail authorization (pop3/imap/smtp)


generate file with list of mail accounts using command below:

    # /usr/local/psa/admin/bin/mail_auth_view  | awk -F \\| '{if ($3 !~ /D|E/) print $2,$4}' | awk '{print $1,$2}' | grep -v "^[[:space:]]*$" | awk '{if(NR>1)print}' > auth.txt

check if authorization is possible using testimap.php , testpop3.php scripts:

    # php testimap.php
# php testpop3.php

, where content of scripts:

    # cat testimap.php
error_reporting(E_ALL & ~E_NOTICE);
$auth = fopen("auth.txt", "r");
echo "auth.txt opened";
while ($accountinfo = fscanf($auth, "%s\ %s\

")) { list ($user, $pass) = $accountinfo; if ($mbox=imap_open( $authhost, $user, $pass)) { echo $user." IMAP auth OK\"; imap_close($mbox); } else { echo $user." IMAP auth FAIL!\"; } } fclose($auth); ?>

    # cat testpop3.php
error_reporting(E_ALL & ~E_NOTICE);
$auth = fopen("auth.txt", "r");
while ($accountinfo = fscanf($auth, "%s\ %s\

")) { list ($user, $pass) = $accountinfo; if ($mbox=imap_open( $authhost, $user, $pass)) { echo $user." POP3 auth OK\"; imap_close($mbox); } else { echo $user." POP3 auth FAIL!\"; } } fclose($auth); ?>


download swaks tool as the script:

    # wget

execute using auth.txt list of mail accounts generated earlier:

    # ./ auth.txt

,where content of is:

    # cat ./


while read a b
perl swaks -f $a --auth-user $a --auth-password $b -t --quit-after RCPT --server --hide-all -tlsos
if [ $? -ne 0 ]
then echo $a FAIL exit code $?
else echo $a OK
done < $FILE
  • check that webmail interface is working
Have more questions? Submit a request
Please sign in to leave a comment.