BookmarkSubscribeRSS Feed
chirumalla
Calcite | Level 5

Hi,

In LSF scheduler I have 15 jobs in one flow I need all jobs statistics in one table for client view like Job name, Start time, End time, Total time, Status. Is any option in LSF to get all statistics in single view. pls help me bit urgent.

5 REPLIES 5
LinusH
Tourmaline | Level 20

I don't know about LSF, but if you are using LSF in conjunction with DI Studio, there are plenty of tools for generate code that logs job execution.

A part from the documentation, there is a quite fresh thread on the matter:

https://communities.sas.com/message/194606#194606

Data never sleeps
TonWiegman
Calcite | Level 5

Hi We have created 2 small sas scripts and added them in sasbatch.sh.

These get the flowname, jobname, flowid and job id from the unix environment.

The first call has 0 as returncode, the second run takes the returncode from the real sas job.

In the sasscripts, the environment variables are sent to a table, which is the basis for all sorts or reporting.

With naming conventions you can build a framework.

Code to get the commandline of the flow-job-subjob:

%let host = %sysget(HOST);

%let jobid = %sysget(LSB_JOBID) ;

%let v_flow_job = %sysget(LSB_JOBNAME);

%put v_flow_job = "&v_flow_job";

%let ljob_rc= &sysparm;

%put &sysparm;

ljob_rc= "&ljob_rc";

host = "&host";

jobid = "&jobid" ;

jobfullname = "&v_flow_job" ;

flowid=left(scan("&v_flow_job",1,':'));

user=left(scan("&v_flow_job",2,":"));

flowname=left(scan("&v_flow_job",3,':'));

jobname=left(scan("&v_flow_job",4,':'));

jobsubname=left(scan("&v_flow_job",5,':'));

ldatetime=datetime();

Some of these are only available when a job is scheduled: with the LSB prefix.

sysparm is to get the returncode.

Regards,

BTW: our missing link is getting the scheduled time in, probalby from metadata.

JuanS_OCS
Amethyst | Level 16

Do you have RTM implemented in your servers?

http://support.sas.com/downloads/package.htm?pid=669

Saranya_Sub
Obsidian | Level 7
Hi Chirumalla,

i too got the same requirement to do,did you find any way to get the job and its flow into table.

Thanks
LinusH
Tourmaline | Level 20
@Saranya_Sub: this thread is almost two years old. It would be better if you start your own with your particular requirements and conditions.

My take is (in priority order):
1) Check if can make use any of the ootb functionality in Environment Manager
2) Use the collect runtime statistics option I DI Studio
3) Create tour own macros that either make use of the standard set of macro variables in DI Studio, or if you don't have that, get the log info from other information available to you in the job session.
Data never sleeps

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 3800 views
  • 0 likes
  • 5 in conversation