ServiceNow Performance Review
ServiceNow Performance Review
Allocated: 1435.0
In Use: 793.0
Free Percentage: 45
Note: Free Should be over 20%, refresh the page a few times and pay attention for free percentage.
Look under Semaphore Sets Memory and record your Default Values
Available Semaphores: 16
Look under Response Time, Client Network Time, Client Browser Time, and record your values
1. User Accounts. Are the user accounts correct? Should these users have access to
ServiceNow? (https://instance.service-
now.com/sys_user_list.do?sysparm_query=active%3Dtrue%5Esource!%3DNULL)
https://shelldevdemand.service-
now.com/sys_user_list.do?sysparm_query=active%3Dtrue%5Esource!%3DNULL
https://shell.service-
now.com/sys_user_list.do?sysparm_query=active%3Dtrue%5Esource!%3DNULL
172777
Compare with AD team, are these user accounts correct the count –
2. Local Accounts. How many active local accounts do you have? Should you have local
accounts? A local account is one that doesn't come from Active Directory, Okta, etc and has
the password stored in ServiceNow (https://instance.service-
now.com/sys_user_list.do?sysparm_query=sourceISEMPTY%5Eactive%3Dtrue)
https://shell.service-
now.com/sys_user_list.do?sysparm_query=sourceISEMPTY%5Eactive%3Dtrue
9192
4. User Licenses. Check Licensed User Accounts that haven't logged in in over 60 days
(https://instance.service-
now.com/sys_user_list.do?sysparm_query=active%3Dtrue%5Eroles%3Ditil%5Elast_login_
time%3Cjavascript%3Ags.daysAgoStart(60))
https://shelldevdemand.service-
now.com/sys_user_list.do?sysparm_query=active%3Dtrue%5Eroles%3Ditil%5Elast_login_
time%3Cjavascript%3Ags.daysAgoStart(60)
https://shell.service-
now.com/sys_user_list.do?sysparm_query=active%3Dtrue%5Eroles%3Dservicenow_base
%5Elast_login_time%3Cjavascript:gs.beginningOfLastMonth()&sysparm_first_row=1&sysp
arm_view=
https://shelldevdemand.service-
now.com/sys_user_list.do?sysparm_query=active%3Dtrue%5Eroles%3Dadmin
36 Users
https://shelldevdemand.service-now.com
/task_list.do?sysparm_query=assigned_to.active%3Dfalse%5Eactive%3Dtrue
2. Approval on Closed Tasks (https://instance.service-
now.com/sysapproval_approver_list.do?sysparm_query=sysapproval.active%3Dfalse%5Estate%3D
requested)
https://shelldevdemand.service-
now.com/sysapproval_approver_list.do?sysparm_query=sysapproval.active%3Dfalse%5Estate%3D
requested
https://shelldevdemand.service-
now.com/sysapproval_approver_list.do?sysparm_query=approver.active%3Dfalse%5Estate%3Dre
quested
4. Caller is deactivated on incidents (https://instance.service-
now.com/incident_list.do?sysparm_query=active%3Dtrue%5Ecaller_id.active%3Dfalse)
https://shelldevdemand.service-now.com
/incident_list.do?sysparm_query=active%3Dtrue%5Ecaller_id.active%3Dfalse
https://shelldevdemand.service-now.com
/sc_req_item_list.do?sysparm_query=active%3Dtrue%5Eu_requested_for.active%3Dfalse
6. Active Requests with all closed Requested Items.
findActiveRequestswithClosedItems();
function findActiveRequestswithClosedItems() {
grRequest.addActiveQuery();
grRequest.query();
while (grRequest.next()) {
grRequestedItem.addQuery("request",grRequest.sys_id);
grRequestedItem.addActiveQuery();
grRequestedItem.query();
if(grRequestedItem.getRowCount() == 0) {
gs.print(grRequest.number);
}
1. Request Stages properly set and Requests being closed at end of request
2. Work Queues show correct and appropriate tasks
3. Incidents being closed properly
4. Check the error, warning, and script logs for errors
5. Check stats.do for memory or performance issues
CODING PRACTICES
1. Check number of update sets and update set naming convention
2. Look for Descriptions in Update Sets
3. Check Default Update Set for high number of records or admins using Default update set
4. Review Code Migration Procedures
5. Tasks Created in Development instance. If you haven't locked out users from your Sandbox, Test,
Dev, UAT instance, you should check to see if they are still using Production like they should.
INTERFACES
An import not configured with coalease properly, and is importing duplicate records.
Table Rotation not configured properly, resulting in large tables. This can impact performance.
Various other imports or interfaces that are creating large tables.
You can use different Database Analysis tools with the ServiceNow ODBC Driver to find out
table row counts. However if you want to run a script to find table row counts or build a
"Table Row Counts" application within ServiceNow, this article will show you how!
grDictionary.addQuery('internal_type', 'collection');
grDictionary.addQuery('name','!=','sys_template');
grDictionary.query();
while (grDictionary.next()) {
count.addAggregate('COUNT');
count.query();
if (count.next()) {
5. Name: setTableRowCounts
7. Script:
8. setTableRowCounts();
9.
13. grTableRowCounts.query();
15. grTableRowCounts.deleteRecord();
16. }
20. grDictionary.addQuery('internal_type',
'collection');
21. grDictionary.addQuery('name','!=','sys_template');
22. grDictionary.query();
27. count.addAggregate('COUNT');
28. count.query();
29. if (count.next()) {
31. grTableRow.initialize();
33. grTableRow.u_row_count =
count.getAggregate('COUNT');
34. grTableRow.insert();
36. }
37. }
Table_Row_Counts_ServiceNowELITE.xml
One example might be duplicate user ids. Users may have duplicate user ids if the
Transform Map is coalesced off another field other than User ID. This happens in corporate
environments with multiple company mergers/partnerships where AD directories and
user name rules are not combined or determined yet.
Other times there might be a mistake in an import, discovery issue, customization mistake,
or maybe you just need to find this out for a report. Regardless of the reason to find a
"duplicate" record, these scripts may assist you.
What I do to check for "duplicate" records most often is just to run a quick background
script. This works great for testing your imports or helping to find a permanent fix to an
existing issue.
gs.print(getDuplicates('sys_user','user_name'));
function getDuplicates(tablename,val) {
gaDupCheck.addQuery('active','true');
gaDupCheck.addAggregate('COUNT',val);
gaDupCheck.addNotNullQuery(val);
gaDupCheck.groupBy(val);
gaDupCheck.query();
while (gaDupCheck.next()) {
dupRecords.push(gaDupCheck[val].toString());
}
return dupRecords;
gs.print(getDuplicates('grc_control','control_id'));
function getDuplicates(tablename,val) {
gaDupCheck.addQuery('active','true');
gaDupCheck.addAggregate('COUNT',val);
gaDupCheck.addNotNullQuery(val);
gaDupCheck.groupBy(val);
gaDupCheck.query();
while (gaDupCheck.next()) {
dupRecords.push(gaDupCheck[val].toString());
return dupRecords;
gs.print(getDuplicates('cmdb_ci_server','serial_number'));
function getDuplicates(tablename,val) {
gaDupCheck.addQuery('active','true');
gaDupCheck.addAggregate('COUNT',val);
gaDupCheck.addNotNullQuery(val);
gaDupCheck.groupBy(val);
gaDupCheck.query();
while (gaDupCheck.next()) {
dupRecords.push(gaDupCheck[val].toString());
return dupRecords;
gs.print(getDuplicates('cmdb_ci_server','ip_address'));
function getDuplicates(tablename,val) {
gaDupCheck.addQuery('active','true');
gaDupCheck.addAggregate('COUNT',val);
gaDupCheck.addNotNullQuery(val);
gaDupCheck.groupBy(val);
gaDupCheck.query();
while (gaDupCheck.next()) {
dupRecords.push(gaDupCheck[val].toString());
return dupRecords;
If you have a reoccurring duplicate record issue in your system, you can add a Left
Navigation Bar link or a Report
1. Script Includes
Name: getDuplicateUsers
Client Callable: true
Return an array of
Script:
function getDuplicateUsers() {
gaDupCheck1.addAggregate('COUNT', 'user_name');
gaDupCheck1.addNotNullQuery('user_name');
gaDupCheck1.groupBy('user_name');
gaDupCheck1.query();
while (gaDupCheck1.next()) {
dupRecords.push(gaDupCheck1.user_name.toString());
return dupRecords;
2. Module
Name: Active Duplicate User IDs
Application: user admin
Roles: admin
Order: 1200
Link Type: URL from Arguments
Arguments:
sys_user_list.do?sysparm_query=user_name=javascript:getDuplicateUsers()
3. Report
Name: Active Duplicate User IDs
Type: List
Visible to: Admin Group
Table: User [sys_user]
User ID is javascript:getDuplicateUsers()
SUPPORTING FILES
Duplicate_Record_Reports_ServiceNowELITE.xml