Some content on this site is available only to logged-in subscribers. Contact Us for information on becoming a subscriber.

InSource.Solutions | InSource Training | InSource Client Portal
InSource Solutions Logo
Log In Sign Up
InSource.Solutions InSource Training InSource Client Portal Log In Sign Up
  • Home
  • AVEVA Application Server
  • AVEVA Application Server Tech Notes

TN AppSvr 109 Obtain last server bootup time

Last updated: March 6th, 2025

Description

  • Author: Joe Hefner
  • Published: March 6th, 2025

Details:

Description

This tech note describes an option for determining when a computer was last restarted or booted up.

  • Author: Joseph Hefner
  • Published: 01/02/2015
  • Application Server

Instructions

Create a UDA or Field Attribute of type String to hold the date and time of the last system bootup. In the example below, I have created a UDA called BootUpTime:

Next Create a Script that triggers on startup and utilizes the System.Environment.TickCount as below:

dim mc as System.Management.ManagementClass;

mc = new System.Management.ManagementClass("Win32_OperatingSystem");

dim Env as System.Environment;
dim tc as integer;
dim t as System.TimeSpan;

tc = System.Environment.TickCount;
t = System.TimeSpan.FromMilliseconds(tc);

Me.BootUpTime = System.DateTime.Now.Subtract(t);

----------------------------------------------------------------------------------------------------------------------------------------------------------

Upon the next bootup, the UDA you created called BootUpTime should be populated with the time of the last boot. You can check this value in Object Viewer as below:

 

retrieve startup time
Give feedback about this article

Recommended articles

TN 1242 Aveva Historian Storage Locations and Best Practices

Read More

TN 1398 Determining Active Communications Server

Read More
Support Icon

CONTACT SUPPORT

How to reach us

10800 Midlothian Turnpike Tpke, Suite 209, Richmond, VA 23235

1.877.INSOURCE

Technical Support - 1.888.691.3858

Contact Us

  • InSource Solutions
  • InSource Training
  • InSource Client Portal
  • Log In
InSource Solutions Logo

© 2025 InSource Solutions. All Rights Reserved.

Knowledge Base Software powered by Helpjuice

Expand