PDI “Last Used” not updating despite login and development activity

ShobhanaS
Giga Contributor
Hi Community,
My Personal Developer Instance was down for around four days. I started it again yesterday using Start Building, logged in successfully, and performed the following activities:
  • Elevated my role, logged in via PDI URL
  • Updated and saved an integration-user record
  • Created and saved an inbound OAuth integration using the Machine Identity Console
  • Created a new standalone custom table named PDI Activity Test to generate valid development activity
The instance is currently online, and I can see the new custom table in the Tables list, confirming that it was created successfully. However, the Developer Portal still shows Last Used: 7 days 23 hours ago, even after refreshing the browser and the Manage Instance page since last 10-12 hours.
Could someone please confirm:
  1. Is there currently a delay or known issue with the Last Used indicator?
  2. Does creating a custom table count as qualifying PDI activity or i need to do something else to log my activity?
  3. Is there any additional safe action I should take to ensure the instance is not reclaimed?
I have active configuration work in this PDI, so I want to ensure the activity is being registered correctly.
 
Thank you.
4 REPLIES 4

Simon Hendery
Tera Patron

Hi @ShobhanaS 

 

There is some interesting info about this from @l457 in this post:

https://www.servicenow.com/community/developer-forum/how-often-are-pdi-login-records-updated/td-p/36...

 

I'm also trying to work out exactly what works and what doesn't. My theory at the moment is that the update can take up to 24 hours to register. Interested to know if this happens in your case.

 

I've been trying a simple update: creating a new record.

 

I don't have a definitive answer yet. I haven't ruled out that it's inconsistent, and there's a problem related to the wider issue they are having with the entire PDI infrastructure.

 

Most importantly: make sure you back up your PDI every time you use it!

@Simon Hendery 

This is my current last used on the dev portal. I haven't logged in or even been online during the weekend or 20 hours ago.
l457_0-1793591719180.png

As I was writing this and checking when the script last executed on my pdi the above counter updated to 21 hours. The diff between now and the last finished execution was around 20h 49min at the time.

var grSysScriptExecutionHistory = new GlideRecord("sys_script_execution_history");
grSysScriptExecutionHistory.addEncodedQuery("sys_created_onRELATIVEGT@hour@ago@21^sys_created_by=developer.program.hop@snc")
grSysScriptExecutionHistory.addQuery("script", "CONTAINS", "type!=System Property^sys_updated_on<=javascript&colon;gs.daysAgoEnd(-1)^sys_updated_by!=system^sys_updated_byNOT LIKE@snc^type!=Password Reset Process^ORtype=NULL^ORDERBYDESCsys_updated_on")
grSysScriptExecutionHistory.query()
grSysScriptExecutionHistory.next()

var finished = new GlideDateTime(grSysScriptExecutionHistory.getValue("finished"));
var now = new GlideDateTime();
var duration = GlideDateTime.subtract(finished, now);

gs.info(grSysScriptExecutionHistory.getRowCount())
gs.info(duration.getByFormat('HH:mm'));

/*
*** Script: 1
*** Script: 20:49
*/

I then ran the query used to get the last update:

var list = new GlideRecord("sys_update_xml");
list.addEncodedQuery("type!=System Property^sys_updated_on<=javascript&colon;gs.daysAgoEnd(-1)^sys_updated_by!=system^sys_updated_byNOT LIKE@snc^type!=Password Reset Process^ORtype=NULL^ORDERBYDESCsys_updated_on");
list.setLimit(1);
list.query();
if (list.next()) {
	var finished = new GlideDateTime(list.getValue('sys_updated_on'));
	var now = new GlideDateTime();
	var duration = GlideDateTime.subtract(finished, now);
	gs.info(duration.getByFormat('HH:mm'));
}
//21:02

This is not an update by me but either system or admin doing 4 updates to the same federated id criteria in the span of 4 minutes. Seems to coincide with the counter updating

So I am guessing the counter updates when the telemetry is collected, and it updates to either the last updated or maybe the login event if it is more recent? The collection itself seems sporadic

l457_0-1793596624528.png

Clicking this refresh button seems to execute the script on demand and will update the timer if there is an update, just validated this. It does not reset the counter on login events, only updates.

Tejas Adhalrao
Mega Sage

hi @ShobhanaS  ,

 

 check this  reply form servicenow cummunity admin

 

TejasAdhalrao_0-1793325720550.png

TejasAdhalrao_2-1793325762682.png

 

 

 

If this helped, mark it helpful and accept the solution.

Regards,

Tejas