Count of Jobs?

11 views
Skip to first unread message

aked...@gmail.com

unread,
Apr 5, 2021, 4:24:20 PM4/5/21
to schedulix
Hello, 
Is there a table/view that works best in the Schedulix database for me to get a count of the jobs in our instance?

Thank you,
Andrew

Ronald Jeninga

unread,
Apr 6, 2021, 3:26:42 AM4/6/21
to schedulix
Hi Andrew,

you're looking for the SCI_SUBMITTED_ENTITY view.
It's a view that selects from the SUBMITTED_ENTITY table but converts many columns into a human readable format.

If you use sdmsh or the "shell" offered by the GUI, you can take advantage of the extension of the Select statement I've built.
E.g.

[SYSTEM@localhost:2506] SDMS> select id, se_id, final_ts
from sci_submitted_entity
where final_ts > '2021-04-05'
with se_id job; /* the with clause here is the extension that converts ids into names */

Selected Values

ID     SE_ID                                                               FINAL_TS             
------ ------------------------------------------------------------------- ---------------------
170308 SYSTEM.ADMINISTRATION.STARTUP_MACHINES.RESUME_MACHINES              2021-04-05 02:39:25.0
170314 SYSTEM.ADMINISTRATION.BACKUP.VIRTUAL_MACHINES.REMOVE_SNAPSHOT       2021-04-05 03:05:48.0
170328 SYSTEM.ADMINISTRATION.BACKUP.VIRTUAL_MACHINES.REMOVE_OLD_TGZ        2021-04-05 03:46:31.0
170322 SYSTEM.ADMINISTRATION.BACKUP.VIRTUAL_MACHINES.DETERMINE_RUNNING     2021-04-05 02:35:33.0
170300 SYSTEM.ADMINISTRATION.BACKUP.CLIENTS.CLIENTS                        2021-04-05 04:40:25.0
170332 SYSTEM.ADMINISTRATION.BACKUP.VIRTUAL_MACHINES.CREATE_MOUNTPOINT     2021-04-05 02:39:26.0
...

The name conversion is done _after_ the select statement itself has been executed. Hence you can't use the names to filter the result set.
Joining with the SCI_C_SCHEDULING_ENTITY table (sme.se_id = se.id) will at least give you acces to the last part of the name.

Best regards,

Ronald
Reply all
Reply to author
Forward
0 new messages