Script to clear semaphore array

Semaphores are for solving multi-threading problems in which multiple processes compete for the same operating system resources.

You can check the semaphore using the following command:

ipcs -s

You can use the below simple script to run manually to clear the semaphore activity; also you can use it to set as cron to clear semaphore in a timely manner.

=========

for i in `ipcs -s | awk ‘{print $2}’`; do ipcrm sem $i; done

=========

 

Sophie error in exim

When you review exim_mainlog and found the following error.

================

malware acl condition: unable to connect to sophie UNIX socket (/var/run/sophie)

================

Here we got the clamd error where they unable to connect to UNIX socket /var/clamd

This can be solved by adding the following parameter in exim.conf file.

================

av_scanner = clamd:/var/clamd

================

Also try make a directory or touch a file named “/var/clamd”

Then restart exim, done!!