How to list all domains under a client in plesk

If you want to find out all the domains under a client in plesk then you can retrieve that information using below 2 simple  mysql queries  ::

 

[[email protected]]# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "select  id from  clients where login='clientname'";

The above command will  return  the cl_id (Client ID) and using the cl_id you can get the list of domains.

 

[[email protected]]# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "select name from domains where cl_id='6'";

That’s all, easy isn’t it.

Raid Monitoring Insatallation and Configuration

If you want to install and configure Raid Array Monitoring on your server then follow the below steps ::

Installation ::

 

[email protected][#] yum install mailx -y
[email protected][#] wget http://download1.obs.j0ke.net/hardware:/raid/openSUSE_10.3/i586/sas2ircu-5.00.00-1.1.i586.rpm
[email protected][#] rpm -ivh sas2ircu-5.00.00-1.1.i586.rpm

And once the above RPM gets installed then you can check the Raid Array Status using the below command ::

 

 [email protected][#] sas2ircu 0 DISPLAY

Use sas2ircu  –help for available options.

Configuration ::

 

Add the below simple script in the /etc/cron.daily directory so that you can receive daily notification for Raid Array Status.

 

#!/bin/sh

Email="client's email address"
echo "#############  RAID ARRAY STATUS ON `hostname` `date` #############" > /root/raidstatus

      sas2ircu 0 DISPLAY >> /root/raidstatus
echo "##############################################################" >> /root/raidstatus
  mail -s "RAID Array Status on `hostname` server :: `sas2ircu 0 STATUS | grep state | awk {'print $4'}` " $Email<  /root/raidstatus

exit 0

That’s all you are done.

Table ‘mybb_datacache’ is marked as crashed

Sometimes while upgrading the MyBB Forum you might came across this error :

 

Table 'mybb_datacache' is marked as crashed and should be repaired
 Query: SELECT title,cache FROM mybb_datacache

And if you have tried restoring the database from your backup.sql file but still getting the same error then don’t panic because this can simply be resolved from phpMyAdmin,by running the following query:

 

REPAIR TABLE mybb_datacache;

That’s all easy isn’t it .