Posts By: jonny

Plesk 8.4.0 Upgrage – httpd 100%

Scary biscuits. I upgraded Plesk base packages 8.4.0 to 8.6.0, and I usually do the base packages before the other stuff. The base update went fine so I moved on to the other available updates e.g. mailman, application vault, java ssh client, billing, real-time blacklist for qmail, pro website editor (do I really need it?)I… Read more »

Powershell Scheduled Task

To run a powershell script from a scheduled task the following can be used: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe “& ‘c:\scripts\Send-ExchangeServerSummary.ps1′”

Add Exchange Snapin to Windows Powershell

Trying to run exchange-specific commands in the windows powershell returns errors so to make the windows powershell aware of the exchange commands we need to add the appropriate snap in with: Add-PSSnapin Microsoft.Exchange.Management.Powershell.Admin That line can be added at the top of any scheduled task scripts.exchange powershell scheduled tasksimport use exchange commands in windows powershelladd… Read more »

Exchange 2007 Re-build Problem

We had a problem when re-building one of our client access / hub transport machines from scratch. The Exchange installation would not proceed as the machine existed before with the same hostname.To solve this we used the ADSI Edit snap-in in an MMC and: Right-clicked ADSI Edit and chose ‘Connect To’, then change the Naming… Read more »

Killing Memory Hogs

On an old server I temporarily added the following script as a cron job to find and kill processes using too much memory. This is just a stop gap until we get to the root of the problem. #!/bin/bashfor i in `ps -efl | grep “httpd” | awk ‘{ if ($10 > 16000) {print $4″… Read more »

Crontab -e returns a number

On a solaris system I sometimes try to edit the crontab file with crontab -e and all I get in return is a number (signifying the number of characters by the ed editor I believe). # crontab -e4025^C?The crontab file was not changed. I need to Ctrl-D to exit.To get the ball rolling again: EDITOR=vi;export… Read more »

MySQL: marked as crashed and should be repaired

I was receiving the following error message in a MySQL database. SQL Error: Table ‘./dbname/tablename’ is marked as crashed and should be repaired So first I tried: REPAIR TABLE `tablename`; However the table was still showing as crashed. Next I tried: mysqlcheck -r -u username -p databasename Which took some time as the database is… Read more »

MySQL Structure Backup

To backup / dump only the structure of a MySQL database (without the data) use the following: mysqldump -u root -p –no-data –all-databases > /var/struct_only.sql

Unix Timestamps and MySQL

Unix timestamps (the number of seconds since Jan 1st 1970) can be converted online at:http://www.unixtimestamp.comSome example dates:26 Feb 2006 19:37 114100066826 Feb 2007 19:37 117253662026 Feb 2008 19:37 120407262012 Aug 2007 12:00 1186934400I had cause to prune some old records from MySQL by unix timestamp, which I did with:USE `emaillog`;DELETE FROM `deliveries` WHERE timestamp<1186934400;19 million… Read more »

Plesk SMTP – domain isn’t in my list of allowed rcpthosts

553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)Reading http://forum.swsoft.com/showthread.php?t=8047 I set the email server settings in Plesk as suggested. Then listed the server IP/32 in addition to 127.0.0.1/32 in the white list. Making sure the servers IP and hostname are listed in the /etc/hosts file along with the loopback address