Bentley Communities
Site
Search
User
Site
Search
User
Product Communities
AssetWise
Asset Reliability | AssetWise APM
Cancel
Asset Reliability | AssetWise APM
Asset Reliability | AssetWise APM Wiki
Bat file to stop and start APM Server Services
Sign In
Asset Reliability | AssetWise APM requires membership for participation - click to join
-
AssetWise APM - Support Solutions
Introduction to APM Support
Techniques for Reporting an APM Service Request
-
APM Implementation and Performance Management
+
Area - Wiki Templates
+
Area - Application Administration
+
Area - Application Setting
Area - Asset Health
+
Area - Assets
+
Area - Data Processing
+
Area - Diagnostic tools and logging
+
Area - Documents and Attachments
+
Area - EAM Enterprise Asset Management
+
Area - Enterprise Data Management
+
Area - Inspection Management
+
Area - Installation and Upgrade
+
Area - Integration and InterOperability
+
Area - Licensing, Authentication and User Login
+
Area - Microsoft Office data export and import
+
Area - Mobile Computing
+
Area - ODC
+
Area - Performance Management and Analytics
+
Area - Reliability Program
-
Area - Scripts and Tools
Bat file to stop and start APM Server Services
Providing scripts to by-pass business logic for Invoicing against a PO
Updating the “Next number” formatting field in APM.
Mass data changes that cannot be made with replace function
+
Area - Server Manager and Services
+
Area - Strategy Development
+
Area - System Performance and Tuning
+
Area - User Interface and common elements
+
Area - Work Management
+
Area - APM Known Issues
Asset Change Request - to include physical location of Asset
Assetwise Interop Auto-generated Request for Work based on Solution Package is not sending to SAP
Asset Removal dialogue window APM Remote is cut off
Attribute has been set as Read-Only error
AWEIS/Interop users experiencing auto-acknowledgement for high level alarms
BECS on-premise server connection issues
Bentley Connect User cannot login to Thick Client with Admin Privileges
Bentley Mobile Inspections does not appear to have been updated post hotfix or version upgrade
Bin / Storage Location hyphens removed post upgrade to release 7 17
Boolean type Indicator Readings fail due to data type difference in ODC On Prem data source vs APM
Calculated indicators not calculating if asset status of non-operational
Cannot create new Employee, Asset, etc in new installs using apminstall.bak database because Assetwise Interoperability is Active by default
Changing Parent taking a very long time
Checksheet data lost upon upload
Checksheets stopped generating after upgrading to Oracle 19
Close Completed Task scheduled action fails to complete
Comparative analysis 4D trends of selected 4D indicators remain blank.
Copy PO Line does not carry over Price and Price UOM from source PO Line
Could not initialize APM Remote Computers due to EXP Remote - Initialization Download Package being deleted
Count sheet created with count group filter is not showing any items to be counted
Dashboard is not visible for certain users
Data difference post upgrade cannot load in the datadiff executable
Data loader - Configuration Subscription Error
Database error message indicates a missing table post upgrade
Database out-of-memory error during upgrade
+
Database Performance
Dataloader allows duplicate entries of the indicators to be added to Standard Task?
Default to Normal not working from Checksheet Readings view on APM Mobile Inspections
Degradation Indicator shows wrong corrosion rate
Deleting Events does not change Priority in Request for Work on a Checksheet
Disabling allow switch mobile computers blocks upload transaction call from APM Mobile Inspections
Does APM SQL Express 2016 service pack 3
Error reported that services cannot get Ultimate ID
Excessive blocking in the database
Extra charges on Invoices are charged to parent site not the PO's owning site
Fluid Condition Sample Receipt Verification is not accepted due to previously received sample
Force user login via APM Smart-client and APM Remote client
Frequent system crashes due to - AccessViolation Mobile
General performance advice on infra maintenance
Generic Database Connector error when testing Service after upgrade
Group by on large data set not working properly
How to create a new table configuration to display list of all maintenance action plan indicators and failure modes
How to make the mobile computer to be selected automatically while initializing remote client
How to secure communications between APM Clients and Servers
How to Undo "Remember me" option
Image file on Asset does not display
In SAP Gateway (CMMS Interoperability) environment APM fails to create Notification in SAP via alarm acknowledgement due to failed redirect
Inactive Handheld (PDA) Mobile Computers assigned to an employee interfere with New Android/IOS Mobile Synchronization assigned to same employee
Inbound Aweis Messages processing slowly into APM
Incorrect or missing photo thumbnail references on checksheet configurations and reports
Indicator alarm doesn't disappear after acknowledging if Indicator Window is open when acknowledging
Indicator Readings dataloader for numeric and descriptive indicators
Indicator Template Mass Update (Copy To) loops when trying to push Indicator States to Indicators with readings
Inspection Photos configuration is not showing photos even when photos have been selected for inclusion in the Inspection Report
Integrating APM data with PowerBI Dashboard
Invoice missing extra charges.
Invoicing error liability quantity is not correct
Issues with newly added Unit of Measures
Java SAP Middleware unable to consume xsd due to duplicate namespace reference
Label printing takes much longer than expected
License is disabled shortly after initial APM Environment setup
Log on to APM fails after change to CONNECT ID
Logging error when CharacteristicMapSet to use for InteropWorkRequests not set
MAP Indicator Data Loader errors when loading indicators with the same name
Materials Issue error: You cannot choose Asset from this site
Mobile computing activity percentage completion does not match the checksheet percentage completion
Mobile Inspection replaces entered reading value with enforced limit value
Mobile Inspections application shows a Bad Request error
Mobile Inspections crashes after running for longer than an hour due to token expiry
Multiple Indicators integrated with 4D Analytics have duplicate, triplicate, etc readings
Multiple Measurement Point entered on Mobile Inspections not attributed to data collector logged into Mobile
Multiple Measurement Point Indicators - number of MP's on the Excel Checksheet
New / Browse Indicator buttons on Maintenance Action Plans suffering apparent state refresh issue
Next Job Triggers based on WO closed date instead of completion date
NSIS fails to install from APM Configuration tool
Null pointer Error while removing Documents
Obsolete indicator states - KPI Range lower limit error
Oracle - APM Application Service does not start
Oracle database outage corrupted Remote Download Package Generated SQL
Outside diameter, not nominal diameter used to calculated structural minimum thickness
Post update user is unable to persist certain objects due to primary key duplication
Probability of Failure selection dropdown is unavailable
Process inbound messages scheduled action hangs when mandatory reading is blank or percentage completion not met
Processing Job fails to push ABC Indicator update via CMMS Interoperability/SAP Gateway
Production loss event Ended on date and Duration are not updating.
Purchase Notification Email for Store Individuals
Random checksheets don't auto generate
Remote Download error - Unclosed quotation mark after the character string '%$au'
Remote Synchronization error referencing bad settings post update of APM
Repetitive Checksheets seem to disappear from APM Mobile Inspection during synchronization
Resolving Create Unique Index UserGroup on OQ.UserGroup in Remote download
Schedule a restart of the APM/Ivara Services
Schema generation hangs due to insufficient resource
Secondary Hierarchy missing child asset details
Session management server idle time setting will result in services going stale
Single user can't log in to APM with CONNECT Credentials
Slow data load due to insufficient resources
Slow query results from lack of database maintenance
Slow response when entering characters in the search field in APM Mobile Inspections for Android
Slow synchronization and slow performance of IOS Mobile Inspection due to linked photos
smart client and thick client date selector is not working properly
Smart Client cannot connect to APM Server Manager after update
Smart client crashes on long query due to obsolete ODBC driver and limited RAM
Smart client crashes when navigating to Data Management\ Multi-Language Strings tab
Smart Clients start crashing on launch after Windows update
SmartClients suddenly fail to connect to Bentley Hosted APM Server Manager
Standard Job triggering 1st of every month
Standard Task next due date based on frequency is not setting correctly nor updating as expected
Steps to Create New APM Users
Submit Product Improvement Suggestion for Assetwise APM
Susceptibility Questionnaires overwritten when customizations migrated via the Environment Migration Wizard (EMW)
Thick client Forms Editor freezes if you dropdown certain combos in Properties
Thick Client Functionality
Thick Client install errors due to mismatch in CustomMethods dll
This is a potential memory leak error
UI fails to load for UOM Category dialogue
Unable to send APM objects through email
Unable to transfer asset between sites
UOM parameter error on APM Remote
Updating the API key will cause Interop service to fail if not updated on the service
User can no longer send link to an APM PO via outlook email despite previously being able to do so
User receives database access error on attempt at logon to Server Manager
Users getting error while opening PDF or any other attachments in APM
Using Replace functionality on Indicator States tab does not complete all changes on first attempt.
Using same computer name for multiple physical devices (Android or IOS) leads to duplicate indicator readings and large processing backlog
View is missing a Browse button post upgrade
VM upgrade to Windows Server 2019 - running APM 7.11
Web monitor Certificate Error: The security certificate presented by this website was issued for a different website's address
What IP addresses need to be whitelisted to allow APM Mobile Inspections through the firewall
Where to find server stale status in database
Why aren't all relationships available for use when building a configuration
Windows domain controllers Active Directory (AD) schema upgrading from version 47 to 87
Work Order Triggering based on Indicator Alarm
Work Type isn't selectable in follow-up Work
+
Working with Solution Packages in APM
XML data used in a configuration will crash application service and lead to stale servers
+
APM Mobile Inspections
+
AssetWise Reliability (APM) OData API
+
Lift & Shift to Hosted
+
Release Documentation
+
APM Support Alerts
Remote session is being created every minute and not being released
Questions about this article, topic, or product? Click here.
Bat file to stop and start APM Server Services
Product(s):
APM Implementation and Performance Management
Version(s):
R6.0+
Environment:
N\A
Area:
N/A
Subarea:
N\A
Below is a sample command file that can be used to programmatically shutdown all APM Server services on a server and then restart them.
Please set variables as appropriate and save the whole thing as a .bat file. This command file can be scheduled to run via Windows Task Scheduler. When scheduling the task, pick a time when you know there is no activity on the server, making sure that it does not coincide with any of your scheduled actions.
Solution
@echo off
@echo.
REM -
IMPORTANT SECTION - VARIABLES TO BE FILLED OUT FOR YOUR ENVIRONMENT!!!!!!!!!!!!!!!!!!!!
REM -
put the service names in the brackets below, separated by spaces
set SERVICE_LIST=(
IvaraServerService1 IvaraServerService2...)
REM -
set the location where you want the shutdown failure dump files to go
set SHUTDOWN_ERROR_DUMP_DIRECTORY="C:\ProgramData\IvaraLogs\dumps\Shutdown Failures"
REM -
set the location of adplus.exe for taking dump files
set ADPLUS_EXE="C:\Program Files\Debugging Tools for Windows (x64)\adplus.exe"
set SECONDS_TO_WAIT_FOR_SERVICES_TO_STOP=600
REM -
NOTE THAT THE FOLLOWING DELAY (SECONDS_TO_WAIT_FOR_ADPLUS_TO_CREATE_DUMP_FILES) HAPPENS TWICE because we create dump files twice (in case you are calculating total time needed)
set SECONDS_TO_WAIT_FOR_ADPLUS_TO_CREATE_DUMP_FILES=300
set SECONDS_TO_WAIT_BEFORE_TAKING_SECOND_DUMP_FILE=120
set SECONDS_TO_WAIT_FOR_TASKKILL_TO_COMPLETE=60
REM - END OF IMPORTANT SECTION - VARIABLES TO BE FILLED OUT FOR YOUR ENVIRONMENT!!!!!!!!!!!!!!!!!!!!
REM - DESCRIPTION OF STEPS TAKEN IN THIS BATCH FILE
REM - STEP 1: Stop all services in defined in SERVICE_LIST
REM - STEP 2: Wait %SECONDS_TO_WAIT_FOR_SERVICES_TO_STOP% seconds for all of the services to stop
REM - STEP 3: Check if any instances of IvaraServer.exe are still running
REM - SUBSEQUENT STEPS ONLY HAPPEN IF IVARASERVER FAILS TO SHUT DOWN
REM - STEP 4: Set all services in SERVICE_LIST to not restart automatically (so they won't restart after the taskkill)
REM - STEP 5: Take a dump file for any instances of IvaraServer that are still running
REM - STEP 6: Wait %SECONDS_TO_WAIT_FOR_ADPLUS_TO_CREATE_DUMP_FILES% to allow adplus to finish creating the dump files
REM - STEP 7: Wait %SECONDS_TO_WAIT_BEFORE_TAKING_SECOND_DUMP_FILE% before adplus takes a second dump file
REM - STEP 8: Take a second dump file for any instances of IvaraServer that are still running
REM - STEP 9: Wait %SECONDS_TO_WAIT_FOR_ADPLUS_TO_CREATE_DUMP_FILES% to allow adplus to finish creating the second dump file
REM - STEP 10: Taskkill any instances of IvaraServer.exe
REM - STEP 11: Wait %SECONDS_TO_WAIT_FOR_TASKKILL_TO_COMPLETE% before changing the service properties to restart (just to be safe so we don't get service restarting based on timing of taskkill)
REM - STEP 12: Reset all services in SERVICE_LIST to automatically restart 60 seconds after crashing
REM - STEP 13: Start all services in defined in SERVICE_LIST
REM - END DESCRIPTION OF STEPS TAKEN IN THIS BATCH FILE
REM - STEP 1: Stop all services in defined in SERVICE_LIST
@echo STEP 1: Stop all services in defined in SERVICE_LIST
for %%i in %SERVICE_LIST% do (
net stop %%i
)
REM - STEP 2: Wait %SECONDS_TO_WAIT_FOR_SERVICES_TO_STOP% seconds for all of the services to stop
@echo STEP 2: Wait %SECONDS_TO_WAIT_FOR_SERVICES_TO_STOP% seconds for all of the services to stop
timeout /t %SECONDS_TO_WAIT_FOR_SERVICES_TO_STOP%
@echo.
REM - STEP 3: Check if any instances of IvaraServer.exe are still running
@echo STEP 3: Check if any instances of IvaraServer.exe are still running
tasklist /nh /fi "imagename eq ivaraserver.exe" | find /i "ivaraserver.exe" >nul && (
@echo There is at least one IvaraServer still runnning.
) || (
@echo.
@echo There are no IvaraServer instances still runnning. Done.
GOTO :
RESTART
)
REM - If we get in here, IvaraServer.exe is still running
@echo There is at least one instance of IvaraServer.exe still running after attempting to stop all of the services
REM - STEP 4: Set all services in SERVICE_LIST to not restart automatically (so they won't restart after the taskkill)
@echo STEP 4: Set all services in SERVICE_LIST to not restart automatically (so they won't restart after the taskkill)
for %%i in %SERVICE_LIST% do (
@echo Setting service %%i to no longer restart automatically
sc failure %%i reset= 500 actions= ""
@echo.
)
REM - create the directory %SHUTDOWN_ERROR_DUMP_DIRECTORY% (in case it does not exist)
mkdir %SHUTDOWN_ERROR_DUMP_DIRECTORY%
REM - STEP 5: Take a dump file for any instances of IvaraServer that are still running
@echo STEP 5: Take a dump file for any instances of IvaraServer that are still running
%ADPLUS_EXE% -hang -pn IvaraServer.exe -o %SHUTDOWN_ERROR_DUMP_DIRECTORY%
@echo.
REM - STEP 6: Wait %SECONDS_TO_WAIT_FOR_ADPLUS_TO_CREATE_DUMP_FILES% to allow adplus to finish creating the dump files
@echo STEP 6: Wait %SECONDS_TO_WAIT_FOR_ADPLUS_TO_CREATE_DUMP_FILES% to allow adplus to finish creating the dump files
timeout /t %SECONDS_TO_WAIT_FOR_ADPLUS_TO_CREATE_DUMP_FILES%
@echo.
REM - STEP 7: Wait %SECONDS_TO_WAIT_BEFORE_TAKING_SECOND_DUMP_FILE% before adplus takes a second dump file
@echo STEP 7: Wait %SECONDS_TO_WAIT_BEFORE_TAKING_SECOND_DUMP_FILE% before adplus takes a second dump file
timeout /t %SECONDS_TO_WAIT_BEFORE_TAKING_SECOND_DUMP_FILE%
@echo.
REM - STEP 8: Take a second dump file for any instances of IvaraServer that are still running
@echo STEP 8: Take a second dump file for any instances of IvaraServer that are still running
%ADPLUS_EXE% -hang -pn IvaraServer.exe -o %SHUTDOWN_ERROR_DUMP_DIRECTORY%
@echo.
REM - STEP 9: Wait %SECONDS_TO_WAIT_FOR_ADPLUS_TO_CREATE_DUMP_FILES% to allow adplus to finish creating the second dump file
@echo STEP 9: Wait %SECONDS_TO_WAIT_FOR_ADPLUS_TO_CREATE_DUMP_FILES% to allow adplus to finish creating the second dump file
timeout /t %SECONDS_TO_WAIT_FOR_ADPLUS_TO_CREATE_DUMP_FILES%
@echo.
REM - STEP 10: Taskkill any instances of IvaraServer.exe
@echo STEP 10: Taskkill any instances of IvaraServer.exe
taskkill /f /im IvaraServer.exe
@echo.
REM - STEP 11: Wait %SECONDS_TO_WAIT_FOR_TASKKILL_TO_COMPLETE% before changing the service properties to restart (just to be safe so we don't get service restarting based on timing of taskkill)
@echo STEP 11: Wait %SECONDS_TO_WAIT_FOR_TASKKILL_TO_COMPLETE% before changing the service properties to restart (just to be safe so we don't get service restarting based on timing of taskkill)
timeout /t %SECONDS_TO_WAIT_FOR_TASKKILL_TO_COMPLETE%
@echo.
REM - STEP 12: Reset all services in SERVICE_LIST to automatically restart 60 seconds after crashing
@echo - STEP 12: Reset all services in SERVICE_LIST to automatically restart 60 seconds after crashing
for %%i in %SERVICE_LIST% do (
@echo Setting service %%i to restart automatically 60 seconds after crashing
sc failure %%i reset= 500 actions= "restart/60000/restart/60000/restart/60000"
@echo.
)
:RESTART
REM - STEP 13: Start all services in defined in SERVICE_LIST
@echo STEP 13: Start all services in defined in SERVICE_LIST
for %%i in %SERVICE_LIST% do (
net start %%i
)
See Also
https://communities.bentley.com/products/assetwise/asset_performance_management/w/wiki/48090/schedule-a-restart-of-the-apm-ivara-services
Original Author:
Giselle Crawford
AssetWise APM
APM Implementation and Performance Management
R6.0+
en
SELECTsupport
Share
History
More
Cancel
Created by
Giselle Notte
When:
Mon, May 9 2016 5:01 PM
Last revision by
Joseph Marin
When:
Mon, Dec 11 2023 3:14 PM
Revisions:
8
Comments:
0
Recommended
Related