Restart the EAS IDOL Indexer

Bonus! I created this little guy to take care of the indexer, too.

The rest of the scripts are available here.





RestartEASIndexer.bat

:: --------------------------------------------------------------
:: This script restarts the EAS indexer and relies on the Windows
:: SysInternals tool, pskill.exe.
:: http://technet.microsoft.com/en-us/sysinternals/bb896683.aspx
:: 
:: Thom Rosario
:: 8.07.2013 -- added cache cleanup
:: 7.31.2013 -- added two subroutines for easier maintainability
:: 7.30.2013 -- v1.0
:: --------------------------------------------------------------
@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
set kill=d:\ZANTAZ\pskill.exe

set srvc=EASIDOLIndexerService
set proc=IdolIndexerService.exe
call KillService.bat EASidolindexerService
call KillProcess.bat IdolIndexerService.exe
call KillProcess.bat kvoop.exe
call KillProcess.bat EASConverter.exe

echo Removing any leftover temp files
rd /Q /S d:\temp\render
mkdir d:\temp\render

echo - - = = S T A R T I N G   I N D E X E R = = - -
sc.exe start %srvc%
echo Finished restarting EAS Indexer


Restart EAS Script

This script relies on three other batch files to do the heavy lifting of restarting EAS. I’ve set this script to run at 0600 every morning via Scheduled Tasks. Easy peasy.

The whole script is outlined here.

:: ---------------------------------------------------------------------------------
:: This script restarts EAS and relies on the Windows
:: SysInternals tool, d:\ZANTAZ\pskill.exe.
:: http://technet.microsoft.com/en-us/sysinternals/bb896683.aspx
:: 
:: Thom Rosario
:: 8.07.2013 -- added KillNotes.bat to get a clean restart on Domino Journaling
:: 7.31.2013 -- created killprocess.bat and killservice.bat subroutines for cleaner,
::              more maintainable code
:: 7.30.2013 -- added variables for better maintainability
::           -- added comments to explain the process
:: 7.29.2013 -- v1.0
:: ---------------------------------------------------------------------------------
@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
set kill=d:\ZANTAZ\pskill.exe

set srvr=WODAEAS02
call KillService.bat EASService
call KillProcess.bat eassrvr.exe
call KillProcess.bat easviews.exe
call KillNotes.bat

set srvr=WODAEAS06
call KillService.bat EASService
call KillProcess.bat eassrvr.exe
call KillProcess.bat easviews.exe

set srvr=WODAEAS07   
call KillService.bat EASService
call KillProcess.bat eassrvr.exe
call KillProcess.bat easviews.exe

set srvr=WODAEAS08
call KillService.bat EASService
call KillProcess.bat eassrvr.exe
call KillProcess.bat easviews.exe

set srvr=PMHAEASARCH01   
call KillService.bat EASService
call KillProcess.bat eassrvr.exe
call KillProcess.bat easviews.exe

set srvr=PMHAEASARCH02
call KillService.bat EASService
call KillProcess.bat eassrvr.exe
call KillProcess.bat easviews.exe

set srvr=PMHAEASARCH03
call KillService.bat EASService
call KillProcess.bat eassrvr.exe
call KillProcess.bat easviews.exe

set srvr=PMHAEASARCH04   
call KillService.bat EASService
call KillProcess.bat eassrvr.exe
call KillProcess.bat easviews.exe

set srvr=PMHAEASARCH05   
call KillService.bat EASService
call KillProcess.bat eassrvr.exe
call KillProcess.bat easviews.exe

set srvr=WODAEAS01   
call KillService.bat EASService
call KillProcess.bat eassrvr.exe
call KillProcess.bat easviews.exe

echo - - = = S T A R T I N G   E A S = = - -
sc.exe \\wodaeas01 start %srvc%
echo Waiting for EAS to start on the parent server
timeout /t 120
echo Starting EAS on WODAEAS02
sc.exe \\wodaeas02 start %srvc%
echo Starting EAS on WODAEAS06
sc.exe \\wodaeas06 start %srvc%
echo Starting EAS on WODAEAS07
sc.exe \\wodaeas07 start %srvc%
echo Starting EAS on WODAEAS08
sc.exe \\wodaeas08 start %srvc%
echo Starting EAS on PMHAEASARCH01
sc.exe \\pmhaeasarch01 start %srvc%
echo Starting EAS on PMHAEASARCH02
sc.exe \\pmhaeasarch02 start %srvc%
echo Starting EAS on PMHAEASARCH03
sc.exe \\pmhaeasarch03 start %srvc%
echo Starting EAS on PMHAEASARCH04
sc.exe \\pmhaeasarch04 start %srvc%
echo Starting EAS on PMHAEASARCH05
sc.exe \\pmhaeasarch05 start %srvc%
echo Finished restarting EAS

Kill A Windows Process Running on Another Server via Batch

This script accepts the process name as a parameter and then runs in a loop until it kills all of the matching processes. The server name and kill command are global variables set in the calling script.

The whole script is outlined here.




KillProcess.bat

:: ---------------------------------------------------------------------------------
:: This script receives a process name passed as a parameter, and then kills all
:: instances of that process on the target server
:: 
:: Thom Rosario
:: 7.31.2013 -- v1.0
:: ---------------------------------------------------------------------------------

@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
set proc=%~1
:: this is how we grab the passed parameter

:: tasklist lists all the processes running
:: /FI filters for just the process we're looking for
:: find sets errorlevel to 0 if it finds what you're looking for
:: the loop keeps running until it doesn't find the process

:KillLoop
   tasklist /S %srvr% /FI "IMAGENAME eq %proc%" 2>NUL | find /I /N "%proc%">NUL
   if "%ERRORLEVEL%"=="0" (
      echo %proc% found running
      %kill% \\%srvr% %proc%
      timeout /t 1
      goto :KillLoop
   )
echo All %proc% processes stopped
goto :EOF


Kill A Windows Service Script

I created this little tiny script for readability’s sake. I could easily have folded it into one giant batch file, but I like to document what I’m doing, and leave behind a well-polished tool for the people I work with.

This script takes the name of the service as it’s one argument and then issues a polite “stop” command via the sc.exe program. The server is a global variable available from the calling batch file, which is outlined here.




KillService.bat

:: -----------------------------------------------------------
:: This script relies on the global variables of the script 
:: that called it.  It issues a polite "stop" command to the 
:: service and returns control to the calling script.
:: 
:: Thom Rosario
:: 7.31.2013 -- v1.0
:: -----------------------------------------------------------

@echo off
set srvc=%~1

echo - - = = STOPPING %srvr% = = - -
sc.exe \\%srvr% stop %srvc%
timeout /t 3
echo %srvc% stopped on %srvr%
goto :EOF


Kill Notes

This tiny batch file uses a built in tool to kill all running Notes processes.

EAS, Autonomy’s (now an HP company) enterprise archiving product does best if it’s restarted periodically. EAS accesses either the Domino or Exchange mail servers by using Notes and Outlook client code to pull messages out of the mail store and put it aside on a file server. In the case of accessing Domino, simply restarting the EAS server sometimes leaves nlnotes.exe or other Notes processes running.

This script uses the built in Notes debug tool nsd.exe to simply do it’s job — kill all running Notes & Domino processes. It’s one step in a larger set of batch scripts that restart all of the EAS processes, available here.





KillNotes.bat

    1 :: ---------------------------------------------------------------------------------
    2 :: This script calls the Notes crash tool (nsd.exe) to kill any open Notes tasks
    3 :: so that the restart of EAS comes up clean
    4 :: 
    5 :: Thom Rosario
    6 :: 8.07.2013 -- v1.0
    7 :: ---------------------------------------------------------------------------------
    8 
    9 d:
   10 cd \"Program Files"\lotus\notes
   11 nsd.exe -kill
   12 cd \ZANTAZ
   13 


Restart EAS

EAS, Autonomy’s (now an HP company) enterprise archiving product does best if it’s restarted periodically. EAS accesses either the Domino or Exchange mail servers by using Notes and Outlook client code to pull messages out of the mail store and put it aside on a file server.

This is a series of scripts that work in conjunction with one another to restart EAS.

10.7 Mail Message View Tweak

I found this little gem today while trying to tweak Mail.app’s UI to suit my tastes.


Open ~Library/Preferences/com.apple.mail.plist

Search for:
RichMessageList

Change the true value to false

Save the .plist file and re-launch Mail

The list will have returned to the “classic” layout (and will now show the fonts in the size you want), while keeping the rest of the app in the new layout.

The down side is that you’ll lose the multi-line preview, but you can make the thing readable this way.