Architecting, installing and maintaining your SAS environment

Executing Jobs from Batch server

Reply
Contributor
Posts: 61

Executing Jobs from Batch server

Hi All,

 

A particular job is runing everyday morning at 04:00AM , and th elog is getting created under Batchserver Logs. 

 

From management console , Schedule Manager i have deleted the flow of this particular run. Also i have deleted the backend deployed jobs as well. 

 

But still i am wandering the log is getting created everyday and exactly i need to know from where this job is getting triggered.

 

Please, anyon ehelp me on this please.

 

Thanks & Regards,

Sundeep

Super User
Posts: 3,304

Re: Executing Jobs from Batch server

Posted in reply to sandeep_reddy

If this is an LSF-scheduled job then you can go into the Platform Process Manager Flow Editor tool and right click on the flow and select Remove. 

Contributor
Posts: 61

Re: Executing Jobs from Batch server

Hello,

Thanks for the Help.

 

In my environment we dont have LSF and any LSF scheduled Jobs. 

 

Best Regards,

Sandeep

Regular Contributor
Posts: 211

Re: Executing Jobs from Batch server

Posted in reply to sandeep_reddy

If the jobs are being started with the ../BatchServer/sasbatch.sh script, then you can always echo some values to a file to give you an indication who/what is calling the script i.e. put some echos in sasbatch_usermods.sh

 

Have you checked your cron schedules ? Assuming UNIX....

Super User
Posts: 3,304

Re: Executing Jobs from Batch server

Posted in reply to sandeep_reddy

How about telling us what scheduler you are using then?

Frequent Contributor
Posts: 106

Re: Executing Jobs from Batch server

[ Edited ]
Posted in reply to sandeep_reddy

One way off the top of my head would be to use inotify to detect for the creation of the log file, use fuser get the pid of the process that has a handle on it, and then something like ps to get more info on the process and store it for later.

 

So, something like this:

 

inotifywait -m /my/config/lev/App/BatchServer/Logs -e create -e moved_to |
    while read path action file; do
        if [[ "$file" =~ myjob*.log$ ]]; then # Within quotes specify filename matching criteria
            fuser $file | xargs ps -fp > ~/myanswer.txt  # get pid, get info, get answer
        fi
    done

 I've not tested it but it should do the trick.

 

Nik

Ask a Question
Discussion stats
  • 5 replies
  • 291 views
  • 0 likes
  • 4 in conversation