Tuesday, October 18, 2011

psmail to send mails

Pretty handy!!

C:\pshome\bin\server\winx86\psmail -TO"devendra.vaidya@myeemail.com" -FROM"PeopleSoft@peoplesoft.com" -SUBJECT"give your subject" -BODY"Give your body" -FILE"filename with path" >>D:\maillogs\mail1.log

Tuesday, October 11, 2011

Script to extract last 'n' number of lines from a text file

@echo off > newfile.TXT & setLocal enableDELAYedexpansion

set N=
for /f "tokens=* delims= " %%a in (C:\TEST.TXT) do (
set /a N+=1
)
set /a X=!N!-4
set N=

for /f "tokens=* delims= " %%a in (C:\TEST.TXT) do (
set /a N+=1
if !N! gtr !X! echo %%a >> newfile.TXT
)

Wednesday, October 5, 2011

Find status of Services From command line

Use sc query

FOR /F "tokens=4 delims= " %%A IN ('SC QUERY peoplesoft ^| FIND "STATE"') DO

Process Scheduler delays in kicking the process

Seen Process Scheduler kicking off a process after a while.

its worth have a look at Heartbeat
Heartbeat : The Process Server Agent needs to track server status-running, down, or suspended. Every time it checks the server status it updates the LAST_UPD_DTTM field in the PS_SERVERDEFN table with the current date and time of the database engine. This prevents the database from accepting more than one Process Server Agent with the same name on one or multiple servers.

If there are too many processes in Error or in No Success status, it somehow affects running App Engines Clear them and check it.